[20170329]給oracle啟動加入baner.txt
[20170329]給oracle啟動加入baner.txt
--//測試一下給oracle 啟動加入一個banner,沒有什麼意思,僅僅為了玩.
1.環境:
SYS@book> @ &r/ver1
PORT_STRING VERSION BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
2.修改sqlnet.ora檔案加入:
SEC_USER_AUDIT_ACTION_BANNER=/u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/banner.txt
--//建立banner.txt檔案:
$ cat /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/banner.txt
welcome test oracle!!
3.測試:
--//重啟啟動資料庫:
SYS@book> startup nomount
welcome test oracle!!
ORACLE instance started.
Total System Global Area 634732544 bytes
Fixed Size 2255792 bytes
Variable Size 197133392 bytes
Database Buffers 427819008 bytes
Redo Buffers 7524352 bytes
--//注意看前面提示!!繼續:
SYS@book> alter database mount ;
Database altered.
SYS@book> alter database mount ;
Database altered.
SYS@book> alter database open ;
Database altered.
--//很奇怪如果我直接startup:
SYS@book> startup
welcome test oracle!!
ORACLE instance started.
Total System Global Area 634732544 bytes
Fixed Size 2255792 bytes
Variable Size 197133392 bytes
Database Buffers 427819008 bytes
Redo Buffers 7524352 bytes
Database mounted.
welcome test oracle!!
Database opened.
--//這樣會出現2次,不知道為什麼?
4.登入資料庫測試:
$ rlsql
SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 29 10:23:54 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
welcome test oracle!!
~~~~~~~~~~~~~~~~~~~~~~
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
--//修改檔案banner.txt
$ cat banner.txt
*******************************
* welcome test oracle!! *
*******************************
d:\tools\sqltemp>sqlplus scott/book@78
SQL*Plus: Release 12.1.0.1.0 Production on Wed Mar 29 10:25:33 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
welcome test oracle!!
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
--//奇怪並不是每次登入讀這個檔案.
# lsof | grep -i banner
--//也沒有那個程式開啟這個檔案,做一個跟蹤:
$ strace -o /tmp/aa.txt -f sqlplus scott/book
37816 close(9) = 0
37816 write(1, "welcome test oracle!!\n", 22) = 22
37816 write(1, "\n", 1)
--//跟蹤檔案裡面也沒有開啟banner.txt檔案的控制程式碼.重啟監聽看看:
$ lsnrctl stop ; sleep 1 ; lsnrctl start
$ rlsql
SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 29 10:34:53 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
welcome test oracle!!
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
--//視乎是啟動時讀取一次,放入某個地方,以後不再訪問了.再次重啟.
SYS@book> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@book> startup
*******************************
* welcome test oracle!! *
*******************************
ORACLE instance started.
Total System Global Area 634732544 bytes
Fixed Size 2255792 bytes
Variable Size 197133392 bytes
Database Buffers 427819008 bytes
Redo Buffers 7524352 bytes
Database mounted.
*******************************
* welcome test oracle!! *
*******************************
Database opened.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2136237/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- nginx 加入到開機自動啟動Nginx
- oracle 啟動停止Oracle
- Oracle 啟動命令Oracle
- mac系統,php-fpm加入開機啟動項MacPHP
- UNIX自動啟動oracleOracle
- oracle 隨系統開啟,自動啟動Oracle
- oracle手動啟動服務Oracle
- oracle for linux 自動啟動OracleLinux
- 自動啟動ORACLE Script ServiceOracle
- linux oracle 自動啟動LinuxOracle
- Oracle RAC自啟動Oracle
- oracle開機啟動Oracle
- oracle之啟動errorOracleError
- SCN與oracle啟動Oracle
- ORACLE啟動步驟Oracle
- win7怎麼把軟體加入開機啟動項Win7
- windows開機自動啟動oracleWindowsOracle
- oracle instance and listener自動啟動Oracle
- 讓oracle自動啟動方法!(轉)Oracle
- 檢視oracle啟動方式Oracle
- 判斷oracle是否啟動Oracle
- oracle啟動案例一則Oracle
- oracle啟動與關閉Oracle
- oracle開機自啟動Oracle
- Oracle的啟動過程Oracle
- ORACLE DataGuard 關閉啟動Oracle
- Oracle database的啟動方式OracleDatabase
- 使用命令啟動OracleOracle
- Oracle lsnrctl 無法啟動Oracle
- ORACLE的啟動指令碼Oracle指令碼
- 給你的專案啟動提提速:Lazy Initialization
- 給 .NET 程式加個「設定開機啟動」
- Oracle 12c啟動時PDBs的自動開啟Oracle
- windows下啟動服務時不啟動oracle例項WindowsOracle
- 檢視 Oracle 是用spfile 啟動還是 pfile 啟動Oracle
- 開機自動啟動ORACLE ON LinuxOracleLinux
- 自動重新啟動oracle例項 for windowsOracleWindows
- linux下oracle的自動啟動LinuxOracle