Skip to main content
edited tags; edited title
Link
Laurenz Albe
  • 56.5k
  • 4
  • 50
  • 82

Connect to sql pluswith sqlplus from the command line using a connection string

Reduced noise, improved punctuation, and added missing tags.
Link
John K. N.
  • 18.3k
  • 14
  • 54
  • 115
Reduced noise, improved punctuation, and added missing tags.
Source Link

Let's say I have aan Oracle database. I have a username = x, password = y, database = z. Also I know the, port = a, SID = b, and Hostname = c.

So, how do I need to connect correctly? I used many options like:

sqlplus x/y@'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=c)(PORT=a))(CONNECT_DATA=(SID=z)(SERVER=DEDICATED)))'

sqlplus (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=c)(PORT=a))(CONNECT_DATA=(SID=b)))

Submitting these command linesBut they usually givesgive me back error messages likethe following errors:

ORA-12560: TNS:protocol adapter error
ORA-12514: TNS:listener does not currently know of service

Many thanks in advance!!

Let's say I have a Oracle database. I have a username = x, password = y, database = z. Also I know the port = a, SID = b, Hostname = c.

So how do I need to connect correctly? I used many options like:

sqlplus x/y@'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=c)(PORT=a))(CONNECT_DATA=(SID=z)(SERVER=DEDICATED)))'

sqlplus (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=c)(PORT=a))(CONNECT_DATA=(SID=b)))

Submitting these command lines usually gives me back error messages like:

ORA-12560: TNS:protocol adapter error
ORA-12514: TNS:listener does not currently know of service

Many thanks in advance!!

Let's say I have an Oracle database. I have a username = x, password = y, database = z, port = a, SID = b, and Hostname = c.

So, how do I connect correctly? I used many options like:

sqlplus x/y@'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=c)(PORT=a))(CONNECT_DATA=(SID=z)(SERVER=DEDICATED)))'

sqlplus (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=c)(PORT=a))(CONNECT_DATA=(SID=b)))

But they usually give me the following errors:

ORA-12560: TNS:protocol adapter error
ORA-12514: TNS:listener does not currently know of service

Question Protected by CommunityBot
Tweeted twitter.com/#!/StackDBAs/status/583355894357975041
added 22 characters in body
Source Link
user1822
user1822
Loading
Source Link
Edvinas
  • 711
  • 1
  • 6
  • 3
Loading