connect to a database

see: Help! I can’t connect to my database
see: Help! I can’t connect to my database (part duex) 


At Client machine: tnsnames.ora, sqlnet.ora
TNS locates its configuration file (sqlnet.ora) and name resolution file (tnsnames.ora) are on a Windows client. 


This tnsnames.ora file must be found on the client machine.  By default it will be found in $ORACLE_HOME/network/admin.

At Server machine/on the server: listener.ora

The listener is very simple.  It runs on the server (not the client) and it’s job is to listen for connection requests and make the connection (server process) between the client and the database instance.  Once that connection is made, the listener is out of the picture. If you were to kill the listener, all existing connections would continue.

“localhost” or “127.0.01″ is a NONROUTABLE ip address.
There are two parameters, GLOBAL_DBNAME and SID_NAME in listener.ora. 
The GLOBAL_DBNAME is Service name for clients linking, the SID_NAME is instance name.
They are the database parameter, service_name and instance_name.
Show Paramete command is the following:
SQL> show parameter instance_name;
SQL> show parameter service_name;

sqlnet.ora is not required, because every essential parameter it can contain has a default value.
Full documentation of every parameter in sqlnet.ora can be found in the Net Services Reference, found with the rest of the Oracle documentation set at tahiti.oracle.com.  One would also be well advised to spend some time in the Net Services Administrator’s Guide, paying attention to how the sqlnet architecture relates to the standard network OSI stack.
We can check the result by using the Oracle utility ‘tnsping’.

评论

此博客中的热门博文

XML, XSL, HTML

Input in element.eleme.io

Data URI是由RFC 2397 ACE