Professional Documents
Culture Documents
========
-----------------------------------------------------------------------------------
--------
Check backup is taken or not if not take full backup:
rman target /
run {
allocate channel c1 type disk;
backup as backupset format '/u02/rman_bkp/df_%d_%s_%p'
incremental level 0 database;
backup as backupset format '/u02/rman_bkp/ar_%d_%s_%p'
archivelog all delete input;
}
-----------------------------------------------------------------------------------
----------
-----------------------------------------------------------------------------------
-------------
Go to sqldeveloper:
-------------------------
select * from all_users;
Go to sqlplus:
------------------
sqlplus / as sysdba
SQL> @?/rdbms/admin/utlsampl.sql
sqlplus / as sysdba
connect scott/tiger
Go to sqldeveloper:
-------------------------
select * from all_users;
sqlplus / as sysdba
connect scott/tiger
Connected.
Go to sqldeveloper:
-------------------------
connect as sysdba
----------------------
BEGIN
DBMS_TTS.TRANSPORT_SET_CHECK('USERS',TRUE,TRUE);
END;
/
OUTPUT:
cd /u01/app/oracle
mkdir recovery
/u01/app/oracle/recovery
rman target /
--------------------
----------------------
----------------------
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 10/12/2020 22:57:55
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on default channel at 10/12/2020 22:57:54
RMAN-11003: failure during parse/execution of SQL statement: drop tablespace USERS
including contents keep datafiles cascade constraints
ORA-12919: Can not drop the default permanent tablespace
RMAN>
sqlplus / as sysdba
TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
SYSAUX ONLINE
UNDOTBS1 ONLINE
TEMP ONLINE
USERS OFFLINE
TSRMAN ONLINE
rman target /
sqlplus / as sysdba
TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
SYSAUX ONLINE
UNDOTBS1 ONLINE
TEMP ONLINE
USERS OFFLINE
TSRMAN ONLINE
rman target /
run {
allocate channel c1 type disk;
backup as backupset format '/u01/app/oracle/rman_bkp/df_%d_%s_%p'
tablespace users;
}
sqlplus / as sysdba
conn scott/tiger
SQL>
===================================================================================
=======================
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
database closed
database dismounted
Oracle instance shut down
database opened
RMAN>
Go to SQLDEVELOPER: