how to change the path of the preference files in PL/SQL Developer version 9 - plsqldeveloper

my pl/sql developer give me an error (file access denied) every time I execute a sql statement in sql window. it is running fine in command window. when I look in support info I notice the Preference files are located as follow
Preference Files
C:\Program Files\PLSQL Developer\Preferences\Default\Default.ini
C:\windows\system32\config\systemprofile\AppData\Roaming\Preferences\USER\default.ini
and I don't have access to this file hence I got the error.
C:\windows\system32\config\systemprofile\AppData\Roaming\Preferences\USER\default.ini
is there a way to change the path to
C:\Users\USER\AppData\Roaming\PLSQL Developer\Preferences\USER\Default.ini
thanks inadvance
Tuan

There is a prefpath command-line argument, so you can start PL/SQL Developer using something like:
"C:\Program Files (x86)\PLSQLDeveloper\plsqldev.exe" userid=un/pw#svc prefpath="%APPDATA%\Preferences"

Related

weblogic 12.2.1 config wizard C:\Program is not recognized error

Running the Config Wizard via the start menu (Windows 7) simply fails. Running it from the command prompt shows the infamous
'C:\Program' is not recognized as an internal or external command, operable program or batch file
I know this is due to the space in "Program Files" (dir C:\pro* /x doesn't show C:\Progra~1).
The solution I've found for this is to replace C:\Program Files\... with "C:\Program Files\...".
My question is this:
Since the WebLogic config wizard runs from config.cmd, which is loaded with variables for path names, do I have to update Windows system environment variable PATH and put quotes around all path names that have a space (since I don't know what WebLogic is looking for)?
Update:
I tried this and received Files was unexpected at this time. Which made me think I was off with the quotes, but they are paired properly around every path with C:\Program Files. A search on this error resulted with this advice...basically the double quotes are the cause.
If the lack of quotes causes the first problem, and the presence of quotes causes the second problem, what to do? It's a loop...
I installed another JDK in a location with no spaces (still got the error because I didn't change any environment variables because work site will change them back, breaking things).
The install docs in chapter 4 say:
To begin domain configuration, navigate to the
ORACLE_HOME/oracle_common/common/bin directory and start the
Configuration Wizard.
On UNIX operating systems:
./config.sh
On Microsoft Windows operating systems:
.\config.cmd
Which implied at a command prompt (to me anyways). I was reading another site for help and the guy said to update config.cmd to point it to new JDK location instead of JAVA_HOME.
Instead of right clicking on config.cmd to edit it I double clicked it and lo and behold...this nice domain creator GUI opened up where I could specify which JDK to use. Done! No errors...
If that little tidbit were in the docs it would've save me a lot of time and frustration. And no, I'm not a server admin type, just a dev who needed a local web server for testing purposes.
I hope this helps someone.

Strange response (about MySQL) for heroku login on windows (closed)

I have heroku toolbelt installed on Windows7 (x64 HomeEd). When i'm trying to login to heroku, i recieve strange message about MySQL (though MySQL already works fine with all software installed):
Microsoft Windows [Version 6.1.7601]
(c) Microsoft Corp., 2009. All rights reserved.
C:\windows\system32>heroku login
"MySQL" is not recognized as an internal or external command,
operable program or batch file.
"MySQL" is not recognized as an internal or external command,
operable program or batch file.
C:\windows\system32>
Exactly like shown - two times. As I found, heroku.bat does not invoke MySQL at any step. I think that OS runs some script (a kind of autoexec) just before or in parallel with heroku.bat, but i can't find the way used to do this. This is confirmed by the fact that when i start the other bat files the same two messages about MySQL appears.
Can you help me find how that strange script is invoked?
Detailed research shown that the reason is MySQL component, named "MySQL Fabric 1.5.3 & MySQL Utilities 1.5.3 1.5". During installation MySQL added it's location to Path environment variable. This caused to break Path variable contents with "&" symbol and any invocation of Path variable cause error
It seems that at some point a script tries to call MySQL.exe and this file can't be found. To solve this problem you should add the Directory containing MySQL.exe to %PATH%. First make sure MySQL.exe is located on your system. If you are not sure where it is, start CMD, go to your root directory (CD \) end enter dir /S MySQL.exe. This will search your drive for the file and show you the path, where it can be found. Save the path somewhere.
Now that you know where the file is is, you have to add it's location to %PATH%. To do so enter setx PATH "<NEWPATH>;%path%;" where is the path to the directory containing MySQL.EXE. Dont forget ;%path%;, this is very important. If you don't put it there it wil mess up your %PATH%.
Close the console, open a new one and type heroku login. This should fix the problem.
Now if you are not interested in fixing the error and just want to know where it comes from, you should post the code of the batch file that is executed by calling heroku login.
Just remove the C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\Doctrine extensions for PHP\; from your path (It is breaking things up, it gets added during MySQL installation)and add the MySQL bin path. For me it is C:\Program Files\MySQL\MySQL Server 5.7\bin

Where is Oracle sqlplus located?

Background
Coming from a mysql background, I find getting started with Oracle quite a different experience.
Question
Where do I find this command tool for Oracle?
I have checked wikipedia and it only says:
An Oracle programmer in the appropriately configured software environment can launch SQL*Plus
And it's not in the PATH on my Windows:
C:\Users\jeff>sqlplus
'sqlplus' is not recognized as an internal or external command,
operable program or batch file.
You can locate the sqlplus executable in Windows by running in a CMD shell
dir /s /b c:\sqlplus.exe
Suppose you find the file at
c:\oracle\product\11.2.0\client_1\bin\sqlplus.exe
Then you have determined that your ORACLE_HOME is:
c:\oracle\product\11.2.0\client_1
Assuming the above ORACLE_HOME, set your environment variables (Control Panel > System > Environment Variables). Below is example, so modify these to match the ORACLE_HOME you determined above.
ORACLE_HOME=c:\oracle\product\11.2.0\client_1
TNS_ADMIN=c:\oracle\product\11.2.0\client_1\network\admin
PATH= *(add this below the end of your PATH)*
;c:\oracle\product\11.2.0\client_1\bin
Usually in $ORACLE_HOME/bin and usually they suggest to run
. oraenv
to prepare your environment.
If you are running Oracle Server on your local computer you can also find it by right clicking the running Oracle process:
In my case it is in
C:\app\TZNind\virtual\product\12.2.0\dbhome_2\bin
Problem: For example, Missing files in WINDOWS.X64_193000_db_home folder.
Solve: Reinstall oracle db. The exact solution.
enter image description here
enter image description here

dbext not finding sql snippets to execute

I'm trying to use the dbext vim plugin to connect to a MySQL database.
When I give commands like <Leader>se I get an error:
Can't open file
/var/folders/b3/s3wyytf90_ld113h1w3p86ldcg4glv/T/vQ0XMX3/7
That file doesn't exist. But the SQL I expect to be executed does exist in:
/var/folders/b3/s3wyytf90_ld113h1w3p86ldcg4glv/T/vQ0XMX3/dbext.sql
So it looks as if the plugin is writing a temp file in one location and looking for it in another.
I'm sure the plugin can't be broken and I must have done something wrong, but I don't know enough Vimscript to follow it through.
I have Vim v7.3, dbext 20.00 and have just installed by unzipping the plugin zip into my .vim directory.
I've used
:DBPromptForBufferParameters
to set up my connection parameters.
The full error looks like:
dbext: Executing SQL at 13:54
Error detected while processing function dbext#DB_execSql..dbext#DB_execFuncTypeWCheck..<SNR>42_DB_MYSQL_execSql..<SNR>42_DB_runCmd:
line 24:
E484: Can't open file /var/folders/b3/s3wyytf90_ld113h1w3p86ldcg4glv/T/v0BN3Qw/7
Press ENTER or type command to continue
Can anyone point me in the right direction to resolve this?
Edit: I've since tried an install into an empty .vim directory, with all of my other config and plugins removed, so I don't think that it's a case of conflicting configuration.
I'm running MacOSX, in case it's relevant.
Dumb mistake on my part.
I was supplying a bare password which needed to be quoted in this context due to a special character.
I'm now quoting the password when prompted for it by :DBPromptForBufferParameters and everything is working.

Run exe file to downsize SQL Server to SQL Server CE

I'm trying to convert a SQL Server 2008 R2 database to SQL Server CE 4.
The only solution I can find is detailed here: http://erikej.blogspot.com/2010/02/how-to-use-exportsqlce-to-migrate-from.html.
However, I've downloaded the .exe and opened it - it just pops up with a command window which says something then immediately closes before I can read it; which I assume is just it installing.
However, if I then open a command prompt and type any of the instructions in that example and run e.g.
Export2sqlce "Data Source=(local);Initial Catalog=AdventureworksLT;Integrated Security=True" AW.sqlce
I just get "'Export2sqlce' is not recognized as an internal or external command, operable program or batch file."
What am I doing wrong?
EDIT: I needed to run the full path to the exe and the extension for it to work. Like this:
C:\Users\admin\Desktop\Export2SQLCE.exe "Data Source=(local);Initial Catalog=Northwind;Integrated Security=True" Northwind.sql
For any command lin utility, you must either locate yourself to the folder where it resides, use the full path or place the file in a folder that is in the PATH environment variable.