維護表
在可以的情況下,將Null列放置在後面,以節約存儲空間需要注意,如果使用了long或者long raw類型,那麼他們的數據總是放在行的尾部,如果使用了LOB類型並且該別的數據長度超過4000個字節,那麼該列的數據會存放到相應...
管理profile
---表示當嘗試輸入密碼3次,帳號就會被鎖住,鎖住的時間為10天.10天之後自動解鎖.create profile profilename limitfailed_login_attemps 3password_lock_time 10;alter user username profile profilename;表示該...
移動數據文件
在open模式下移動數據文件(不能為system和sysaux),以遷移d:\xxx.dbf 到e:\xxx.dbf1. 首先確定文件所在表空間select tablespace_name from dba_data_files where file_name ='d:\xxx.dbf'; ---假如查詢出來表空間...
修改數據庫的Archive模式
更改Archive Mode首先檢查數據庫的模式 select log_mode from v$database;其次,shutdown數據庫并開啟成mount狀態最後,alter database archivelog或者noarchivelog如果是從noarchive模式修改成Archive模式,另外還...
redo file management
切換日誌:alter system switch logfile;新增日誌組:Alter database add logfile group 6 ('/u01/product/oradata/zh/redo25a.log','/u01/product/oradata/zh/redo25b.log')SIZE 50M;在日誌組中新增日誌文件:alte...
RMAN命令整理
Oracle RMAN 的 show,list,crosscheck,delete命令整理内容转自网络 。。。1、SHOW命令: 显示rman配置: RMAN> show all;2、REPORT命令: 2.1、RMAN> report schema &...
sqlnet.ora 配置
在NET8采用TCP/IP协议时,在oracle9i服务器的sqlnet.ora中进行下列参数的设置可以限制或允许用户从特定的客户机连接到数据库中。 tcp.validnode_checking=yes|no tcp.invited_nodes=(ipaddress|hostname,...) tc...
使用flashback恢復數據
首先建立一個臨時表temptable,表結構與需要恢復的表一致然後執行insert into temptable select * from tablename as of timestamp(sysdata -100/1440)等,表示查詢100分鐘以前的數據還可以SELECT * FROM archive....
Listener 故障侦测(轉載)
Section I: Steps to approach ORA-12518/TNS-12518 Error:ORA-12518/TNS-12518 indicates a problem while listener hands off the client connection to the server process or dispatcher process.TNS-12518...
新增控制文件
假如新增control04spfile:在数据库开启状态,执行alter system set control_fies='control01.ctl','control02.ctl','control03.ctl','control04.ctl' scope=spfile;然后 shutdown immediate之后在os中拷贝 cp...
Oracle开启过程中所做的操作
在Startup nomount状态时,首先读取参数文件,读取的优先级为:spfilesid.ora,spfile.ora,initsid.ora当然也可手动指定pfile的位置第二步:分配SGA第三步:启动后台进程第四步:打开alert日志和trace文件在mount...
配置rsync
配置rsyncA代表Primary B代表Standby1. B机上使用oracle执行$ ssh-keygen -t rsa 会自动在/home/oracle下创建一个.ssh文件夹,里面将会产生两个认证证书 在B机上执行$ssh A date,然后...
創建可寫模式的物化視圖(With Rowid)
1.ROWIDWRITE表結構如下:---位於MYTEST01上CREATE TABLE WISON.ROWIDWRITE( ID INTEGER &nb...
創建可寫模式的物化視圖(With Primary Key)
1.pkwrite表結構如下:---位於MYTEST01上CREATE TABLE WISON.pkwrite( ID INTEGER &nb...
創建只讀模式的物化視圖(With Rowid)
1. 首先在MYTEST上創建表---源數據庫CREATE TABLE WISON.rowidreadonly(NAME VARCHAR2(20),ADDRESS VARCHAR2(20))2. 創建物化視圖日誌---源數據庫CREATE MATERIALIZED VIEW LOG ON WISON.rowidreadonlyTABLE...
建立只讀模式的物化視圖(With Primary Key)
1.pkreadonly表結構如下:---位於MYTEST01上CREATE TABLE WISON.pkreadonly( ID INTEGER &nb...
手动创建oracle数据库
大致包含以下几个步骤:1. 确定sid和数据库名称,一般oracle sid和数据库名称一致.2. 选择一个字符集3. 设置环境变量,主要包括sid以及ORACLE_HOME等.例如:首先在dbs目录下创建xx.env其中内容为:ORACLE_BASE=...
创建pwd文件
orapwd file=orapwsid password=oracle entries=10
物化視圖刷新機制
如果是快速刷新機制,那麼當在源數據庫中變更了記錄(不論新增,刪除,更新),都會在對應的MLOG中記錄對應的變更日誌,這個時候,如果手動將MLOG中的記錄刪除的話,當同步的Job運行時,是不能與源數據庫同...
初学者oracle里常用命令详细讲解
第一章:日志管理 1.forcing log switches sql> alter system switch logfile; 2.forcing checkpoints sql> alter system checkpoint; 3.adding online redo log groups sql> alter database add...