In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
For a mature dba, you must be familiar with the glogin.sql file, and then use it to better avoid some operational risks.
1. View glogin.sql content
$more glogin.sql---- Copyright (c) 1988, 2011, Oracle and/or its affiliates. -- All rights reserved. -NAME # # filename-- glogin.sql---- DESCRIPTION # # description-- SQL*Plus global login "site profile" file---- Add any SQL*Plus commands here that are to be executed when Amure-user starts SQL*Plus, or uses the SQL*Plus CONNECT command.---- USAGE # # usage-This script is automatically run--
It is actually a script that can be executed automatically by logging in to the database, which can be understood in this way.
2. Add content
The following is something we can add, and we can add it according to our needs.
SQL > defineDEFINE _ DATE = "13-FEB-2018 21:05:01" (CHAR) DEFINE _ CONNECT_IDENTIFIER = "orcl" (CHAR) DEFINE _ USER = "SYS" (CHAR) DEFINE _ PRIVILEGE = "AS SYSDBA" (CHAR) DEFINE _ SQLPLUS_RELEASE = "1102000400" (CHAR) DEFINE _ EDITOR = "ed" (CHAR) DEFINE _ O_VERSION = "Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit ProductionWith the Partitioning, OLAP Data Mining and Real Application Testing options "(CHAR) DEFINE _ O_RELEASE =" 1102000400 "(CHAR) SQL >
Here I add a few commonly used ones, which I also added in the production environment.
Set linesize 200 pagesize 50set sqlprompt "_ user'@'_connect_identifier >" define_editor=vi
Added contents of the file
$vi glogin.sql-Copyright (c) 1988, 2011, Oracle and/or its affiliates. -- All rights reserved. -NAME-- glogin.sql---- DESCRIPTION-- SQL*Plus global login "site profile" file---- Add any SQL*Plus commands here that are to be executed when Amuri-user starts SQL*Plus, or uses the SQL*Plus CONNECT command.---- USAGE-- This script is automatically run--set linesize 132pagesize 50set sqlprompt "_ user'@'_connect_identifier >" define_editor=vi
3. Let's take a look at the results:
Sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Tue Feb 13 21:13:40 2018Copyright (c) 1982, 2013, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSYS@orcl >
Summary:
When we manage multiple sets of databases, we may log in to several sets of databases at the same time. In order to prevent operational errors, it is recommended that we configure glogin.sql, which can always prompt us to operate on that set of databases. We cannot be too cautious about the operation of the database.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.