做一名精致的DBA之glogin.sql
发表于:2024-10-19 作者:千家信息网编辑
千家信息网最后更新 2024年10月19日,对于一个成熟的dba必须要熟悉glogin.sql这个文件,然后利用它,更好的规避一些操作风险。1、查看glogin.sql内容$more glogin.sql---- Copyright (c) 1
千家信息网最后更新 2024年10月19日做一名精致的DBA之glogin.sql
对于一个成熟的dba必须要熟悉glogin.sql这个文件,然后利用它,更好的规避一些操作风险。
1、查看glogin.sql内容
$more 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 a-- user starts SQL*Plus, or uses the SQL*Plus CONNECT command.---- USAGE ##用法-- This script is automatically run--
实际上就是登陆数据库可以自动执行的一个脚本,简单可以这样理解。
2、添加内容
以下内容是我们可以添加的,我们根据我们的需要添加。
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>
这里我添加几个常用的,也是我在生产环境上添加的。
set linesize 200 pagesize 50set sqlprompt "_user'@'_connect_identifier> "define_editor=vi
添加的文件内容
$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 a-- user starts SQL*Plus, or uses the SQL*Plus CONNECT command.---- USAGE-- This script is automatically run--set linesize 132 pagesize 50set sqlprompt "_user'@'_connect_identifier> "define_editor=vi
3、大家看一下结果:
$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>
小结:
当我们管理多套数据库的时候,可能同时登陆到几套数据库,为了防止出现操作失误的情况,建议大家配置一下glogin.sql,可以时刻提示我们在那套数据库上进行操作,对数据库的操作多谨慎都不为过。
数据
数据库
内容
文件
登陆
成熟
不为过
同时
多套
实际
实际上
小结
就是
常用
建议
情况
文件名
时候
时刻
环境
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
双十一数据库技术峰会
宝塔数据库关闭状态无法启动
软件开发公司折旧费
网络安全规划与实施作文
服务器压力测试阶段
后端数据库怎么保证安全
数据库缓存技术redis
互联网消费金融科技有限公司
青海网络卫星授时服务器
网络安全青年争先手操报
esi数据库入口
东西湖区 网络安全产业港
聚创互联网科技
阿里云服务器异地登陆
电脑服务器管理器下载软件
华硕路由器服务器名称和密码
杨浦区上门软件开发定制报价表
计算机网络技术专科编码
湖北web前端软件开发哪家便宜
柬埔寨的网络安全
asp服务器 aspx
莱芜奥赛网络技术
文件系统和数据库系统区别和联系
互联网女皇 金融科技
永安app软件开发哪家靠谱
单位网络安全改造申请
软件开发中的解耦
广东寰球互联网络科技有限公司
网络安全小报里的内容应该怎么写
计算机网络技术产业