制定备份工作计划表
第3章
sql>create temporary tablespace temp2 tempfile 'c:\xxxxxxxx\xx.dbf' size 100m extent management local uniform. size 128k;
启动丢失临时文件得数据库
COMMAND>SQLPLUS /NOLOG
sql>connect / as sysdba
sql>startup mount
sql>drop tablespace temp including contents;
sql>create temporary tablespace temp2 tempfile 'c:\xxxxxxxx\xx.dbf' size 100m extent management local uniform. size 128k;
改变数据库得默认临时表空间
sql>alter database default temporary tablespace temp2;
重建重执行日志文件
。。。。
sql>alter database drop logfile member 'c:\oracle\oradata\ora101t\redo01.log';
sql>alter database add logfile member 'c:\oracle\oradata\ora101t\redo01.log' to group 1;
恢复索引表空间
SQLPLUS /NOLOG
sql>connect / as sysdba
sql>startup
sql>drop tablespace indexes including contents;
sql>create tablespace indexes datafile 'c:\oracle\oradata\ora1010t\index01.dbf' size 20m;
重建索引
CREATE UNIQUE INDEX example_index_pk
ON EXAMPLE_table
(column_one,
column_two,
column_three,
column_four)
PCTFREE 10
INITRANS 2
MAXTRANX 255
TABLESPACE indexes
STORAGE(
initial 1m
next 1m
PCTINCREASE 0
MINEXTENTS 1
MAXEXTENTS 8192
)
NOLOGGING
PARALLEL (degree 4)
/
sql>@create_example_index_pk
恢复只读表空军
SQL>ALTER tablespace users read only;
sql>alter system switch logfile;
sql>alter system switch logfile;
sql>alter system switch logfile;
sql>alter system switch logfile;
sql>shutdown immediate
sql>host
command> cd c:\oracle\oradata\backup\ora101t
command>copy c:\oracle\oradata\ora101t\*
command cd ..\..\ora101t
command>delete users01.dbf
sql>startu
sql>shutdown immediate
sql>host
command>cd c:\oracle\oradata\ora101t
command>copy c:\oracle\oradata\backup\ora101t\users01.dbf users01.dbf
command>exit
sql>startup
重建密码文件
SQL>SHUTDOWN IMMEDIATE
SQL>SELECT * FROM V$PWFILE_USERS;