DM8 全备与恢复步骤
本文主要验证DM8全备、增备后,恢复数据库到某个时间点
UNDO、TEMP表空间的切换
UNDO与TEMP表空间的切换是比较常见的操作,一般发生在不小心将表空间设成了Autoextend on 后,导致表空间爆涨,而不得不新建表空间,再将默认UNDO与TEMP表空间切换到新建的表空间上,最后DROP原UNDO与TEMP表空间。[@more@]1、UNDO表空间的切换SQL> create undo tablespace undotbs2 datafile 2 'D:oracleoradataskyundotbs02.dbf' SIZE 40m autoextend off;Tablespace created.SQL> show parameter undoNAME TYPE VALUE------------------------------------ ----------- ------
SQLPLUS中使用new_value把查询结果传给变量
SQLPLUS中new_value的作用还是挺大的。利用这个倒是能解决挺多问题的。引用这么段话:Oracle SQL*Plus has a very useful new sub-parameter to the column parameter called new_value. The new_value directive allows data that has been retrieved from an Oracle table to be stored as a variable inside the SQL*Plus script.By using the new_value parameter you can make your SQL*Plus script behave like a real programming language, storing and addressing program variables, just like in PL/SQL.The ability to store
使用NID更改数据库实例名
1、登陆数据库把数据库变成mount状态[/app/oracle]$ ps -ef|grep pmon oracle 2532 1 0 09:42:18 ? 0:00 ora_pmon_DBATEST oracle 2619 2602 0 09:51:40 pts/ta 0:00 grep pmon[/app/oracle]$ sqlplus "/as sysdba"SQL*Plus: Release 9.2.0.8.0 - Production on Wed Apr 2 09:51:58 2008Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.Connected to:Oracle9i Enterprise Editi
PFILE与SPFILE的一点区别
如果是使用pfile,则对数据库参数的更改,都是相当于memory:MEMORY indicates that the change is made in memory, takes effect immediately, and persists until the database is shut down. If you started up the database using a parameter file (pfile), then this is the only scope you can specify.如果是使用spfile,则对数据库参数的更改,默认是both(memory+spfile)。以下这句话道出了两者的区别:If a server parameter file was used to start up the database, then BOTH is the default. If a parameter file was used t
create procedure的invoker_rights_clause选项
用户A将存储过程P_LS的execute权限赋给用户B,P_LS中包含了一些用户B没有权限的DML操作,那么用户B能成功地执行存储过程P_LS吗?其实就这涉及到了create procedure时invoker_rights_clause的两个选项:1、AUTHID CURRENT_USER2、AUTHID DEFINER(默认)有时赋权时,倒是要注意下这个问题。[@more@]举例说明下这两个选项的使用:SQL> conn a/aConnected to Oracle9i Enterprise Edition Release 9.2.0.1.0 Connected as aSQL> create or replace procedure p_ls is2 begin3 insert into a.t_a values('a');4 commit;5 end p_ls;6 /Pr
使用Opatch打补丁
有些Patch没有setup安装程序,需要使用Oracle的opatch工具安装[@more@]1、下载Opatch的最新版本可以从Metalink下载,参考 Note:224346.1(Opatch - Where Can I Find the Latest Version of Opatch?)2、准备工作# You must have Perl 5.00503 (or later)# installed under the ORACLE_HOME, or elsewhere within the host# environment. OPatch is no longer included in patches as of 9.2.0.2.# Refer to the following link for details on Perl and OPatch:# http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_