数据库恢复&迁移
----------------------------------------------backup databaseThe following example creates a level 0 incremental backup to serve as a base for an incremental backup strategy: BACKUP INCREMENTAL LEVEL 0 DATABASE;The following example creates a level 1 cumulative incremental bac...
大数据表的索引创建方式
大数据表的索引创建在不影响业务的情况下,必须使用online关键字:CREATE INDEX emp_name ON emp (mgr, emp1, emp2, emp3) ONLINE;
持续近7个小时的索引扫描的查询优化分析
昨天客户的DBA反映有一个数据抽取的任务持续了很长时间最后超时退出了,让我看看有什么地方可以调优一下。找到了对应的日志,发现在一个大表抽取的时候,抽取持续了将近7个小时,最后超时退出了。对于这个问题,有以下几个方面需要考虑一下。1)为什么这个问题之前没有发现过2)是否是由某些变化导致了这个问题3)这个...
数据库hang住的处理方式
1. 使用-prelim方式登录数据库export ORACLE_SID=orclsqlplus -prelim / as sysdbaoradebug setmypidoradebug unlimit;oredebug dump systemstate 102. 使用操作系统的pstack或gdb工具dump相关进程script stack.logpstack pstack
silent安装
无响应文件的oracle静默安装方式:11gR2 :$ ./runInstaller -silent -debug -force \FROM_LOCATION=${PKG_INSTALL_PATH}/database/stage/products.xml \oracle.install.option=INSTALL_DB_SWONLY \UNIX_GROUP_NAME=oinstall \INVENTORY_LOCATION=/opt/oracle/oraInventory \ORACLE_HOME=/opt/oracle/app/oracle/pr...
使用存储过程批量复制表
--1.在数据库上创建到其他远端数据库的db link --2.若是当前用户创建其他用户的表,则须赋予create any table和drop any table的权限 --3.创建批量创建并复制表的存储过程 ----p_createtb过程...
Flashback被删除的表数据
----审计查询对表进行的操作SQL>select empno,ename,sal,versions_operation,versions_xid,versions_starttime from scott.emp2 versionsbetween timestamp minvalue and maxvalue order by empno,version...
TAF设置
在面试的时候遇到的一个问题:如何设置TAF模式?今天记录下来,以备参考。如果使用Toad或客户端的UI设置taf将很容易实现,前提是你的数据库使用的是RAC模式,配置完后具体的内容将写入tnsname.ora文件中TAF設置...
常用oracle监控语句
1.监控事例的等待:select event,sum(decode(wait_time,0,0,1)) prev, sum(decode(wait_time,0,1,0)) curr,count(*) from v$session_wait group by event order by 4;2.回滚段的争用情况:select name,waits,g...