Backup
@echo on
set ORACLE_SID=VOC4J
exp jboss9102/jboss9102 full=no owner=jboss9102 file=D:\Backupof_VOC4J_jboss9102_dontdelete\BACKUP\emptydb log=D:\Backupof_VOC4J_jboss9102_dontdelete\BACKUP\emptydb
@echo off
Restore::
sqlplus /nolog
CONNECT sys/sys123@VOC4J AS SYSDBA
DROP USER jboss9102 CASCADE;
@D:\oracle\javavm\install\initxa.sql
CREATE USER jboss9102 IDENTIFIED BY jboss9102 DEFAULT TABLESPACE jboss9102 TEMPORARY TABLESPACE temp QUOTA UNLIMITED ON jboss9102;
GRANT connect, resource, aq_administrator_role, dba, query rewrite TO jboss9102 with ADMIN OPTION;
@D:\oracle\RDBMS\ADMIN\dbmspool.sql
GRANT EXECUTE ON sys.dbms_shared_pool TO jboss9102 WITH GRANT OPTION;
BEGIN
dbms_resource_manager_privs.grant_switch_consumer_group( grantee_name => 'jboss9102',consumer_group => 'SYS_GROUP',grant_option => TRUE);
END;
/
Exit
imp jboss9102/jboss9102@VOC4J fromuser=jboss9102 touser=jboss9102 file=D:\Backupof_VOC4J_jboss9102_dontdelete\BACKUP\emptydb.DMP log=D:\Backupof_VOC4J_jboss9102_dontdelete\BACKUP\emptydb.log
Awesome. I am so glad to have found such a helpful post which shares the complete query to backup and restore the database. Thanks for posting the complete query, I will try them now.
ReplyDeletesap upgrade transactions
So Andrea..Did it work for you?
ReplyDelete