Posts

Showing posts from November, 2018

How to Run Shell Commands from Oracle Forms?

Image
To run shell commands from Oracle Forms, use /bin/ directory as a source in the Linux or Unix environment. The following is the example:
Run Shell Command from Oracle Forms Example Suppose you want to run mv command to move a file from one directory to another. Then use the host command as following: host('/bin/mv /user01/myfiles/abc.txt /user01/oradocs/abctxt', no_screen);
If the file is too large, then it can take time to move from one folder to another, and in this case, Oracle Forms will be engaged until the command finish. So to run a command in the background put ampersand (&) in the end of the command. Below is the example: host('/bin/mv /user01/myfiles/abc.txt /user01/oradocs/abctxt &', no_screen);

How to Use egrep to Find Multiple Strings in a File?

Image
Below is the example to find multiple strings in a file using the egrep command in Linux or Unix environment.
egrep Command to Find Multiple Strings in a File In the following example, the egrep command will look for strings Scott, Smith and Phillip in all text files.
egrep 'Scott|Smith|Phillip' *.txt Output:emp.txt:1200|Scott|Technology|5500 emp.txt:9500|Smith|Technology|6000 emp.txt:9548|Phillip|IT|8000
To specify a particular file, you can specify the name instead of *.txt. For example:
egrep 'Scott|Smith|Phillip' emp.txt

How to Change Password in Toad for Oracle?

Image
In this how-to guide, you will learn how to change the password in Toad for Oracle. Examples are below to change the password for the current Oracle user and any other user.
Steps to Change Password of Current User in Toad for OracleIn Toad for Oracle, connect to the database then click on the menu Session > Change Password.A dialog window open as shown in the below image. Specify the new password in the New Password field and re-type in the Verify Password field and click on the Execute button.
Now the password will be changed for the current user. Steps to Change Password of Any Other User Using Toad for OracleIn Toad for Oracle, click on the menu Database > Schema Browser.The Schema Browser window will open. Then click on the User tab.In the User tab, select the user for which you want to change the password.Then do the right-click on that user and from the shortcut menu choose Alter.The Alter User window will open as shown below. Then specify the New Password and click on t…

How to Kill Session in Toad for Oracle?

Image
In this how-to guide, you will learn how to kill a session in Toad for Oracle.
To kill the session in Toad follow these steps:In Toad for Oracle, connect to the database with the user having ALTER SYSTEM KILL SESSION privilege or DBA privilege.After connecting to the Oracle database, click on the menu Database > Monitor > Session Browser.The Session Browser window will open, then select the session and do the right click on it and choose Kill Sessions option from the shortcut menu as shown in the below image.
The selected session will be killed immediately. See also:How to Write Query in Toad for Oracle?

How to Generate HTML Reports in Toad for Oracle?

Image
To generate HTML reports in Toad for Oracle follow these steps:
Generate HTML Report in ToadIn Toad for Oracle, open SQL Editor by clicking on the Menu Database > SQL Editor.Then type your query in the editor for which you want to generate HTML report and press Ctrl+Enter or F9 to execute.You will get the result into the grid in Toad.Then do the right click on the grid and select Export Dataset option.Choose HTML Table from the Export Format drop-down list.In output choose File and type the filename in the File field.Then click on the OK button to generate the report as shown below: Output