Use PL/SQL to connect to Oracle service under Linux

I have been using PL/SQL to connect to the local Oracle service in Windows, and there is no problem; I recently tinkered with an Oracle database under the Linux system, but I have not been able to connect when using the PL/SQL tool to connect, which is very depressing. . .

After searching in many ways, finally found a solution, hereby record it and share it.

The premise is to ensure that the Oracle database on Linux has been installed and the latest version of PLSQL tool + connection client has been downloaded. Post here the PLSQL and client I am currently using, and you can download it as needed: https://download.csdn.net/download/ip_jl/11074409

☞ The first step is to log on to the Linux system as an oracle user and proceed as follows

    ● Query monitoring status: lsnrctl status

    ● If the monitoring is not turned on, open the monitoring service: lsnrctl start

    ● Connect to the database as sysdba: sqlplus sys/sys as sysdba

    ● Open the database: startup

    ● Create user and password: create user <custom user name> identified by <custom password>;  //Note that the semicolon cannot be less, the same below

    ● Authorized user login permission: grant create session to <user created above>;

    ● Authorize users to connect, create views and other permissions: grant connect, create view, resource to <user created above>;

    ● Authorized users to use table space permissions: grant unlimited tablespace to <user created above>;

☞ The second step is to switch to the Windows platform and decompress the compressed package downloaded above

    ● Place the client connection tool instantclient_18.5 in the compressed package into any directory

    ● Enter the ..\instantclient_18_5\network\admin directory and modify the value of host in the configuration file tnsnames.ora to the ip where the Oracle database is located

    ● Install PLSQL connection tool

    ● Click Cancel when logging in using PLSQL for the first time to open PLSQL without logging in

    ● Configure the oci.dll file to PLSQL, it will automatically find the tnsnames.ora file configured above

    ● After the configuration is complete, close PLSQL, reopen the PLSQL program, enter the user name and password you created, the content of the database is related to the configuration in the box below, fill in whatever configuration is configured

    ● Login as Normal, login is successful

Then you can use PLSQL to work efficiently.

Guess you like

Origin blog.csdn.net/ip_JL/article/details/88911546