Posts

Showing posts from June, 2013

how to Create Profile and Roles and What is the vlaue of DEFAULT in dba_profile?

Hi Team, Here is how you can deal with working on profile and creating role. A :---I have created role “ testinguserrole” on my test database; Step:-1 ----------------------------------- SQL> create role testinguserrole; GRANT CONNECT TO testinguserrole; GRANT SELECT ON ICP_P.CLAIM TO testinguserrole; GRANT SELECT ON ICP_P.CLAIM_LINE TO testinguserrole; GRANT SELECT ON ICP_P.CLAIM_EDIT TO testinguserrole; GRANT SELECT ON ICP_P.CLAIM_LINE_EDIT TO testinguserrole; GRANT SELECT ON ICP_P.CLAIM_LINE_MODIFIER TO testinguserrole; GRANT SELECT ON ICP_P.CLAIM_LINE_DIAGNOSIS TO testinguserrole; GRANT SELECT ON ICP_P.CLAIM_LINE_USER_DEFINED_FIELD TO testinguserrole; to verify the dba_tab_privs for testinguserrole select * from dba_tab_privs where grantee = 'testinguserrole'; Now i am creating user and will assign them the role. SQL> CREATE USER &username IDENTIFIED BY &username   2  DEFAULT TABLESPACE DATA1   3  TEMPORARY TABLESPACE TEMP   4  PROFILE DEFAULT   5  ACCOUNT UN

Archivelog backup and deletion

Hi, Below steps will help you to backup and delete archives 1. BACKUP ARCHIVELOG ALL delete input; This backups up and deletes archive 2. BACKUP ARCHIVELOG UNTIL TIME 'sysdate' NOT BACKED UP 1 times;. This will backup archives not backed-up yet DELETE NOPROMPT ARCHIVELOG UNTIL TIME 'sysdate' BACKED UP 1 times to device type disk; This is amazing deletes archives backup ed one time till 'sysdate'.

Certification Completion

Image
I have completed my OCA 10g Certification. Working on OCP now....

DROP DATABASE

Say if you have to drop the database, this can be carried out if the database is registed with RMAN. Easy steps. Verify the Database. export ORACLE_SID=khan $ sqlplus / as sysdba SQL> startup SQL>  select name from v$datafile; SQL> select member from v$logfile; SQL> select name from v$controlfile; SQL> select name , open_mode , log_mode from v$database; SQL> shutdown immediate; On RMAN CONSOLE** Connect to RMAN $ORACLE_HOME/bin/rman catalog=rcat_testdb_khant/rcat@rman RMAN> connect target/ RMAN> startup force mount RMAN> SQL 'ALTER SYSTEM ENABLE RESTRICTED SESSION'; sql statement: ALTER SYSTEM ENABLE RESTRICTED SESSION RMAN> DROP DATABASE INCLUDING BACKUPS NOPROMPT; This drops the database and backups and unregister the database from catalog Database.