date:20140525
Auth:jin
First, the service side to start the service and create accounts
# su-oracle
$ lsnrctl Start
$ sqlplus/as SYSDBA
Sql> Startup
sql> alter user SYS identified by admin; #修改sys密码
User altered.
Sql> create user Jin identified by com123; #创建用户
Sql> Grant Connect to Jin; #授予用户权限
Sql> Conn jin/com123
Connected.
Sql> Show User
USER is "JIN
Connection test
$ sqlplus Jin/[email PROTECTED]/ORCL
Location of the server-side listener configuration
$ cat/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Listener.ora Network Configuration File:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle Configuration Tool
Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = ORCL)
(Oracle_home =/u01/app/oracle/product/11.2.0/dbhome_1)
(program = Extproc)
)
(Sid_desc =
(Golbal_dbname= ORCL)
(Oracle_home =/u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME=ORCL)
)
)
Adr_base_listener =/u01/app/oracl
Location of the server-side naming Service
$ cat/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Tnsnames.ora Network Configuration File:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = edrsr12p1.us.oracle.com) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = orcl.us.oracle.com)
)
)
Second, the client configuration
1. Unzip the Win32_11gr2_client.zip
2. Default installation
3. Test connectivity
D:\app\jin\product\11.2.0\client_4\BIN\sqlplus.exe Jin/[email PROTECTED]/ORCL
Sql> Show User
USER is "SYS"
D:\app\jin\product\11.2.0\client_4\BIN\sqlplus.exe Sys/[email PROTECTED]/ORCL as Sysdba
Sql> Show User
USER is "SYS"
4. Using the network Configuration Assistant configuration or net Manger
Client only needs to configure service naming
Configuration is saved in
D:\app\jin\product\11.2.0\client_4\NETWORK\ADMIN\tnsnames.ora
MyOracle =
(DESCRIPTION =
(Address_list =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.234.128) (PORT = 1521))
)
(Connect_data =
(SERVER = dedicated)
(service_name = myoracle)
(instance_name = ORCL)
)
)
5. Installing Plsql
Tool-perference
D:\app\jin\product\11.2.0\client_4\BIN
D:\app\jin\product\11.2.0\client_4\BIN\oci.dll
6. Connect
Error hint: Ora 12514 TNS Listener does not currently recognize the requested service in the connection descriptor
Problem Analysis Sqlplus can log in, Lsql cannot log in. Indicates that there is no problem with the server or the client configuration problem
Carefully compare configurations
Service side
(service_name = orcl.us.oracle.com)
Client
(service_name = myoracle)
Modify service_name of myoracle in client to save orcl.us.oracle.com
Reconnect, normal.
Summarize:
Made a day, very depressed, in the middle seems a few articles, are configured to monitor. Feel Oracle full of trouble.
Configuration reference article do not see more, 1 articles can, up to two articles.
Cover the package as much as possible using the official.
The idea of not knowing about Oracle is completely different from Mysql/sql server. Some things are somewhat object-oriented.
Deal with the problem, stick to it, don't give up. Only perseverance can solve the problem.