Monday, October 12, 2020

How can check previous databases in Oracle through command line

Open a command window.

Configure the operating system environment variables.

Ensure that the environment variables ORACLE_HOME and ORACLE_SID are set properly. The commands to use to set these environment variables depend on the shell you use to interface with the operating system. For example:


(bash or ksh) export ORACLE_SID=orcl

(csh or tcsh) setenv ORACLE_SID orcl


You can set these with the scripts coraenv (for the C shell) and oraenv (for other shells). These scripts are typically located in the /usr/local/bin directory.


Ensure that the $ORACLE_HOME/bin directory is in your PATH environment variable.


You can also edit the profile file for your default shell in the home directory of the software owner, for example /home/oracle, so that these environment variables are set every time you log in as that user.


Start SQL*Plus using a command in the following format:

sqlplus {username | /} [as sysdba]

An example of this command is:


$ sqlplus / AS SYSDBA

Enter password: password

For username, you can use the SYS or SYSTEM administrative users. At the prompt, enter the password that you set up during installation. If you use the SYS user, you must include AS SYSDBA after the username.


SQL*Plus connects you to the default database instance (Microsoft Windows) or the database instance specified by environment variables (Linux and UNIX).

No comments:

Post a Comment

Featured post

Migrate OCR & vote from external to normal or High redundancy in ASM

How to Move OCR & Vote from external to Normal or high. 1)  Create New diskgroup(CRS) with suitable redundancy for OCR and Voting files....

Popular Posts