Reputation: 45
I have to connect or make service (i don't know what you called exactly),there are table spaces created and i have user name ,password for that,but i don't know how to connect to the Oracle DB,i think there is a procedure by giving credentials and service name,can you please advice me how to do that
Upvotes: 0
Views: 99
Reputation: 20862
You must setup a TNS entry. Google sample tnsnames.ora or use the New Database Connection wizard in SQL Developer. Typically a TNS entry requires your hostname, port (default is 1521) and SID.
Look under your Oracle client home for NETWORK\admin directory
Create tnsnames.ora with an entry that matches your environment. You can also use the Oracle Net Configuration Assistant (Start -> Programs -> OracleHome1 -> Configuration and Migration Tools) on Windows
ORA1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.5)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORA1)
)
)
Then connect with the TNS alias and username and password
Try pinging it first:
tnsping ora1
SQLPlus
sqlplus scott/tiger@ora1
Upvotes: 1