Skip to main content

Posts

Showing posts from September, 2011

RMAN: Format Directives:

RMAN: Format Directives: Format Description %a Current database activation id %A Zero-filled activation ID %c The copy number of the backup piece within a set of duplexed backup pieces.bMaximum value is 256 %d Database name %D Current day of the month from the Gregorian calendar in format DD %e Archived log sequence number %f Absolute file number %F Combines the DBID, day, month, year, and sequence into a unique and repeatable generated name %h Archived redo log thread number %I DBID %M Month in the Gregorian calendar in the format MM %n Database name, padded on the right with x characters to a total length of eight characters %N Tablespace name. Only valid when backing up datafiles as image copies. %p Piece number within the backup set. This value starts at 1 for each backup set and is incremented by 1 for each backup piece created. If

How To: Properly MOVE or RENAME oracle datafile

    To properly move the datafile around or rename the datafile, follow this steps:         Login to oracle SQLPlus or Connect to target database using any trird party tool.     bash#sqlplus /nolog     SQL> conn sys as sysdba               Shutdown the database instance with SHUTDOWN command.     SQL> shutdown immediate;             Rename or/and move the datafiles at operating system level.             Start Oracle database in mount state with STARTUP MOUNT command.     SQL> startup mount;            Modify the name or location of datafiles in Oracle data dictionary using following command syntax :     SQL> ALTER DATABASE RENAME FILE ‘<fully qualified path to original data file name>’ TO ‘<new or original fully qualified path to new or original data file name>’;             Open Oracle database instance completely with ALTER DATABASE OPEN command.     SQL> alter database open; =============================================================

DATA PUMP: EXCLUDE / INCLUDE TABLE IMPORT

EXCLUDING TABLES DURING DATA_PUMP IMPORT: impdp USERNAME/PASSWORD schemas=USERNAME directory=DIRECTORY_NAME dumpfile=FILE_NAME.dmp EXCLUDE=TABLE:\"IN \(\'TABLE1\',\'TABLE2\',\'TABLE3\',\'TABLE4\',\'TABLE5\',\'TABLE6\'\)\" impdp ultimus/ultimus schemas=ultimus directory=db_back dumpfile=AFT_EOD.dmp EXCLUDE=TABLE:\"IN \(\'IMG_SIGNATORY_IMAGE\',\'IMG_SIGNATORY_IMAGE_DEL_LOG\',\'IMG_SIGNATORY_INFO\',\'IMG_SIGNATORY_VERIFY_LOG\',\'IMG_BACH_CLG_HIST_IN\',\'IMG_BRM_INST\',\'IMG_NFT_AUTH_LOG\'\)\" EXCLUDING TABLES DURING DATA_PUMP IMPORT - USING  "LIKE "  COMMAND: impdp USERNAME/PASSWORD schemas=USERNAME directory=DIRECTORY_NAME dumpfile=FILE_NAME.dmp EXCLUDE=TABLE:\"like 'IMG_%%'\" EXCLUDE=TABLE:\"IN \(\'EMP\',\'DEPT\'\)\" INCLUDING TABLES DURING DATA_PUMP IMPORT: impdp USERNAME/PASSWORD schemas=USERNAM

Installing Oracle 10g on SOLARIS

Run_ALL_Commands_as_User_ROOT ----------------------------------------------------------------------- Run Check bash# /usr/sbin/prtconf | grep "Memory size" [Check RAM size] bash# /usr/sbin/swap -s [check swap] bash# df -k /tmp [check /tmp size (>400mb)] bash# uname -r [check solaris version] bash# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt bash# cat /etc/nsswitch.conf | grep hosts bash# hostname bash# domainname Fist of all add 3 OS groups. bash#groupadd dba bash#groupadd oinstall bash#groupadd oper Create user 'oracle' {Determine oracle user exist or not) bash# id -a oracle {if exist, should be look like this= uid=440(oracle) gid=200(oinstall) groups=201(dba),202(oper)) {create oracle user) # useradd -d /export/home/oracle -g dba -G oinstall -m -s /bin/ksh oracle # #chown oracle:dba /export/home/oracle {set password= # passwd -r files oracle

Installing Patch on ORACLE SOLARIS 10.9 from ISO FILE

Installing Patch on ORACLE SOLARIS 10.9 from ISO FILE Suppose the ISO file is located in /datafile/  and the ISO file name is Jan2010.iso Open a terminal window and type. bash-3.00# lofiadm -a /datafile/Jan2010.iso /dev/lofi/1 mount the ISO file bash-3.00# mount -F hsfs /dev/lofi/1 /mnt bash-3.00# cd /mnt/sun/install/ bash-3.00# ./setup-standard.sh when setup-standard.sh is completed bash-3.00# . /.profile run patch unpacker root@SEBLTEST-02 # cd /mnt/sun/patch/x86/10/ root@SEBLTEST-02 # unpack-patches -r -q Synchronize patching bash#sync bash#sync bash#sync