oracle學習(4) -資料庫檔案
1、引數檔案
a、遺留的init.ora
檔案命名約定預設為:
init$ORACLE_SID.ora(UNIX)
init%ORACLE_SID%.ora(UNIX)
預設目錄:
$ORACLE_HOME/dbs (UNIX)
%ORACLE_HOME%/database (WINDOW)
b、spfile
檔案命名:
spfile$ORACLE_SID.ora (unix)
spfile%ORACLE_SID%.ora(window)
轉換
create spfile from pfile
設定spfile引數語句
alter system set parameter=value
取消引數設定
alter system reset parameter sid='sid|*'
從spfile建立pfile
create pfile =‘filename’ from spfile
2、跟蹤檔案
a、開啟
alter system set sql_trace=true
alter session set events '10046 trace name context forever, leve 12'
b、檔案位置
select name, value from v$parameter where name like '%dump_dest%' 得到檔案位置
background_dump_dest:共享伺服器檔案
user_dump_dest:專用伺服器檔案
core_dump_dest:核心檔案
c、檔案命名
select c.value || '\' || d.instance_name || '_ora_' || a.spid || '.trc' trace
from v$process a, v$session b, v$parameter c, v$instance d
where a.ADDR = b.PADDR
and b.AUDSID = userenv('sessionid')
and c.name = 'user_dump_dest'
得到的檔名稱:D:\ORACLE\PRODUCT\10.2.0\ADMIN\PSM\UDUMP\psm_ora_8936.trc
4、密碼檔案
a、使用密碼檔案
alter system set remote_login_passwordfile=exclusive|shared scope=spfile
b、建立密碼檔案
orapwd file=prapw$ORCLE_SID password=bar entries=20
c、連結測試
sqlplus sys/bar@192.168.0.44 as sysdba
d、為其他使用者授權,使其能夠登入
grant sysdba to somebody
e、其他使用者登入
sqlplus somebody/bar@192.168.0.44 as sysdba
f、更改密碼
alter user somebody identified by bar;
5、跟蹤檔案
建立跟蹤檔案
alter database enable block change tracking
關閉和刪除檔案
alter database disable block change tracking
a、遺留的init.ora
檔案命名約定預設為:
init$ORACLE_SID.ora(UNIX)
init%ORACLE_SID%.ora(UNIX)
預設目錄:
$ORACLE_HOME/dbs (UNIX)
%ORACLE_HOME%/database (WINDOW)
b、spfile
檔案命名:
spfile$ORACLE_SID.ora (unix)
spfile%ORACLE_SID%.ora(window)
轉換
create spfile from pfile
設定spfile引數語句
alter system set parameter=value
取消引數設定
alter system reset parameter
從spfile建立pfile
create pfile =‘filename’ from spfile
2、跟蹤檔案
a、開啟
alter system set sql_trace=true
alter session set events '10046 trace name context forever, leve 12'
b、檔案位置
select name, value from v$parameter where name like '%dump_dest%' 得到檔案位置
background_dump_dest:共享伺服器檔案
user_dump_dest:專用伺服器檔案
core_dump_dest:核心檔案
c、檔案命名
select c.value || '\' || d.instance_name || '_ora_' || a.spid || '.trc' trace
from v$process a, v$session b, v$parameter c, v$instance d
where a.ADDR = b.PADDR
and b.AUDSID = userenv('sessionid')
and c.name = 'user_dump_dest'
得到的檔名稱:D:\ORACLE\PRODUCT\10.2.0\ADMIN\PSM\UDUMP\psm_ora_8936.trc
新增跟蹤檔案標記
alter session tracefile_identifier='Look_For_me'
跟蹤檔名稱變為:psm_ora_8936_Look_For_me.trc
alter session tracefile_identifier='Look_For_me'
跟蹤檔名稱變為:psm_ora_8936_Look_For_me.trc
4、密碼檔案
a、使用密碼檔案
alter system set remote_login_passwordfile=exclusive|shared scope=spfile
b、建立密碼檔案
orapwd file=prapw$ORCLE_SID password=bar entries=20
c、連結測試
sqlplus sys/bar@192.168.0.44 as sysdba
d、為其他使用者授權,使其能夠登入
grant sysdba to somebody
e、其他使用者登入
sqlplus somebody/bar@192.168.0.44 as sysdba
f、更改密碼
alter user somebody identified by bar;
5、跟蹤檔案
建立跟蹤檔案
alter database enable block change tracking
關閉和刪除檔案
alter database disable block change tracking
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10712951/viewspace-1245317/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 資料庫學習:在資料庫中存取檔案(轉)資料庫
- mysql學習9:第四章:資料庫檔案--檔案MySql資料庫
- 【學習日記】oracle之表空間、資料檔案、控制檔案Oracle
- oracle資料庫的配置檔案Oracle資料庫
- 重建Oracle資料庫控制檔案Oracle資料庫
- oracle資料庫移動資料檔案、日誌檔案和控制檔案Oracle資料庫
- mysql學習8:第四章:資料庫檔案--日誌檔案MySql資料庫
- oracle資料庫redo檔案的blocksizeOracle資料庫BloC
- 為oracle資料庫建立口令檔案Oracle資料庫
- Oracle資料庫檔案遷移步驟Oracle資料庫
- 在ORACLE移動資料庫檔案Oracle資料庫
- 建立資料庫檔案-日誌檔案-次要資料庫檔案資料庫
- Oracle資料庫聯機日誌檔案丟失處理方法(4)Oracle資料庫
- RMAN學習-資料檔案損壞
- oracle uncatalog資料庫備份檔案Oracle資料庫
- oracle dg庫資料檔案空間不足Oracle
- oracle 資料庫兩種引數檔案Oracle資料庫
- oracle9i 檔案資料庫建立Oracle資料庫
- 分析Oracle資料庫日誌檔案(1)Oracle資料庫
- 分析Oracle資料庫日誌檔案(2)Oracle資料庫
- 分析Oracle資料庫日誌檔案(3)Oracle資料庫
- 檔案插入 Oracle資料庫 Blob型別Oracle資料庫型別
- 在ORACLE中移動資料庫檔案Oracle資料庫
- 【DB 2學習】檢視一個資料庫的配置檔案資料庫
- oracle的profile檔案學習Oracle
- 【從零開始學習Oracle資料庫】(4)建立表與增刪改和資料庫事務Oracle資料庫
- Oracle資料庫資料檔案small file的最大值Oracle資料庫
- Oracle資料庫表空間的資料檔案大小上限。Oracle資料庫
- mysql學習7:第四章:資料庫檔案--引數檔案和型別MySql資料庫型別
- 分析Oracle資料庫日誌檔案(三)EPOracle資料庫
- 分析Oracle資料庫日誌檔案(二)DOOracle資料庫
- 分析Oracle資料庫日誌檔案(一)HBOracle資料庫
- Oracle資料庫新增和移動控制檔案Oracle資料庫
- 誤刪oracle資料庫表空間檔案Oracle資料庫
- 分析Oracle資料庫日誌檔案(1)(轉)Oracle資料庫
- 分析Oracle資料庫日誌檔案(1) [轉]Oracle資料庫
- 在ORACLE中移動資料庫檔案(轉)Oracle資料庫
- 資料庫檔案和檔案組資料庫