As @ik_zelf mentioned, your PATH variable will need to include the "bin" directory of your Oracle software install. This will allow you to execute commonly-needed commands/utilities like "sqlplus" and "lsnrctl" without changing directories. This is typically $ORACLE_HOME/bin
Your TNS_ADMIN variable needs to be set in a similar matter, pointing to the location of your tnsnames.ora, listener.ora, etc. By default, SQL Plus checks this directory (defined by TNS_ADMIN) for tnsnames.ora. This is typically $ORACLE_HOME/network/admin
If you want to connect to your database via TNS, your tnsnames.ora file (assuming a ORACLE_SID of "myDatabase", a host of "myHostname" and the default port) would look something like this:
myDatabase =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myHostname)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = myDatabase)))
This would allow you to connect locally simply by doing the following from a command line:
sqlplus username/password@myDatabase
Of course, as SQL Plus looks for the tnsnames.ora file in the location defined by $TNS_ADMIN, this will only function locally. To access this database via TNS (Transparent Network Substrate) from a remote machine, you would have to install the Oracle client and ensure that the TNS entry for myDatabase (as described above) is included in the remote machine's tnsnames.ora file as well.
Here is the Oracle 11.2 installation document describing the administrator user accounts after installation. Once logged in, you would change passwords with the syntax
alter user system identified by mynewpassword;
Note the SYS
and SYSTEM
accounts are assigned the DBA
role. The DBA
role does not have a password, the accounts do. The DBA
role is created with every installation. You could grant the DBA
role to another user if needed.
Best Answer
It's easy because internal database structure almost identical:
catalog.sql
andcatproc.sql
from new version;Note that software version, release number and patch level must be identical.