常用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@]
Finding tips
1) Find some files and execute other commands on them;find / -name scpfind ./ -atime +2 -exec rm '{}' ';'2)Find where is the original commandwhich sshwhich scp[@more@]
Imp/Exp-Basic rules
Always use the lower version to export.[@more@]Whenever you are moving data between different releases of the Oracle database, the following basic rules apply:* The Import utility and the database to which data is being imported (the target database) must be the same version.* The version of the Export utility must be equal to the earliest version of the source or target database.For example, to create an export file for an import into a later release database, use a version of the Export utilit
Clone a Database
1, generate txt control file;2,edit the txt control file with the new name;3,edit init.ora file with the new name;4,update env variable with the new name;5,update data dictionary,etc.[@more@]A database can be renamed by recreating the control files. You may want to rename a database after you have made a copy of a database from one system to another, for example, when refreshing a development database from production. Connect to Server Manager, i.e., "svrmgrl": CONNECT INTERNAL ALTER D
ORA-12705 - Solutions
1. ORA-12705 with incorrectly specified NLS_LANG2. ORA-12705 with incorrectly specified ORA_NLSx3. ORA-12705 due to Installation Issues4. ORA-12705 when using Special Charactersets5. ORA-12705 when connecting via SQL*Net6. ORA-12705 during Migration7. ORA-12705 when connecting with SVRMGRL and SQLPLUS8. ORA-12705 when connecting with Precompiler Aplications9. ORA-12705 during Export/Import[@more@]PURPOSE ------- This article is intended to give you an overview of common reasons for ORA-