oracle9i SQL Scripts
在建立oracle9i 資料庫時,要執行指令碼來建立資料字典等。
這些指令碼有哪些?各有什麼作用?[@more@]
解:
references << C:DownloadsB10501_01server.920a96536ch53.htm >>
create database ...; 呼叫了 sql.bsq
建立資料字典有三個指令碼:
catalog.sql 必需
catproc.sql 必需
catclust.sql RAC必需
------------------------------------------------------------------
其它常用指令碼說明:
ScriptName NeededFor Run By Description
----------- ------------------------ --------- -------------------------------------
catblock.sql Performance management sys
catexp7.sql Exporting data to Oracle7 SYS
catoctk.sql Security SYS Creates the Oracle Cryptographic Toolkit package
dbmspool.sql Performance management SYS or SYSDBA Enables DBA to lock PL/SQL packages, SQL statements, and triggers into the shared pool
utlexpt1.sql Constraints Any user Creates the default table (EXCEPTIONS) for storing exceptions from enabling constraints. Can handle both physical and logical rowids.
(這個在資料去重時用到。另外一個名稱是utlexcpt.sql 內容一樣,前者是1999年echong修改過的。後者是92年glumpkin從EXCEPT.SQL 改名來的。
@?/rdbms/admin/utlexcpt.sql
alter table cz add constraint cz_unique unique(c1,c10,c20) exceptions into exceptions;
create table dups as select * from cz where rowid in (select row_id from exceptions);
delete from cz where rowid in ( select row_id from exceptions);
insert into cz select distinct * from dups;
select *from cz;
到oracle10g之後,省事兒,去重可以使用insert into error logging子句了。參考另外一個筆記。
)
utllockt.sql Performance monitoring SYS or SYSDBA Displays a lock wait-for graph, in tree structure format
(使用這個utllockt.sql 可以隨時查詢會話之間鎖的等待 執行之前,
set linesize 120
@?/rdbms/admin/utllockt
)
utlrp.sql PL/SQL SYS Recompiles all existing PL/SQL modules that were previously in an INVALID state, such as packages, procedures, and types.
utlsampl.sql Examples SYS or any user with DBA role Creates sample tables, such as emp and dept, and users, such as scott
(要新增scott使用者,來做練習,用這個建scott使用者 和 emp 表)
utltkprf.sql Performance management SYS Creates the TKPROFER role to allow the TKPROF profiling utility to be run by non-DBA users
(alter session set sql_trace=true;
alter session set timed_statistics=true;
alter session set max_dump_file_size=unlimited;
Alter session set SQL_Trace = true;
執行應用程式
Alter session set SQL_Trace=false;
TKPROF inputfile outputfile [optional Parameters]
tkprof orclshad.trc trace.out sys=no explain=scott/tiger
)
utlvalid.sql Partitioned tables Any user Creates tables required for storing output of ANALYZE TABLE ...VALIDATE STRUCTURE of a partitioned table
(如果要對分割槽表進行analyze , 需要先執行這個指令碼,否則報ORA-14508
e.g ANALYZE TABLE myparttable validate structure cascade;
)
utlxplan.sql Performance management Any user Creates the table PLAN_TABLE, which holds output from the EXPLAIN PLAN statement
(@utlxplan.sql ; explain plan for select ... ; @utlxplp.sql)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/271063/viewspace-1060532/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle9i中v$sql、v$sqlarea、v$sqltext、v$sql_plan的聯絡與區別OracleSQL
- 神奇的npm -- scriptsNPM
- vscode commitlint(debug npm scripts)VSCodeMITNPM
- npm package.json scriptsNPMPackageJSON
- 什麼是 WEbExtend Scripts for Emarsys?Web
- PostgreSQL DBA(147) - pgAdmin(Scripts for freeze)SQL
- Oracle Advanced Performance Tuning Scripts(轉)OracleORM
- oracle9i下streams複製(zt)Oracle
- 5.npm scripts 使用指南NPM
- 你真的熟悉 npm-scripts 嗎?NPM
- npm scripts的生命週期管理NPM
- 你真的瞭解npm-scripts嗎?NPM
- ORACLE9I升級到10G(zt)Oracle
- 設定Oracle9i為自動歸檔模式Oracle模式
- Element package.json 中的 scripts 分析 —— "build:file"PackageJSONUI
- 也許你不知道的npm-scriptsNPM
- create-react-app 原始碼解析之react-scriptsReactAPP原始碼
- Oracle9i如何監視索引並清除監視資訊(轉)Oracle索引
- pytest 報錯原因是什麼?pytest 通過 pip install 安裝,在 Scripts 資料夾。test_sample 也放在 Scripts 資料夾內
- 在Oracle9i中,如何監視索引並清除監視資訊Oracle索引
- Vue.js原始碼解析-從scripts指令碼看vue構建Vue.js原始碼指令碼
- Oracle9i RMAN 的優缺點及RMAN 備份及恢復步驟Oracle
- firebug真是除錯客戶端瀏覽器scripts的好幫手除錯客戶端瀏覽器
- 鳥哥的Linux私房菜基礎篇 第十三章 shell scriptsLinux
- fiddler scripts 新增儲存請求報文到本地,一直報錯 Fiddlerscript OnBoreRequest () failedAI
- 解釋nginx.conf.default 中關於fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;NginxAST
- 【SQL】17 SQL 檢視(Views)、SQL Date 函式、SQL NULL 值、SQLView函式Null
- SQL------SQL效能分析SQL
- SQL注射/SQL Injection漏洞SQL
- 【SQL】19 SQL函式SQL函式
- 【SQL】13 SQL 別名、SQL 連線(JOIN)、SQL INNER JOIN 關鍵字、SQL LEFT JOIN 關鍵字、SQL RIGHT JOIN 關鍵字、SQL FULL OUTER JSQL
- 【SQL】9 SQL INSERT INTO 語句SQL
- 【SQL】10 SQL UPDATE 語句SQL
- 【SQL】11 SQL DELETE 語句SQLdelete
- 【SQL】Oracle 19c SQL隔離詳解(SQL Quarantine)SQLOracle
- SQLSQL
- 【SQL】SQL中if條件的使用SQL
- SQL 已死,但 SQL 將永存!SQL
- False SQL Injection and Advanced Blind SQL InjectionFalseSQL