Oracle 11g Error

Source: Internet
Author: User
1. Error-ORA-12514: TNS: ListenerProgramThe Service requested in the connection descriptor cannot be recognized currently If your server somehow reports this error, It was always normal before , Then try the following method ( Remember to back up the file you want to modify, because the error may be different ):

Open "<oraclehome>/Network/admin/Listener. ora", Copy the following red font to your file

Sid_list_listener =
(Sid_list =
(Sid_desc =
(Sid_name = plsextproc)
(ORACLE_HOME = D: \ oracle \ product \ 10.2.0 \ db_1)
(Program = EXTPROC)
)
(Sid_desc =
(Global_dbname = Oracle)
(ORACLE_HOME = D: \ oracle \ product \ 10.2.0 \ db_1)
(Sid_name = Oracle)
)
)
Save the file, restart the listener, and restart PL/SQL. The above is Oracle10g, and 11g is also like this. ORACLE_HOME = E: \ oracle \ product (this is my, your drive letter may be different.) global_dbname is your database name, And sid_name is the Instance name.2. When connecting to a colleague's database, Ora-12170: TNS: Connection timeout The above error occurs because my colleague has enabled the firewall. 3. When PL/SQL is connected to the database, you can only log on to the database in sysdba mode, but not in normal mode (as a result, JDBC cannot connect to the database) It is very likely that the database is created with the sysdba permission, so the user cannot log on in the normal mode, but I want to add the permission to allow it to log on in the normal mode and query the SQL Select * From all_users order by length (username );

Test cannot be found at all.Username, so the permission cannot be granted. A new account (sungoal) is created using the following SQL, and PLSQL and JDBC can be connected.

View code

-- Create user sungoal identified by sungoal; -- Create temporary tablespace sungoal_temptempfile  ' D: \ oracle_table_space \ sungoal_temp.dbf  '  Size 50 mautoextend onnext 50 m maxsize 1024 m; -- Create tablespace sungoal_datadatafile  '  D: \ oracle_table_space \ sungoal_data  '  Size 50 mautoextend onnext 50 m maxsize 1024 m; -- Designate the tablespace alter user sungoal default tablespace sungoal_data temporary tablespace sungoal_temp; -- Grant connect and resource to sungoal to users; -- Connect to the user (you need to go to the command line window to test whether the user can be connected, but not through the SQL window) -- Conn sungoal/ Sungoal -- Drop user sungoal cascade;

One day in a month, this ghost problem occurs again (When PL/SQL is connected to the database, you can only log on to the database in sysdba mode, but not in normal mode (so that JDBC cannot connect to the database.), View its view, and compare it with other users' SQL statements.

View code

 --  Cannot log on normally  --  Create the user  Create   User  Testdblink_user  Default  Tablespace sungoal_data Temporary  Tablespace sungoal_temp Profile  Default  Password expire;  --  Grant/Revoke role privileges  Grant Connect To Testdblink_user With Admin Option  ;  Grant DBA To Testdblink_user With AdminOption  ;  Grant Resource To  Testdblink_user;  --  Grant/Revoke SYSTEM privileges  Grant Unlimited tablespace To  Testdblink_user;  --  Can log on normally  --  Create the user  Create  User  Sungoal  Default  Tablespace sungoal_data  Temporary  Tablespace sungoal_temp Profile  Default  Password expire;  --  Grant/Revoke role privileges  Grant Connect To  Sungoal;  Grant DBA To Sungoal;  Grant Resource To  Sungoal;  --  Grant/Revoke SYSTEM privileges  Grant Unlimited tablespace To Sungoal;

An SQL statement with admin option is added. Delete the user and create a new one.

View code

 Create   User Testdblink_user identified By Testdblink_user  Default  Tablespace sungoal_data  Temporary  Tablespace sungoal_temp Profile  Default  Password expire;  --  Grant/Revoke role privileges  Grant Connect To  Testdblink_user;  Grant DBA To Testdblink_user;  Grant Resource To  Testdblink_user;  --  Grant/Revoke SYSTEM privileges  Grant Unlimited tablespace To Testdblink_user;

Restart the service, restart PL/SQL, and then OK.

 

4. The Program (Java) can only be localhost, but the IP address cannot be connected. Just add a listening address. Open the net manager of Oracle. Remember to restart the xxxxlistener and xxxxservice services after the change.

4.The oracleoradb11g_home2tnslistener service on the local computer is started and stopped. Some services are stopped automatically...

This is because the IP address has changed. The Listener. ora file is as follows:

Listener =  (Description_list  =  (Description  =  (Address  = (Protocol = IPC )(Key   =  Extproc1521) (Description  =  (Address  = (Protocol = TCP) (host = Localhost) (Port =   1521  ) # (Description  =  # (Address  = (Protocol= TCP) (host =   192.168 . 12.12 ) (Port =   1521  ))#)) 

Where192.168.12.12It's my IP address in the company. The IP address in the house is not the IP address, so you just need to comment on it, or change it to your IP address.

If your server somehow reports this error, It was always normal before , Then try the following method ( Remember to back up the file you want to modify, because the error may be different ):

Open "<oraclehome>/Network/admin/Listener. ora", Copy the following red font to your file

sid_list_listener =
(sid_list =
(sid_desc =
(sid_name = plsextproc)
(ORACLE_HOME = D: \ oracle \ product \ 10.2.0 \ db_1)
(program = EXTPROC)
(sid_desc =
(global_dbname = Oracle)
(ORACLE_HOME = D: \ oracle \ product \ 10.2.0 \ db_1)
(sid_name = Oracle)
)
)
Save the file, restart the listener, and restart PL/SQL.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.