Questions about oracle monitoring and connection

1. Monitor http://blog.csdn.net/orcldb/article/details/12784273

   http://blog.itpub.net/9240380/viewspace-719391/

2. Connect

    set oracle_sid=orcl

    http://www.2cto.com/database/201307/226125.html

 

SQLPlus usually has four ways when connecting
 
1. 
?
1
sqlplus / as sysdba

 

    Operating system authentication does not require the database server to start the listener and does not require the database server to be available. For example, if we want to start the database, we can enter in this way
    sqlplus, and then start it through the startup command.
2. 
?
1
sqlplus username/ password

 

    Connecting to the local database does not require the listener process of the database server, but requires the database server to be available because the authentication of the user name and password is required.
3. 
?
1
sqlplus usernaem/ password @orcl

 

    Connected via a network, this requires the database server's listener to be in a listening state. The general steps for establishing a connection at this point are as follows 
  a. Query sqlnet.ora to see how the name is resolved, the default is TNSNAME  
  b. Query the tnsnames.ora file, find orcl records from it, and find the hostname or IP, port and service_name of the database server  
  c. If there is no problem with the server listener process, establish a connection with the listener process.  
  d. According to different server modes such as dedicated server mode or shared server mode, the listener takes the next action. The default is dedicated server mode, if there is no problem with the client
            It is connected to the server process of the database.
  e. At this point, the connection has been established and the database can be operated.
4.
?
1
sqlplus username/ password @//host:port/sid

 

  Use sqlplus to remotely connect to oracle commands (for example:
?
1
sqlplus risenet/1@//192.168.130.99:1521/risenet
)

   

   

   

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327069085&siteId=291194637