How to use sqlplus to connect to oracle11g database

I installed the Oracle database locally . Now I want to use PLSQL developer must install oracle client?

Standard explanation:

In fact, to run plsql, a 32-bit oci.dll file is required.

If your local oracle is 32-bit, you don't need to install other things. And there is no need to manually configure the tool, preference's oracle_home and oci library, plsql will be loaded automatically.
If the native oracle is 64-bit, you need to install a 32-bit oracle client (decompressed version). And to manually configure the tool, preference's oracle_home and oci library .

 

2 If the installed oracle is 32-bit, if plsql does not manually select oracle_home and oci library, plsql will automatically detect oracle_home.

This is why some plsql tools and preference's oracle_home and oci library are empty, but plsql can be used normally.

 

After installing Oracle, it comes with sqlplus. If you don't want to install oracle, you can install sqldeveloper to manage oracle

 

Without Oracle installed, you cannot connect to the company's Oracle server through sqlplus or sqldeveloper . If you want to connect to the company database, you must install the oracle client

on your computer. After installation, there is also a file in \oracle\ora92\network\admin\tnsnames.ora. In this file, you need to add a paragraph as follows: XXXX =   ( DESCRIPTION =     ( ADDRESS _LIST =       ( ADDRESS = ( PROTOCOL = TCP ) ( HOST = database ip address ) ( PORT = 1521) )     )     ( CONNECT_DATA =       (SERVICE_NAME = nnn )     )   ) nnn : the sid name of the database server, specified by the server , you need the administrator to tell you XXXX: you name yourself, use "account + password + this name" to connect to the database in your application










 

sqlplus is the main interface of the Oracle database server, which can be understood as a client. It provides a very powerful and easy-to-use query, definition and control database environment. The following is a brief introduction to the example of how to use sqlplus to connect to the database.

Baidu experience: jingyan.baidu.com

Tools/Materials

 
  • oracle11g

Baidu experience: jingyan.baidu.com

method/step

 
  1. 1

    Method 1: In the start menu, find oracle11g-application development-SQL PLUS. Double-click SQL PLUS.

  2. 2

    In the displayed SQL Plus box, enter the user name and password of the database instance, and press Enter.

  3. 3

    If multiple database instances are installed in the oracle server, enter the username/password@database name in the username. If the database server is not on the local machine, you also need to add the address of the database server: username/password@IP address/database name.

  4. 4

    Method 2: In Start-Run, enter cmd. In the black box that pops up, enter: sqlplus username/password@IP address/database name.

     

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326452012&siteId=291194637