1、shutdown normal
站在用戶的角度思考問題,與客戶深入溝通,找到崇川網(wǎng)站設(shè)計(jì)與崇川網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗(yàn),讓設(shè)計(jì)與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個(gè)性化、用戶體驗(yàn)好的作品,建站類型包括:做網(wǎng)站、網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、主機(jī)域名、網(wǎng)站空間、企業(yè)郵箱。業(yè)務(wù)覆蓋崇川地區(qū)。
正常方式關(guān)閉數(shù)據(jù)庫(kù)。
2、shutdown immediate
立即方式關(guān)閉數(shù)據(jù)庫(kù)。
在SVRMGRL中執(zhí)行shutdown immediate,數(shù)據(jù)庫(kù)并不立即關(guān)閉,
而是在Oracle執(zhí)行某些清除工作后才關(guān)閉(終止會(huì)話、釋放會(huì)話資源),
當(dāng)使用shutdown不能關(guān)閉數(shù)據(jù)庫(kù)時(shí),shutdown immediate可以完成數(shù)據(jù)庫(kù)關(guān)閉的操作。
3、shutdown abort
直接關(guān)閉數(shù)據(jù)庫(kù),正在訪問數(shù)據(jù)庫(kù)的會(huì)話會(huì)被突然終止,
關(guān)閉的指令是 shutdown immediate ;
如果有正在增刪改之類的操作,數(shù)據(jù)庫(kù)會(huì)等操作完成后進(jìn)行關(guān)機(jī),如果沒有進(jìn)程在做增刪改操作則很快就會(huì)關(guān)閉數(shù)據(jù)庫(kù)了。
如果一直沒有關(guān)閉系統(tǒng),你可以嘗試用 shutdown abort 來(lái)強(qiáng)制關(guān)閉oracle系統(tǒng),不過不建議這么做,容易引起數(shù)據(jù)錯(cuò)亂或者發(fā)生未知后果的錯(cuò)誤。
1、以oracle用戶登錄系統(tǒng),如果是root用戶,使用su - oracle切換用戶。
2、以oracle用戶cd到oracle的bin目錄,cd $ORACLE_HOME/bin。
3、以nolog方式運(yùn)行sqlplus。
4、以sysdba連接數(shù)據(jù)庫(kù),如下SQL conn /as sysdba。
5、輸入用戶名sys 和密碼。
6、啟動(dòng)數(shù)據(jù)庫(kù)實(shí)例,SQL startup;等待片刻,等到database opened就是打開數(shù)據(jù)庫(kù)實(shí)例成功了。
7、使用命令shutdown abort ?;或者? shutdown immediate?;?關(guān)閉數(shù)據(jù)庫(kù)。
在oracle11g中,數(shù)據(jù)庫(kù)的審計(jì)功能是默認(rèn)開啟的(這和oracle10g的不一樣,10g默認(rèn)是關(guān)閉的),\x0d\x0aoracle11gR2的官方文檔上寫的是錯(cuò)的,當(dāng)上說default是none,而且是審計(jì)到DB級(jí)別的,這樣就會(huì)\x0d\x0a往aud$表里記錄統(tǒng)計(jì)信息。\x0d\x0a \x0d\x0a1.如果審計(jì)不是必須的,可以關(guān)掉審計(jì)功能;\x0d\x0a\x0d\x0aSQL show parameter audit_trail;\x0d\x0a\x0d\x0aNAME TYPE VALUE\x0d\x0a------------------------------------ ----------- ------------------------------\x0d\x0aaudit_trail string DB\x0d\x0a\x0d\x0aSQL alter system set audit_trail=none scope=spfile;\x0d\x0aSQL shut immediate;\x0d\x0aSQLstartup\x0d\x0a2.刪除已有的審計(jì)信息\x0d\x0a可以直接truncate表aud$,\x0d\x0atruncate table SYS.AUD$;\x0d\x0a\x0d\x0a3.或者將aud$表移到另外一個(gè)表空間下,以減少system表空間的壓力和被撐爆的風(fēng)險(xiǎn)。\x0d\x0a \x0d\x0a附:11g中有關(guān)audit_trail參數(shù)的設(shè)置說明:\x0d\x0aAUDIT_TRAIL\x0d\x0aProperty Description\x0d\x0aParameter type String\x0d\x0aSyntaxAUDIT_TRAIL = { none | os | db [, extended] | xml [, extended] }\x0d\x0aDefault valuenone\x0d\x0aModifiable No\x0d\x0aBasic No\x0d\x0aAUDIT_TRAIL enables or disables database auditing.\x0d\x0aValues:\x0d\x0anone\x0d\x0aDisables standard auditing. This value is the default if the AUDIT_TRAIL parameter was not set \x0d\x0ain the initialization parameter file or if you created the database using a method other than \x0d\x0aDatabase Configuration Assistant. If you created the database using Database Configuration \x0d\x0aAssistant, then the default is db.\x0d\x0aos\x0d\x0aDirects all audit records to an operating system file. Oracle recommends that you use the os \x0d\x0asetting, particularly if you are using an ultra-secure database configuration.\x0d\x0adb\x0d\x0aDirects audit records to the database audit trail (the SYS.AUD$ table), except for records \x0d\x0athat are always written to the operating system audit trail. Use this setting for a general \x0d\x0adatabase for manageability.\x0d\x0aIf the database was started in read-only mode with AUDIT_TRAIL set to db, then Oracle Database \x0d\x0ainternally sets AUDIT_TRAIL to os. Check the alert log for details.\x0d\x0adb, extended\x0d\x0aPerforms all actions of AUDIT_TRAIL=db, and also populates the SQL bind and SQL text CLOB-type \x0d\x0acolumns of the SYS.AUD$ table, when available. These two columns are populated only when this \x0d\x0aparameter is specified.\x0d\x0aIf the database was started in read-only mode with AUDIT_TRAIL set to db, extended, then Oracle \x0d\x0aDatabase internally sets AUDIT_TRAIL to os. Check the alert log for details.\x0d\x0axml\x0d\x0aWrites to the operating system audit record file in XML format. Records all elements of the \x0d\x0aAuditRecord node except Sql_Text and Sql_Bind to the operating system XML audit file.\x0d\x0axml, extended\x0d\x0aPerforms all actions of AUDIT_TRAIL=xml, and populates the SQL bind and SQL text CLOB-type columns\x0d\x0a of the SYS.AUD$ table, wherever possible. These columns are populated only when this parameter \x0d\x0ais specified.\x0d\x0aYou can use the SQL AUDIT statement to set auditing options regardless of the setting of this \x0d\x0aparameter.
在服務(wù)中直接停止即可。
1、以windows10為例,右鍵“此電腦”,選擇“管理”。
2、然后選擇“服務(wù)和應(yīng)用程序”——“服務(wù)”。
3、找到oracle的服務(wù),一般名稱為oracleservice+實(shí)例名。
4 ?、右鍵,選擇停止,等待執(zhí)行完畢即可。