<<Back to DB Administration Main Page
Connecting to Oracle Database
There are various mechanism/tools available to connect to the oracle database eg TOAD, SQL*PLUS, PL/SQL Developer etc.
Basic information required to connect to database is same for every tool except if you are using OS authentication
Necessary information to connect to oracle database
- Hostname
- DB_NAME or DB_Service
- Port
Connecting Using OS Authentication
$export ORACLE_SID=orcl
$export ORACLE_HOME=/u01/app/oracle/product/18.0.0/db_1
$export PATH=$ORACLE_HOME/bin:$PATH
$export ORACLE_HOME=/u01/app/oracle/product/18.0.0/db_1
$export PATH=$ORACLE_HOME/bin:$PATH
$sqlplus / as sysdba
OR
$sqlplus /nolog
SQL> connect sys as sysdba
OR
SQL> connect sys@tnsname as sysdba
SQL> connect sys as sysdba
OR
SQL> connect sys@tnsname as sysdba
Connecting with Easy Connect Syntax
SQL> connect username@"dbhost.example.com/sales.example.com"
Connecting with Easy Connect Syntax with a Nondefault Listener Port
SQL> connect username@"dbhost.example.com:1522/sales.example.com"
Connecting by Specifying an Instance
SQL> connect username@"dbhost.example.com//orcl"
Connecting with a Net Service Name
Connecting with External Authentication
SQL> connect /@sales1
OR
$ sqlplus /@PDB01
Connecting with SYSDBA Privilege and External Authentication
SQL> connect /@sales1 as sysdba
Read more about External Authentication Hiding Database Credentilas Using Oracle Wallet
Connecting to the Database Through the Applet
Using host:port:sid syntax
string connString="jdbc:oracle:thin:@prodHost:1521:ORCL";
............
Using TNS keyword-value syntax
String connString = "jdbc:oracle:thin:@(description=(address_list=(address=(protocol=tcp)(port=1521)(host=prodHost)))(connect_data=(INSTANCE_NAME=ORCL)))";
Authentication Methods for Database Administrators
Oracle database supports various authentication methods. I am listing the name of them. How to configure them is the topic of dedicated post.
- Operating system (OS) authentication
- Password based Authentication
- Password file including Kerberos and SSL authentication services
- Strong authentication with a directory-based authentication service, such as
- Oracle Internet Directory
- External Authentication
NOTE:
Operating system authentication takes precedence over password file authentication. If you meet the requirements for operating system authentication, then even if you use a password file, you will be authenticated by operating system authentication.
Operating system authentication takes precedence over password file authentication. If you meet the requirements for operating system authentication, then even if you use a password file, you will be authenticated by operating system authentication.
Related Posts
Comments
Post a Comment