Oracle database server configuration settings and a series of necessary client to access the database

tips: Make all paths corresponding to their own specific file path of the computer.

First, the server and the Oracle database settings

1, just Bahrain's only one Oracle database dba account, you first need to create a user.

2, configure the listener, C: \ app \ Admin \ product \ 12.2.0 \ dbhome_1 \ network \ admin \ listener.ora configuration file contents:

# listener.ora Network Configuration File: C:\app\Admin\product\12.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\app\Admin\product\12.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:\app\Admin\product\12.2.0\dbhome_1\bin\oraclr12.dll")
    )
# This paragraph is consistent with the creation of a database instance name, where "testdb01" I own database instance is created (SID_DESC
= (SID_NAME = testdb01) (ORACLE_HOME = C: \ App \ Admin \ Product \ 12.2 . 0 \ dbhome_1) (GLOBAL_DBNAME = testdb01) )
# create a default instance, then is this: (SID_DESC
= (SID_NAME = orcl) (ORACLE_HOME = C: \ App \ Admin \ Product \ 12.2 . 0 \ dbhome_1) (GLOBAL_DBNAME = orcl) ) ) LISTENER = ( DESCRIPTION_LIST = (The DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))
# access the database remotely, then add this row, HOST can fill in the server computer name or IP address (ADDRESS
= (PROTOCOL = TCP) (HOST = WIN -2HC55VSDR1U) (PORT = 1521 )) ) )

3, note that is: C: \ app \ Admin \ product \ 12.2.0 \ dbhome_1 \ network \ tnsnames.ora in localhost Do not change!

4, set up the server firewall allows communication port 1521 in Windows Firewall - Advanced Settings - Inbound Rules - New - port -TCP, special port allows connection to fill 1521- ... until the completion, created as shown:

At this point, the server and the Oracle database configuration is complete.

Second, the client database connection

1, connect to the database configuration information, configure the local tnsnames.ora, here to InstantClient example, E: \ Developer \ instantclient_12_2 \ network \ Admin \ tnsnames.ora (or file path does not create your own), the contents of the configuration file:

The tnsnames.ora Network the Configuration File #: C: \ App \ Admin \ Product \ 12.2 . 0 \ dbhome_1 \ Network \ ADMIN \ the tnsnames.ora 
. # Generated by the Oracle the Configuration Tools 
# above content can ignore 

ORACLR_CONNECTION_DATA = 
  (the DESCRIPTION = 
    (ADDRESS_LIST = 
      (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521)) 
    ) 
    (CONNECT_DATA = 
      (SID = CLRExtProc) 
      (PRESENTATION = RO) 
    ) 
  ) 

# this paragraph is the information for the target database, TESTDB01 simply an alias nothing, you can easily naming, HOST fill in the database IP address, port number 1521, SERVICE_NAME is the database instance name can not be wrong 
TESTDB01 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.100.128)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = testdb01)
    )
  )

2, PL / SQL Developer oci.dll configured in the position shown in FIG:

Reopen PL / SQL Developer, using the new user, select the database, signing in, as shown:

OK, start to enjoy!

 

Guess you like

Origin www.cnblogs.com/seanyan/p/11487511.html