CGML
I saw this from OTN and found it very useful...every programmer wants to be a lazy one, me too...[@more@] Table of Contents How to use the examples Create a header for an insert procedure that accepts as IN arguments every column in a table Create a function to check for equality between two records based on the same table %ROWTYPE Create cursors to query from a table by primary key and foreign keys Generate a procedure to write the contents of a particular table to a file, wit
PGA details --- From itpub.net
PGA分两种管理模式: 1) 手动PGA内存管理,用户指定排序区和散列区所使用的内存,每个连接使用相同的内存。 2) 自动PGA内存管理,告诉Oracle可以使用的PGA的总量,由Oraclce根据系统负载决定具体分配。[@more@]一、概述SGA,PGA,UGA都是Oracle管理的内存区。 SGA(System Global Area),即系统全局区,Oracle中最重要的内存区。PGA(Process Global Area),即程序全局区,一个进程的专用的内存区。UGA(User Global Area),即用户全局区,与特定的会话相关联。专用服务器连接模式,UGA在PGA中分配。共享服务器连接模式,
Upgrade Oracle from 10.2.0.1 To 10.2.0.4
Steps to Upgrade Oracle from 10.2.0.1 To 10.2.0.4[@more@]/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} 1. P
Rman实现数据库迁移 -- ZZ from itpub.net
(从库A迁移到库B) 环境: 服务器A:Oracle10.1.0.3+AS3 服务器B:Oracle10.2.0.1+AS4[@more@]Rman实现数据库迁移(从库A迁移到库B)环境:服务器A:Oracle10.1.0.3+AS3服务器B:Oracle10.2.0.1+AS4准备工作:1 在数据库B上建立与库A相同的目录结构(若由于磁盘空间等原因可以用软链接做到),其中包括: $ORACLE_BASE;$ORACLE_HOME;以及archivelog目录和BASE下的admin目录及其子目录2 在数据库B上安装数据库软件(不建库)实施工作:1 备份:在数据库A上 断开连接到A上的应用,并做全备份 [oracle@rman oradata]$ $ORACLE_HOME/bin/rman Recovery M
Analytic Functions in Oracle
Analytic Functions in Oracle (http://www.akadia.com/services/ora_analytic_functions.html#Example:%20Calculate%20a%20running%20Total)[@more@]Analytic Functions in Oracle 8i and 9iContents Overview and Introduction How Analytic Functions Work The Syntax Calculate a running Total Top-N Queries Example 1 Example 2 Windows Range Windows Compute average salary for defined range Row Windows Accessing Rows Around Your Current Row LAG LEAD
Recover a 9i database from RMAN backup
Recover a 9i database from RMAN backup[@more@]QUESTION=========We suffered a disk failure last week and have to re-install a new solaris 10 on it. Unfortunately we do not have 9i installation disks any more. The failed database was a 9.2.0.8 database. We have full database backup in RMAN and planned to install 10gR2 to the new server. But we have no idea how to use the 9i backup to recover the database to10gR2.RESEARCH==========They are using a recovery catalogThey are backing up to tapeANSWER==
常用SQL
常用SQL[@more@]数据库各个表空间增长情况的检查:SQL>SELECT A.TABLESPACE_NAME,(1-(A.TOTAL)/B.TOTAL)*100 USED_PERCENTFROM (SELECT TABLESPACE_NAME,SUM(BYTES) TOTAL FROM DBA_FREE_SPACE GROUP BY TABLESPACE_NAME) A,(SELECT TABLESPACE_NAME,SUM(BYTES) TOTAL FROM DBA_DATA_FILES GROUP BY TABLESPACE_NAME) B WHERE A.TABLESPACE_NAME=B.TABLESPACE_NAME;SQL>SELECT UPPER(F.TABLESPACE_NAME) "表空间名",D.TOT_GROOTTE_MB "表空间大小(M)", D.TOT_GROOTTE_MB - F.TOTAL_BYTES "已使用空间(M)&q
runInstaller core dumped
ERROR: Unable to convert from "UTF-8" to "646" for NLS! Bus Error - core dumped [@more@]$>ls /usr/lib/iconv |grep UTF-8$>ls /usr/lib/iconv |grep 646copy all the files from another server which has no problem of runInstaller to this directory to resolve this issue.
何去何从?
做了两年DBA,一直在问自己类似的问题。路在何方?34岁了。要在美国扎根,前面的路该怎么走?[@more@]做了两年DBA,一直在问自己类似的问题。路在何方?34岁了。要在美国扎根,前面的路该怎么走?1) 钻DBA技术,肯定可以过上中等的稳定的生活。上管理层?大概45岁左右吧,可以做项目经理的位置?之后呢?再继续爬?退休时可以到达什么样的高度呢?估计是Director的位置。VP也有机会。大约200K~300K年薪。2) 横向发展,学应用方面的东西?太多太杂,如果公司不用,就是浪费时间和经历。了解是需要的,但不要花太多精力。和1是一样的出路
VERITAS conflicts with ASM?
ASM could not find the diskgroup on VERISTA...[@more@]Subject: Create Partitions in Solaris and add them as disks in ASM Doc ID: Note:271621.1 Type: HOWTO Last Revision Date: 16-JUN-2004 Status: PUBLISHED The information in this article applies to: Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 10.1.0.2Solaris Operating System (x86)Solaris Operating System (SPARC 64-bit)Solaris Operating System (SPARC 32-bit)Goal1) To understand how to partition disk in solaris.2) How to make
Start up CSS for ASM instance creation
The CSS was killed and could not be started up. Got ORA-29701 error during ASM creation using dbca. I checked metalink and got the following documents(314173,459775,429214), but could not work it out.Called Oracle Support, they provided the solution.[@more@]ACTION PLAN===========1) Collect information about removing the OCSSD configuration: ======================================== script /tmp/localconfig_del.log date id env sh -x $ORACLE_HOME/bin/localconfig delete exit =========================
How to run GUI in Unix
To use DBCA to install an Oracle instance, you have to enable the Xterm. This article tells you how to use your windows machine to install a Oracle DB on a remote Unix server.[@more@]1)start cygwin2)/usr/bin 3)run startx4)see the XTerm pop up5)ssh -Y ken.kenchendz.com6)try xclock...you are there now!
Look inside ASM disk groups
In 10g, Oracle introduced a new kind of storage for its database product. Automatic Storage Management (ASM) is a logical volume manager that takes physical disk partitions and manages their contents in a way that efficiently supports the files needed to create an Oracle database.[@more@]In 10g, Oracle introduced a new kind of storage for its database product. Automatic Storage Management (ASM) is a logical volume manager that takes physical disk partitions and manages their contents in a way th
Linux Rescue Mode
When things go wrong, there are ways to fix problems. However, these methods require that you understand the system well. This chapter describes how to boot into rescue mode and single user mode, where you can use your own knowledge to repair the system. [@more@]What is Rescue Mode?Rescue mode provides the ability to boot a small Linux environment entirely from a diskette, CD-ROM, or using some other method. As the name implies, rescue mode is provided to rescue you from something. During normal
Adding Swap Space
Sometimes it is necessary to add more swap space after installation. For example, you may upgrade the amount of RAM in your system from 64 MB to 128 MB, but there is only 128 MB of swap space. It might be advantageous to increase the amount of swap space to 256 MB if you perform memory-intense operations or run applications that require a large amount of memory. You have two options: add a swap partition or add a swap file. It is recommended that you add a swap partition, but sometimes that is n
To deal with Hanging sessions
1) Hanging sessions broken by network issue--find the sessions whose wait time has been over 10K seconds.--killl them.2)If you remove trace files being used by a active session, the disk space will not release, you have to kill those sessions to release the space.[@more@]
To disable the '^H^H^H^H' characters in Unix when you press backspace
stty erase ^H(backspace)[@more@]
open database with corrupted reset logs
**********Warning*************Be careful and think, think, and think again before using this parameter!!!Backup the database(datafiles) before trying this parameter!!! [@more@]_allow_reset_corruption=TRUE
Get hardware data
1)uname -aSample output: SunOS oradev03 5.8 Generic_117350-46 sun4u sparc SUNW,Sun-Fire-V2402)ip addressnetstat -n3)get CPU and Memory statustop4)get net port informationnetstat -ain[@more@]
System monitoring
1) check if a session is running2)check CPU and Memorytop[@more@]