Three ways to not use the TNS Direct database

Source: Internet
Author: User
Tags sqlplus

1. Create a new Tnsnames.ora file in the current directory

In the Windows environment, create a new Tnsnames.ora file under the C:\Users\Administrator directory with the following content:
Test = (description= (address= (protocol=tcp) (host=192.168.0.1) (port=1521)) (Connect_data= (server=dedicated) ( SERVICE_NAME=ORCL)))
c:\users\administrator>sqlplus sys/[email protected] as SYSDBA;

Sql*plus:release 11.2.0.1.0 Production on Friday February 13 00:03:51 2015

Copyright (c) 1982, Oracle. All rights reserved.

Connect to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
With the partitioning, OLAP, Data Mining and Real application testing options


2. Add desctiption content while Sqlplus connection
c:\users\administrator>sqlplus sys/[email protected] (description= (address= (protocol=tcp) (HOST=RUSKY-PC) ( port=1521)) (Connect_data= (SID=ORCL) )) as SYSDBA;

Sql*plus:release 11.2.0.1.0 Production on Thu February 12 23:56:33 2015

Copyright (c) 1982, Oracle. All rights reserved.

Connect to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
With the partitioning, OLAP, Data Mining and Real application testing options

3. Connect directly with IP, port number, instance name
c:\users\administrator>sqlplus sys/[email protected]:1521/orcl as SYSDBA;

Sql*plus:release 11.2.0.1.0 Production on Thu February 12 23:58:24 2015

Copyright (c) 1982, Oracle. All rights reserved.


Connect to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
With the partitioning, OLAP, Data Mining and Real application testing options

"from:http://blog.csdn.net/hhuck/article/details/5337764"

Three ways to not use the TNS Direct database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.