miércoles, 27 de marzo de 2019

How to change language in Oracle SQL Developer


Today I installed SQL developer on a machine whose operating system in Spanish, and SQL Developer got installed in Spanish too.

I usually like to have programs installed in English  because, among other things, it is usually easier to find help.

It turns out that there is a pretty easy way to change the user interface language, which I describe below.
  • Close SQL Developer, if it is running.
  • Go to the installation folder. To do that you can right-click on its shortcut, and click on ‘Open file location’.
  • Once there, open  the ‘sqldeveloper’ folder, and then the ‘bin’ folder.
  • There is a file called “sqldeveloper.conf”, which is the one you need to edit to change the language. Open this file with the text editor of your choice.
  • To change the language, you need to add a new setting there.  Since SQL Developer is a Java application, we need to use the AddVMOption command to pass the parameter to the Java virtual machine when it starts the application. The parameter we need to add is ‘user.language’ and in this case we need to set it to ‘en’, for English.  So, this is the line you need to add: AddVMOption -Duser.language=en
And that’s it.  Now you can save and close the file, and the next time you open SQL Developer, you will see it in English!

viernes, 8 de marzo de 2019

Creating Batch File to Map Network Drive



If you want to save time by creating a batch file that when you click on it it will automatically map the drive for you.  Or if the map network drive keep disconnecting every time you restart your computer, then you can put the batch file in the start up folder so that it run every log in.

  1. Open Notepad
  2. net use S: \\Network path /persistent:yes (The Network path is the path where you want to mapped to)
  3. If you want to mapped multiple drive just keep repeating step 2 and 3
  4. You can add "pause" word at the end of the file to see the results of the batch file
  5. Click File and select Save As
  6. Navigate to where you want to save it
  7. Name it and make sure at the end of the name you add .bat as extension file.
  8. Click OK
  9. Now navigate to where you save it and click on it
  10. A command prompt should appear
  11. Then Press any key to exit

I'm always add the line: net use S: /DELETE /YES to delete any network parth linked to the letter. (In this case S:)

It should looks something like this:

net use S: /DELETE /YES
net use S: "\\server_name\folder_name" /PERSISTENT:YES
net use R: /DELETE /YES
net use R: "\\server_name\folder_name" /PERSISTENT:YES
net use T: /DELETE /YES
net use T: "\\server_name\folder_name" /PERSISTENT:YES

Example:


(servers name have been removed)

viernes, 1 de marzo de 2019

How can I install a font from a batch file?

When you install a font all it does is copy the .ttf file to 
%systemroot%\fonts 
and add an entry in 
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
This can be automated with a batch file as follows:
install.bat:
xcopy font_name.ttf %systemroot%\fonts
regedit /s font.reg
If you want to install with administrator's rights:
runas /user:domain\userID "xcopy CHL_AVON_CG.ttf %systemroot%\fonts"
regedit /s font.reg
font.reg:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\]
"CoalhandLuke_Avon_CG (TrueType)"="CHL_AVON_CG.ttf"