Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Login.sql cannot be used after Oracle11.2.0.4 upgrades 170418PATCH

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Recently, the database on production has been upgraded to the current 11.2.0.4 PATCH--170418, but when you log in to the database using sqlplus, you find something different from the previous login.

Screenshot of login before playing PATCH:

Screenshot of login after hitting PATCH:

What you can see intuitively from the screenshot is that the login information is not displayed, but in fact all the previous configurations for sqlplus are not in effect. What is the reason for this.

Let's first take a look at the sqlplus startup process:

Sqlplus automatically runs two scripts when it starts: glogin.sql and login.sql.

The order of execution is

1. The default is to find the glogin.sql file under the $ORACLE_HOME/sqlplus/admin path.

two。 The default is to find the login.sql file under the current path, and execute 3 if the corresponding file is not found.

3. Determine whether to set the SQLPATH environment variable. If the variable is set, it will be searched and executed under the corresponding path. If it is not found, the search will stop.

You can add some common settings to the login.sql file to make it easier to use SQLPLUS.

The SQLPATH environment variable is set in the current system, and there is also a login.sql file in the directory, which contains all the settings for sqlplus. So why doesn't the configuration take effect while the environment variables remain unchanged?

Try to call login.sql directly

Without any reaction, and thinking that you can ignore the suffix when calling the SQL file, try again.

You can see the desired display from the image above.

Is it caused by hitting the PATCH bag? So do the test in the virtual machine, because the latest PATCH has been hit on the virtual machine, the direct test calling login.sql file is consistent with the production phenomenon. So roll back the latest PATCH

Opatch rollback-id 24732075

After rolling back the latest PATCH, log in to the database by sqlplus again, and the settings for sqlplus in the login.sql file return to normal.

It is not clear whether there is a problem with BUG or the way it is upgraded.

How to handle it: since you can call login directly, add @ $SQLPATH/login to the glogin.sql, and the login is restored as before.

Reference: http://www.jb51.net/article/78543.htm

Http://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_two.htm#i1133106

How to Maintain SQL*Plus System Variable/Column Format Settings (document ID 1039268.6)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report