Thursday, June 23, 2011

connect to Oracle Db by sqlplus in linux

1) find tnsnames.ora
2) add or changes a entry like this
ORCLDBDTT =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ip address )(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = STGSPDB)
)
)
note: ORCLDBDTT is a name call tns name,STGSPDB is a service ID
3)save the file connect to db by this:
sqlplus user/password@ORCLDBDTT

No comments:

Post a Comment