Oracle connection creation is too slow

Recently, the company's ORACLE server suddenly went down, which was finally resolved after a series of tossing about reinstallation. Finally found that their understanding of ORACLE is not enough.

 

Here are some solutions to the problems:

Issue 1: ORA-12514 TNS listener currently does not recognize the request service in the connect descriptor

Solution: Start the database by restarting the service and try to connect. If it is not resolved, modify the listener.ora file and configure static monitoring.

Summary: add listener.ora correctly; restart the oracle server, and check whether all oracle services are started; the oracle client Net Cofiguration Assistant correctly adds or reconfigures the instance name 

 

Issue 2: ORA-12518: TNS:listener cannot distribute client connections

Solution: Generally, this situation is rare. First, check whether the database service is started. If the database service is started, log in to dba through the sqlplus command and execute the startup command to start the database instance.

cmd>sqlplus connect sys/sys as sysdba>startup

 

Question 3: The speed of connecting to oracle through tools such as plsql is slow, and it takes more than 10 seconds. Even if it cannot be connected for a long time, the connection is also very slow when starting and closing oralce listening through commands.

Solution: This happens usually in two cases,

The first is the problem of the machine name (hostname), you need to modify the listener.ora file or re-establish the monitor.

The second method is the problem I encountered this time. Oracle is developed by multiple people, and it lasts for a long time. The listening time is too large, resulting in a slow connection. The solution to this approach is to delete or rename the original listener solstice.

lsnrctl set log_status off

rename listener.log listener.old

lsnrctl set log_status on 

 

Summarize what you have learned:

1. In windows, the oracle service in the windows service is started, which does not mean that the oracle instance is started.

Start menu -> oracle configuration and migration tools -> Administration Assistant for Windows

Find the database menu on the left menu, and right-click on the instance below to start the shutdown option.

In the Oracle instance tab, there are two options: "Start the instance when the service starts" and "Close the instance when the service stops".

 

2. Oracle related commands

#Start listening

lsnrctl start

#Close the monitor

lsnrctl stop

Use lsnrctl reload to restart the listener. This command can be used in place of lsnrctl stop and lsnrctl start. A restart will read the listener.ora configuration without the need to shut down and start the listener.

 

#Start oradb database service

net start OracleServiceORCL

#Close oradb database service

net stop OracleServiceORCL

 

#Start dbconsole service

emctl start dbconsole

#Stop the dbconsole service

emctl stop dbconsole

 

#start database

system>sqlplus connect sys/sys as sysdba

sql>startup

 

#stop database

sql>shutdown immediate

 

To start or stop a service, you must have sysdba privileges.

 

 

 

shutdown command parameters:

Normal needs to wait for all users to disconnect, and needs to close the database task after all connected users are disconnected, so sometimes it seems that the command is not running! No new connections are allowed after executing this command.

Immediate waits for the user to complete the current statement (recommended), disconnects the user after the user finishes executing the statement being executed, and does not allow new users to connect. 

Transactional waits for the user to complete the current transaction, disconnects after the current transaction is executed, and does not allow new users to connect to the database.  

Abort does not do any waiting, closes the database directly, performs a forced disconnection and closes the database directly.

 

The first three ways do not lose user data. The fourth case is only used for emergency shutdown of the database.

 

 

 

database startup

The database is started using the startup command, which has three situations 

The first: without parameters, start the database instance and open the database so that users can use the database, in most cases, use this method! 

The second: with the nomount parameter, only start the database instance, but do not open the database, use it when you want to create a new database, or use it when you need it! 

The third type: with mount parameter, used when renaming the database. At this point the database is open and ready to use! 

 

other problems:

 

Tip: The environment variable ORACLE_SID is not defined, please define it.

Set ORACLE_SID=WLW (WLW is my instance name and also the service name) C:\Documents and Settings\xcl>set ORACLE_SID=WLW (note the capitalization)

Analysis and solution of Oracle 10g error: shared memory realm does not exist, the situation is as follows: An error occurred when connecting to Oracle 10g: "shared memory realm does not exist", as shown in the following figure:

 

File storage file limitations in hard disk format:

NTFS (Windows): Supports up to 2TB partition and 2TB maximum file

FAT16 (Windows): Support maximum partition 2GB, maximum file 2GB

FAT32 (Windows): Support maximum partition 128GB, maximum file 4GB

HPFS (OS/2): Supports up to 2TB partition and 2GB maximum file

EXT2 and EXT3 (Linux): supports up to 4TB partition and 2GB maximum file

JFS (AIX): support maximum partition 4P (block size=4k), maximum file 4P

XFS (IRIX): This is a serious 64-bit file system that supports 9E (2 to the 63rd power) partition

 

Blog address: http://www.hrblive.com/coder/blog/blog_149.html , please indicate the source for reprinting.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326642251&siteId=291194637