Sei sulla pagina 1di 37

The Oracle base remains unchanged with value /u01/app/oracle [oracle@ORACLEWS1 ~]$ crsctl stat res -t ----------------------------------------------------------------------------NAME TARGET

STATE SERVER STATE_DETAILS ----------------------------------------------------------------------------Local Resources ----------------------------------------------------------------------------ora.DATA.dg ONLINE ONLINE oraclews1 ora.FRA.dg ONLINE ONLINE oraclews1 ora.LISTENER.lsnr ONLINE ONLINE oraclews1 ora.asm ONLINE ONLINE oraclews1 Started ora.ons OFFLINE OFFLINE oraclews1 ----------------------------------------------------------------------------Cluster Resources ----------------------------------------------------------------------------ora.cssd 1 ONLINE ONLINE oraclews1 ora.diskmon 1 OFFLINE OFFLINE ora.evmd 1 ONLINE ONLINE oraclews1 ora.orcl.db 1 OFFLINE OFFLINE Instance Shutdow ora.rcat.db 1 OFFLINE OFFLINE Instance Shutdow [oracle@ORACLEWS1 ~]$ crsctl start resource -all CRS-5702: Resource 'ora.DATA.dg' is already running on 'oraclews1' CRS-5702: Resource 'ora.FRA.dg' is already running on 'oraclews1' CRS-5702: Resource 'ora.LISTENER.lsnr' is already running on 'oraclews1' CRS-5702: Resource 'ora.asm' is already running on 'oraclews1' CRS-5702: Resource 'ora.cssd' is already running on 'oraclews1' CRS-5702: Resource 'ora.evmd' is already running on 'oraclews1' CRS-2501: Resource 'ora.ons' is disabled CRS-2672: Attempting to start 'ora.rcat.db' on 'oraclews1' CRS-2672: Attempting to start 'ora.diskmon' on 'oraclews1' CRS-2672: Attempting to start 'ora.orcl.db' on 'oraclews1' CRS-2676: Start of 'ora.diskmon' on 'oraclews1' succeeded CRS-2676: Start of 'ora.rcat.db' on 'oraclews1' succeeded CRS-2676: Start of 'ora.orcl.db' on 'oraclews1' succeeded CRS-4000: Command Start failed, or completed with errors. [oracle@ORACLEWS1 ~]$ . oraenv ORACLE_SID = [+ASM] ? orcl The Oracle base remains unchanged with value /u01/app/oracle [oracle@ORACLEWS1 ~]$ emctl start dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0 Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved. https://ORACLEWS1:1158/em/console/aboutApplication Starting Oracle Enterprise Manager 11g Database Control ........ started. -----------------------------------------------------------------Logs are generated in directory /u01/app/oracle/product/11.2.0/dbhome_1/ORACL1_o rcl/sysman/log [oracle@ORACLEWS1 ~]$ archive log list -bash: archive: command not found [oracle@ORACLEWS1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Sun Oct 6 08:59:18 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 13 Next log sequence to archive 15 Current log sequence 15 SQL> SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 -bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@ORACLEWS1 ~]$ rman target / Recovery Manager: Release 11.2.0.3.0 - Production on Sun Oct 6 09:00:31 2013 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: ORCL (DBID=1349013963) RMAN> show all; using target database control file instead of recovery catalog RMAN configuration parameters for database with db_unique_name ORCL are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; CONFIGURE BACKUP OPTIMIZATION ON; CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # defau CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # dult CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # defa CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=oracle.disksbt,E(BA CKUP_DIR=/tape)'; CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ENCRYPTION FOR DATABASE OFF; # default CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR D T RUE ; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhomedbs /snapcf_orcl.f'; # default RMAN> backup database;

Starting backup at 2013-10-06:09:01:06 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=37 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00001 name=+DATA/orcl/datafile/system.256.82498935 channel ORA_DISK_1: starting piece 1 at 2013-10-06:09:01:07 channel ORA_DISK_1: finished piece 1 at 2013-10-06:09:02:22 piece handle=+FRA/orcl/backupset/2013_10_06/nnndf0_tag20131006t090107_0.326.8900 67 tag=TAG20131006T090107 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.257.82680159 channel ORA_DISK_1: starting piece 1 at 2013-10-06:09:02:22 channel ORA_DISK_1: finished piece 1 at 2013-10-06:09:03:28 piece handle=+FRA/orcl/backupset/2013_10_06/nnndf0_tag20131006t090107_0.327.8901 43 tag=TAG20131006T090107 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:01:06 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00008 name=/home/oracle/prueba.dbf input datafile file number=00009 name=/home/oracle/copy/prod01copy.dbf input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.258.821233 input datafile file number=00004 name=+DATA/orcl/datafile/users.259.821233157 input datafile file number=00006 name=+DATA/orcl/datafile/tbsjmw.267.82135990 input datafile file number=00005 name=+DATA/orcl/datafile/example.265.8212332 channel ORA_DISK_1: starting piece 1 at 2013-10-06:09:03:28 channel ORA_DISK_1: finished piece 1 at 2013-10-06:09:03:53 piece handle=+FRA/orcl/backupset/2013_10_06/nnndf0_tag20131006t090107_0.289.8902 09 tag=TAG20131006T090107 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00007 name=+DATA/undo_prueba01 channel ORA_DISK_1: starting piece 1 at 2013-10-06:09:03:53 channel ORA_DISK_1: finished piece 1 at 2013-10-06:09:03:54 piece handle=+FRA/orcl/backupset/2013_10_06/nnndf0_tag20131006t090107_0.328.8902 33 tag=TAG20131006T090107 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 2013-10-06:09:03:54 Starting Control File and SPFILE Autobackup at 2013-10-06:09:03:54 piece handle=+FRA/orcl/autobackup/2013_10_06/s_828090235.329.828090237 commenONE Finished Control File and SPFILE Autobackup at 2013-10-06:09:03:58 RMAN> exit Recovery Manager complete. [oracle@ORACLEWS1 ~]$ sqlplus SQL*Plus: Release 11.2.0.3.0 Production on Sun Oct 6 09:04:40 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Enter user-name: exit Enter password: ERROR: ORA-01005: null password given; logon denied

Enter user-name: ERROR: ORA-01017: invalid username/password; logon denied Enter user-name: ERROR: ORA-01017: invalid username/password; logon denied SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus [oracle@ORACLEWS1 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Sun Oct 6 09:04:57 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> create table PRUEBA_ERRORHUMANO(ID INT, NOMBRE VARCHAR2(20), VALOR INT) 2 ; Table created. SQL> select to_char(sysdate.'DD-MM-YYY HH24:MI:SS' from dual; select to_char(sysdate.'DD-MM-YYY HH24:MI:SS' from dual * ERROR at line 1: ORA-00907: missing right parenthesis SQL> select to_char(sysdate,'DD-MM-YYY HH24:MI:SS') from dual; TO_CHAR(SYSDATE,'D -----------------06-10-013 09:08:33 SQL> insert into PRUEBA_ERRORHUMANO values(1,"ROY",2000); insert into PRUEBA_ERRORHUMANO values(1,"ROY",2000) * ERROR at line 1: ORA-00984: column not allowed here SQL> insert into PRUEBA_ERRORHUMANO values(1,'Roy',2000); 1 row created. SQL> commit; Commit complete. SQL> select to_char(sysdate,'DD-MM-YYY HH24:MI:SS') from dual;

TO_CHAR(SYSDATE,'D -----------------06-10-013 09:10:07 SQL> ^C SQL> insert into PRUEBA_ERRORHUMANO values(2,'olinda',1500); 1 row created. SQL> insert into PRUEBA_ERRORHUMANO values(3,'roberto',3700); 1 row created. SQL> insert into PRUEBA_ERRORHUMANO values(4,'erika',4000); 1 row created. SQL> commit; Commit complete. SQL> select * from PRUEBA_ERRORHUMANO; ID ---------1 2 3 4 NOMBRE VALOR -------------------- ---------Roy 2000 olinda 1500 roberto 3700 erika 4000

SQL> select to_char(sysdate,'DD-MM-YYY HH24:MI:SS') from dual; TO_CHAR(SYSDATE,'D -----------------06-10-013 09:14:13 SQL> update prueba_errorhumano set valor=5000 where id=1; 1 row updated. SQL> commit; Commit complete. SQL> select to_char(sysdate,'DD-MM-YYY HH24:MI:SS') from dual; TO_CHAR(SYSDATE,'D -----------------06-10-013 09:18:46 SQL> ^C^C^C^C^C^C^C^C^C SQL> show parameter undo; NAME -----------------------------------undo_management undo_retention undo_tablespace TYPE ----------string integer string VALUE --------------------------- --AUTO 900 UNDOTBS1

SQL> SQL> select * from prueba_erorhumano as of timestamp('06-10-013 09:08:33','D D-M M-YYYY HH24:MI:SS'); select * from prueba_erorhumano as of timestamp('06-10-013 09:08:33','DD-MM- YYY Y HH24:MI:SS') * ERROR at line 1: ORA-00907: missing right parenthesis SQL> select * from prueba_erorhumano as of timestamp TO_TIMESTAMP('06-10-013 09 :08:33','DD-MM-YYYY HH24:MI:SS'); select * from prueba_erorhumano as of timestamp TO_TIMESTAMP('06-10-013 09:0 8:3 3','DD-MM-YYYY HH24:MI:SS') * ERROR at line 1: ORA-00942: table or view does not exist SQL> select * from PRUEBA_ERRORHUMANOas of timestamp TO_TIMESTAMP('06-10-01 3 0 9:08:33','DD-MM-YYYY HH24:MI:SS');^Z SQL> SQL> select * from prueba_errorhumano as of timestamp TO_TIMESTAMP('06-10-01 3 0 9:08:33','DD-MM-YYYY HH24:MI:SS'); select * from prueba_errorhumano as of timestamp TO_TIMESTAMP('06-10-013 09: 08: 33','DD-MM-YYYY HH24:MI:SS') * ERROR at line 1: ORA-08186: invalid timestamp specified SQL> select * from prueba_errorhumano as of timestamp TO_TIMESTAMP('06-10-01 3 0 9:08:33','DD-MM-YYYY HH24:MI:SS'); select * from prueba_errorhumano as of timestamp TO_TIMESTAMP('06-10-013 09:0D-M M-YYYY HH24:MI:SS') * ERROR at line 1: ORA-08186: invalid timestamp specified SQL> insert into PRUEBA_ERRORHUMANO values ( 2 SQL> 2 SQL> SQL> SQL> insert into PRUEBA_ERRORHUMANO values(5,'miguel',7000); 1 row created. SQL> commit; Commit complete. SQL> select to_char(sysdate,'DD-MM-YYY HH24:MI:SS') 2 ; * ERROR at line 2: ORA-00923: FROM keyword not found where expected

SQL> drop table prueba_errorhumano; Table dropped. SQL> alter user hr identified by hr; User altered. SQL> alter user hr account unlock; User altered. SQL> connect by hr SP2-0306: Invalid option. Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}] [edition=value where <logon> ::= <username>[/<password>][@<connect_identifier>] <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>] SQL> connect hr/hr Connected. SQL> create pruebaerror(id int); create pruebaerror(id int) * ERROR at line 1: ORA-00901: invalid CREATE command SQL> create table pruebaerror(id int); Table created. SQL> insert into pruebaerror values(1); 1 row created. SQL> insert into pruebaerror values(2); 1 row created. SQL> insert into pruebaerror values(3); 1 row created. SQL> insert into pruebaerror values(4); 1 row created. SQL> insert into pruebaerror values(5); 1 row created. SQL> insert into pruebaerror values(6); 1 row created. SQL> insert into pruebaerror values(7); 1 row created.

SQL> insert into pruebaerror values(8); 1 row created. SQL> insert into pruebaerror values(9); 1 row created. SQL> insert into pruebaerror values(10); 1 row created. SQL> commit; Commit complete. SQL> select * from pruebaerror; ID ---------1 2 3 4 5 6 7 8 9 10 10 rows selected. SQL> select * from user underline recyclerbin; select * from user underline recyclerbin * ERROR at line 1: ORA-00903: invalid table name SQL> select * from user_recyclebin; no rows selected SQL> drop table pruebaerror; Table dropped. SQL> select * from user_recyclebin; OBJECT_NAME ORIGINAL_NAME OPERATION ------------------------------ -------------------------------- --------TYPE TS_NAME CREATETIME ------------------------- ------------------------------ ------------------DROPTIME DROPSCN PARTITION_NAME CAN CAN ------------------- ---------- -------------------------------- --- --RELATED BASE_OBJECT PURGE_OBJECT SPACE ---------- ----------- ------------ ---------BIN$6BVv7S2rVCXgQwEAAH9jLQ==$0 PRUEBAERROR DROP TABLE USERS 2013-10-06:10:41:46

2013-10-06:10:46:21 1507747 77060 77060 77060

YES YES 8

SQL> select * from BIN$6BVv7S2rVCXgQwEAAH9jLQ==$0; select * from BIN$6BVv7S2rVCXgQwEAAH9jLQ==$0 * ERROR at line 1: ORA-00933: SQL command not properly ended SQL> select * from "BIN$6BVv7S2rVCXgQwEAAH9jLQ==$0"; ID ---------1 2 3 4 5 6 7 8 9 10 10 rows selected. SQL> create table pruebaerror as select * from "BIN$6BVv7S2rVCXgQwEAAH9jLQ==$ Table created. SQL> drop table pruebaerror; Table dropped. SQL> select * from user_recyclebin; OBJECT_NAME ORIGINAL_NAME OPERATION ------------------------------ -------------------------------- --------TYPE TS_NAME CREATETIME ------------------------- ------------------------------ ------------------DROPTIME DROPSCN PARTITION_NAME CAN CAN ------------------- ---------- -------------------------------- --- --RELATED BASE_OBJECT PURGE_OBJECT SPACE ---------- ----------- ------------ ---------BIN$6BVv7S2rVCXgQwEAAH9jLQ==$0 PRUEBAERROR DROP TABLE USERS 2013-10-06:10:41:46 2013-10-06:10:46:21 1507747 YES YES 77060 77060 77060 8 OBJECT_NAME ORIGINAL_NAME OPERATION ------------------------------ -------------------------------- --------TYPE TS_NAME CREATETIME ------------------------- ------------------------------ ------------------DROPTIME DROPSCN PARTITION_NAME CAN CAN ------------------- ---------- -------------------------------- --- --RELATED BASE_OBJECT PURGE_OBJECT SPACE ---------- ----------- ------------ ----------

BIN$6BVv7S2sVCXgQwEAAH9jLQ==$0 PRUEBAERROR TABLE USERS 2013-10-06:10:54:24 1508178 77061 77061 77061

DROP 2013-10-06:10:54:01 YES YES 8

SQL> connect / as sysdba Connected. SQL> flashback table hr.pruebaerror to before drop; Flashback complete. SQL> create table 2 SQL> connect hr/hr Connected. SQL> create table salario (id int, nombre varchar2(20),salario int); Table created. SQL> insert into salario values(1,'erika',1300); 1 row created. SQL> insert into salario values(2,'luisa',2400); 1 row created. SQL> insert into salario values(3,'roberto',3650); 1 row created. SQL> insert into salario values(4,'carlos',2400); 1 row created. SQL> insert into salario values(5,'hilda',1300); 1 row created. SQL> insert into salario values(6,'alan',2670); 1 row created. SQL> insert into salario values(7,'sofia',4670); 1 row created. SQL> insert into salario values(8,'julio',2670); 1 row created. SQL> insert into salario values(9,'andrea',2400); 1 row created. SQL> insert into salario values(10,'filomena',3600); 1 row created.

SQL> commit; Commit complete. SQL> select * from salario; ID ---------1 2 3 4 5 6 7 8 9 10 NOMBRE SALARIO -------------------- ---------erika 1300 luisa 2400 roberto 3650 carlos 2400 hilda 1300 alan 2670 sofia 4670 julio 2670 andrea 2400 filomena 3600

10 rows selected. SQL> update salario set salario=2000 where id=1; 1 row updated. SQL> commit; Commit complete. SQL> update salario set salario=3000 where id=2; 1 row updated. SQL> commit; Commit complete. SQL> update salario set salario=4000 where id=3; 1 row updated. SQL> commit; Commit complete. SQL> select id, nombre, salario,versions_operation from salario versions betw select id, nombre, salario,versions_operation from salario versions between t ERROR at line 1: ORA-00905: missing keyword SQL> select id, nombre, salario,versions_operation from salario versions betw select id, nombre, salario,versions_operation from salario versions between t fr om salario versions between timestamp minvalue an maxvalue ERROR at line 1: ORA-00905: missing keyword

SQL> select id, nombre, salario,versions_operation from salario versions betw select id, nombre, salario,versions_operation from salario versions between t fr om salario versions between timestamp minvalueselect id, nombre, salario,value a n maxvalue ERROR at line 1: ORA-00905: missing keyword SQL> select id, nombre, salario,versions_operation from salario versions betw select id, nombre, salario,versions_operation from salario versions between tn f rom salario versions between timestamp minvalueselect id, nombre, salario,value an maxvalue ERROR at line 1: ORA-00905: missing keyword SQL> select id, nombre, salario,versions_operation from salario versions betw select id, nombre, salario,versions_operation from salario versions between tn f rom salario versions between timestamp minvalue and maxvalue ERROR at line 1: ORA-00905: missing keyword SQL> select id, nombre, salario,versions_operation from salario versions bet ID ---------3 2 1 10 9 8 7 6 5 4 3 ID ---------2 1 NOMBRE SALARIO V -------------------- ---------- roberto 4000 U luisa 3000 U erika 2000 U filomena 3600 I andrea 2400 I julio 2670 I sofia 4670 I alan 2670 I hilda 1300 I carlos 2400 I roberto 3650 I NOMBRE SALARIO V -------------------- ---------- luisa 2400 I erika 1300 I

13 rows selected. SQL> select id, nombre, salario,versions_operation, versions_starttime,versisio ns_operation from salario versions between timestamp minvalue and maxvalue ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME ---------------------------------------------------------------------------

VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 3 roberto 06-OCT-13 11.04.46 AM 1509213

4000 U

ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 06001A0028050000 U ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 2 luisa 3000 U 06-OCT-13 11.04.25 AM 1509119 ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 08001A0093040000 U ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 1 erika 2000 U 06-OCT-13 11.04.04 AM

1509104 ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 0200160068040000 U ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 10 filomena 3600 I 06-OCT-13 11.02.31 AM 1509030 ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 0500020071040000 I ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 9 andrea 2400 I 06-OCT-13 11.02.31 AM 1509030 ID NOMBRE SALARIO V ---------- -------------------- ---------- -

VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 0500020071040000 I ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 8 julio 2670 I 06-OCT-13 11.02.31 AM 1509030 ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 0500020071040000 I ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 7 sofia 4670 I 06-OCT-13 11.02.31 AM 1509030 ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN -----------------

VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 0500020071040000 I ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 6 alan 2670 I 06-OCT-13 11.02.31 AM 1509030 ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 0500020071040000 I ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 5 hilda 1300 I 06-OCT-13 11.02.31 AM 1509030 ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- -

0500020071040000 I ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 4 carlos 2400 I 06-OCT-13 11.02.31 AM 1509030 ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 0500020071040000 I ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 3 roberto 3650 I 06-OCT-13 11.02.31 AM 1509030 ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 06-OCT-13 11.04.46 AM 1509213 0500020071040000 I

ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME --------------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME --------------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 2 luisa 2400 I 06-OCT-13 11.02.31 AM 1509030 ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME -----------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME -----------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 06-OCT-13 11.04.25 AM 1509119 0500020071040000 I ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME -----------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME -----------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 1 erika 1300 I 06-OCT-13 11.02.31 AM 1509030 ID NOMBRE SALARIO V ---------- -------------------- ---------- VERSIONS_STARTTIME -----------------------------------------------------------------------VERSIONS_STARTSCN ----------------VERSIONS_ENDTIME -----------------------------------------------------------------------VERSIONS_ENDSCN VERSIONS_XID V --------------- ---------------- 06-OCT-13 11.04.04 AM 1509104 0500020071040000 I 13 rows selected. SQL> SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0. - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@ORACLEWS1 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Sun Oct 6 12:32:46 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Produc n With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> cd .. SP2-0042: unknown command "cd .." - rest of line ignored. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0. - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@ORACLEWS1 ~]$ cd labs [oracle@ORACLEWS1 labs]$ cd .. [oracle@ORACLEWS1 ~]$ ls -lth total 37M -rw-r----- 1 oracle dba 12M Oct 6 12:32 archivo_fast_block -rw-r----- 1 oracle dba 26M Oct 6 09:32 prueba.dbf drwxr-xr-x 2 oracle oinstall 4.0K Sep 22 13:53 prod drwxr-xr-x 2 oracle oinstall 4.0K Sep 22 13:35 copy drwxr-xr-x 2 oracle oinstall 4.0K Sep 22 11:29 redo -rw-r--r-- 1 oracle dba 1.1K Sep 22 09:27 pfilebackup.init drwxr-xr-x 2 oracle oinstall 4.0K Sep 8 09:01 labs drwxr-xr-x 2 oracle oinstall 4.0K Sep 8 08:59 labs1 drwxr-xr-x 4 root root 4.0K Sep 8 08:59 demos -rw-r----- 1 oracle dba 508K Sep 1 12:23 EXPDATAHR.DMP -rw-r--r-- 1 oracle dba 3.0K Sep 1 12:23 explogprueba.LOG drwxr-xr-x 3 oracle oinstall 4.0K Jul 13 08:51 oradiag_oracle drwxr-xr-x 4 root root 4.0K Jul 6 12:12 RPM [oracle@ORACLEWS1 ~]$ cd labs [oracle@ORACLEWS1 labs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Sun Oct 6 12:33:49 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Produc n With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> @flada_setup Connected. SQL> set serveroutput on SQL> -- set verify on SQL> set term on

3.0

tio

3.0

tio

SQL> set lines 200 SQL> set pages 44 SQL> set pause on SQL> SQL> /*== Create a tablespace for your flashback data archive ==*/ SQL> DROP TABLESPACE fla_tbs1 INCLUDING CONTENTS 2 / DROP TABLESPACE fla_tbs1 INCLUDING CONTENTS * ERROR at line 1: ORA-00959: tablespace 'FLA_TBS1' does not exist SQL> CREATE SMALLFILE TABLESPACE fla_tbs1 2 DATAFILE '$HOME/BACKUP/fla_tbs01.dbf' 3 SIZE 10M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE 32767M 4 NOLOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO 5 / CREATE SMALLFILE TABLESPACE fla_tbs1 * ERROR at line 1: ORA-01119: error in creating database file '$HOME/BACKUP/fla_tbs01.dbf' ORA-27040: file create error, unable to create file Linux-x86_64 Error: 2: No such file or directory Additional information: 1 SQL> SQL> SQL> pause Press [Enter] to continue... Press [Enter] to continue... SQL> SQL> /*== Create a second undo tablespace for testing ==*/ SQL> SQL> DROP TABLESPACE undotbs2 INCLUDING CONTENTS 2 / DROP TABLESPACE undotbs2 INCLUDING CONTENTS * ERROR at line 1: ORA-00959: tablespace 'UNDOTBS2' does not exist SQL> CREATE SMALLFILE UNDO TABLESPACE undotbs2 2 DATAFILE '$HOME/BACKUP/undotbs02.dbf' 3 SIZE 105M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE 32767M 4 / CREATE SMALLFILE UNDO TABLESPACE undotbs2 * ERROR at line 1: ORA-01119: error in creating database file '$HOME/BACKUP/undotbs02.dbf' ORA-27040: file create error, unable to create file Linux-x86_64 Error: 2: No such file or directory Additional information: 1 SQL> pause Press [Enter] to continue... Press [Enter] to continue... SQL>

SQL> /*== Create an ARCHIVE_ADMIN user like the HR user ==*/ SQL> /*== with FLA_TBS1 default tablespace ==*/ SQL> CREATE USER ARCHIVE_ADMIN PROFILE DEFAULT IDENTIFIED BY "oracle_4U" 2 DEFAULT TABLESPACE FLA_TBS1 TEMPORARY TABLESPACE TEMP 3 ACCOUNT UNLOCK; CREATE USER ARCHIVE_ADMIN PROFILE DEFAULT IDENTIFIED BY "oracle_4U" * ERROR at line 1: ORA-00959: tablespace 'FLA_TBS1' does not exist SQL> pause Press [Enter] to continue... Press [Enter] to continue... SQL> GRANT ALTER SESSION TO ARCHIVE_ADMIN; GRANT ALTER SESSION TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> GRANT CREATE DATABASE LINK TO ARCHIVE_ADMIN; GRANT CREATE DATABASE LINK TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> GRANT CREATE SEQUENCE TO ARCHIVE_ADMIN; GRANT CREATE SEQUENCE TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> SQL> GRANT CREATE SESSION TO ARCHIVE_ADMIN; GRANT CREATE SESSION TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> GRANT CREATE SYNONYM TO ARCHIVE_ADMIN; GRANT CREATE SYNONYM TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> GRANT CREATE VIEW TO ARCHIVE_ADMIN; GRANT CREATE VIEW TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> GRANT UNLIMITED TABLESPACE TO ARCHIVE_ADMIN; GRANT UNLIMITED TABLESPACE TO ARCHIVE_ADMIN *

ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> GRANT EXECUTE ON SYS.DBMS_STATS TO ARCHIVE_ADMIN; GRANT EXECUTE ON SYS.DBMS_STATS TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> GRANT CONNECT, RESOURCE TO ARCHIVE_ADMIN; GRANT CONNECT, RESOURCE TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> SQL> SQL> /*== Setup for Flashback Data Archive completed ==*/ SQL> /*== The ARCHIVE_ADMIN user has the password: oracle_4U ==*/ SQL> SQL> SQL> pause Press [Enter] to continue... Press [Enter] to continue... SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0. - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@ORACLEWS1 labs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Sun Oct 6 12:37:30 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Produc n With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> @flada_setup Connected. SQL> set serveroutput on SQL> -- set verify on SQL> set term on SQL> set lines 200 SQL> set pages 44 SQL> set pause on SQL> SQL> /*== Create a tablespace for your flashback data archive ==*/ SQL> DROP TABLESPACE fla_tbs1 INCLUDING CONTENTS 2 / DROP TABLESPACE fla_tbs1 INCLUDING CONTENTS * ERROR at line 1: 3.0

tio

ORA-00959: tablespace 'FLA_TBS1' does not exist SQL> CREATE SMALLFILE TABLESPACE fla_tbs1 2 DATAFILE '$HOME/BACKUP/fla_tbs01.dbf' 3 SIZE 10M REUSE AUTOEXTEND ON NEXT 640K MAXSIZE 32767M 4 NOLOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO 5 / CREATE SMALLFILE TABLESPACE fla_tbs1 * ERROR at line 1: ORA-01119: error in creating database file '$HOME/BACKUP/fla_tbs01.dbf' ORA-27040: file create error, unable to create file Linux-x86_64 Error: 2: No such file or directory Additional information: 1 SQL> SQL> SQL> pause Press [Enter] to continue... Press [Enter] to continue... SQL> SQL> /*== Create a second undo tablespace for testing ==*/ SQL> SQL> DROP TABLESPACE undotbs2 INCLUDING CONTENTS 2 / DROP TABLESPACE undotbs2 INCLUDING CONTENTS * ERROR at line 1: ORA-00959: tablespace 'UNDOTBS2' does not exist SQL> CREATE SMALLFILE UNDO TABLESPACE undotbs2 2 DATAFILE '$HOME/BACKUP/undotbs02.dbf' 3 SIZE 105M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE 32767M 4 / CREATE SMALLFILE UNDO TABLESPACE undotbs2 * ERROR at line 1: ORA-01119: error in creating database file '$HOME/BACKUP/undotbs02.dbf' ORA-27040: file create error, unable to create file Linux-x86_64 Error: 2: No such file or directory Additional information: 1 SQL> pause Press [Enter] to continue... Press [Enter] to continue... SQL> SQL> /*== Create an ARCHIVE_ADMIN user like the HR user ==*/ SQL> /*== with FLA_TBS1 default tablespace ==*/ SQL> CREATE USER ARCHIVE_ADMIN PROFILE DEFAULT IDENTIFIED BY "oracle_4U" 2 DEFAULT TABLESPACE FLA_TBS1 TEMPORARY TABLESPACE TEMP 3 ACCOUNT UNLOCK; CREATE USER ARCHIVE_ADMIN PROFILE DEFAULT IDENTIFIED BY "oracle_4U" * ERROR at line 1: ORA-00959: tablespace 'FLA_TBS1' does not exist

SQL> pause Press [Enter] to continue... Press [Enter] to continue... SQL> GRANT ALTER SESSION TO ARCHIVE_ADMIN; GRANT ALTER SESSION TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> GRANT CREATE DATABASE LINK TO ARCHIVE_ADMIN; GRANT CREATE DATABASE LINK TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> GRANT CREATE SEQUENCE TO ARCHIVE_ADMIN; GRANT CREATE SEQUENCE TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> SQL> GRANT CREATE SESSION TO ARCHIVE_ADMIN; GRANT CREATE SESSION TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> GRANT CREATE SYNONYM TO ARCHIVE_ADMIN; GRANT CREATE SYNONYM TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> GRANT CREATE VIEW TO ARCHIVE_ADMIN; GRANT CREATE VIEW TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> GRANT UNLIMITED TABLESPACE TO ARCHIVE_ADMIN; GRANT UNLIMITED TABLESPACE TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> GRANT EXECUTE ON SYS.DBMS_STATS TO ARCHIVE_ADMIN; GRANT EXECUTE ON SYS.DBMS_STATS TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist

SQL> GRANT CONNECT, RESOURCE TO ARCHIVE_ADMIN; GRANT CONNECT, RESOURCE TO ARCHIVE_ADMIN * ERROR at line 1: ORA-01917: user or role 'ARCHIVE_ADMIN' does not exist SQL> SQL> SQL> /*== Setup for Flashback Data Archive completed ==*/ SQL> /*== The ARCHIVE_ADMIN user has the password: oracle_4U ==*/ SQL> SQL> SQL> pause Press [Enter] to continue... Press [Enter] to continue... SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0. - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@ORACLEWS1 labs]$ [oracle@ORACLEWS1 labs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Sun Oct 6 12:40:51 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Produc n With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> drop tablespace fla_tbs1 including contents / 2 ; drop tablespace fla_tbs1 including contents / * ERROR at line 1: ORA-02173: invalid option for DROP TABLESPACE SQL> drop tablespace fla_tbs1 including contents; drop tablespace fla_tbs1 including contents * ERROR at line 1: ORA-00959: tablespace 'FLA_TBS1' does not exist SQL> create smallfile tablespace fla_tbs1 datafile '$HOME/BACKUP/fla_tbs 01. dbf' size 10M reuse autoextend on next 640k maxsize 32767M nologging extent management local segment space management auto; create smallfile tablespace fla_tbs1 datafile '$HOME/BACKUP/fla_tbs01.db f' size 10M reuse autoextend on next 640k maxsize 32767M nologging exten t mana gement local segment space management auto * ERROR at line 1: ORA-01119: error in creating database file '$HOME/BACKUP/fla_tbs01.dbf' 3.0

tio

ORA-27040: file create error, unable to create file Linux-x86_64 Error: 2: No such file or directory Additional information: 1 SQL> create smallfile tablespace fla_tbs1 datafile '/home/oracle/backup/ fla _tbs01.dbf' size 10M reuse autoextend on next 640k maxsize 32767M nol ogging extent management local segment space management auto; create smallfile tablespace fla_tbs1 datafile '/home/oracle/backup/fla_t bs0 1.dbf' size 10M reuse autoextend on next 640k maxsize 32767M nologgin g exte nt management local segment space management auto * ERROR at line 1: ORA-01119: error in creating database file '/home/oracle/backup/fla_tbs0 1.d bf' ORA-27040: file create error, unable to create file Linux-x86_64 Error: 2: No such file or directory Additional information: 1 SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0. - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@ORACLEWS1 labs]$ cd .. [oracle@ORACLEWS1 ~]$ pwd /home/oracle [oracle@ORACLEWS1 ~]$ ls -l total 37540 -rw-r----- 1 oracle dba 11600384 Oct 6 12:47 archivo_fast_block drwxr-xr-x 2 oracle oinstall 4096 Sep 22 13:35 copy drwxr-xr-x 4 root root 4096 Sep 8 08:59 demos -rw-r----- 1 oracle dba 520192 Sep 1 12:23 EXPDATAHR.DMP -rw-r--r-- 1 oracle dba 2978 Sep 1 12:23 explogprueba.LOG drwxr-xr-x 2 oracle oinstall 4096 Sep 8 09:01 labs drwxr-xr-x 2 oracle oinstall 4096 Sep 8 08:59 labs1 drwxr-xr-x 3 oracle oinstall 4096 Jul 13 08:51 oradiag_oracle -rw-r--r-- 1 oracle dba 1045 Sep 22 09:27 pfilebackup.init drwxr-xr-x 2 oracle oinstall 4096 Sep 22 13:53 prod -rw-r----- 1 oracle dba 26222592 Oct 6 09:32 prueba.dbf drwxr-xr-x 2 oracle oinstall 4096 Sep 22 11:29 redo drwxr-xr-x 4 root root 4096 Jul 6 12:12 RPM [oracle@ORACLEWS1 ~]$ mkdir backup [oracle@ORACLEWS1 ~]$ ls -l total 37544 -rw-r----- 1 oracle dba 11600384 Oct 6 12:47 archivo_fast_block drwxr-xr-x 2 oracle oinstall 4096 Oct 6 12:48 backup drwxr-xr-x 2 oracle oinstall 4096 Sep 22 13:35 copy drwxr-xr-x 4 root root 4096 Sep 8 08:59 demos -rw-r----- 1 oracle dba 520192 Sep 1 12:23 EXPDATAHR.DMP -rw-r--r-- 1 oracle dba 2978 Sep 1 12:23 explogprueba.LOG drwxr-xr-x 2 oracle oinstall 4096 Sep 8 09:01 labs drwxr-xr-x 2 oracle oinstall 4096 Sep 8 08:59 labs1 drwxr-xr-x 3 oracle oinstall 4096 Jul 13 08:51 oradiag_oracle -rw-r--r-- 1 oracle dba 1045 Sep 22 09:27 pfilebackup.init drwxr-xr-x 2 oracle oinstall 4096 Sep 22 13:53 prod -rw-r----- 1 oracle dba 26222592 Oct 6 09:32 prueba.dbf drwxr-xr-x 2 oracle oinstall 4096 Sep 22 11:29 redo drwxr-xr-x 4 root root 4096 Jul 6 12:12 RPM

3.0

[oracle@ORACLEWS1 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Sun Oct 6 12:48:32 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Produc n With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options

tio

SQL> create smallfile tablespace fla_tbs1 datafile '/home/oracle/backup/ fla _tbs01.dbf' size 10M reuse autoextend on next 640k maxsize 32767M nol ogging extent management local segment space management auto; Tablespace created. SQL> create smallfile tablespace undotbs2 datafile '/home/oracle/backup/ otbs02.dbf' size 105 reuse autoextend on next 5120k maxsize 32767M; create smallfile tablespace undotbs2 datafile '/home/oracle/backup/undot 2.dbf' size 105 reuse autoextend on next 5120k maxsize 32767M * ERROR at line 1: ORA-03214: File Size specified is smaller than minimum required SQL> create smallfile tablespace undotbs2 datafile '/home/oracle/backup/ otbs02.dbf' size 105M reuse autoextend on next 5120k maxsize 32767M; Tablespace created. SQL> create user archive_admin profile default identified by "oracle_4U" default tablespace fla_tbs1 temporary tablespace temp account unlock; User created. SQL> grant alter session to archive_admin; Grant succeeded. SQL> grant create databse link to archive_admin; grant create databse link to archive_admin * ERROR at line 1: ORA-00990: missing or invalid privilege SQL> grant create database link to archive_admin; Grant succeeded. SQL> grant create session to archive_admin; Grant succeeded. SQL> grant create sequence to archive_admin; Grant succeeded. und bs0

und

SQL> grant create synonym to archive_admin; Grant succeeded. SQL> grant create view to archive_admin; Grant succeeded. SQL> grant unlimited tablespace to archive_admin; Grant succeeded. SQL> grant execute on sys.dbms_stats to archive_admin; Grant succeeded. SQL> grant connect, resource to archive_admin; Grant succeeded. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@ORACLEWS1 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Sun Oct 6 12:56:02 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> grant flashback archive adminiter to archive_admin; grant flashback archive adminiter to archive_admin * ERROR at line 1: ORA-00990: missing or invalid privilege SQL> grant flashback archive administer to archive_admin; Grant succeeded. SQL> connect archive_admin/oracle_4U Connected. SQL> create flashback archive fla1 tablespace fla_tbs1 quota 10M retention 1 yea r; Flashback archive created. SQL> grant flashback archive on fla1 to hr; Grant succeeded.

SQL> connect hr/hr Connected. SQL> alter table hr.employees flashback archive fla1; Table altered. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@ORACLEWS1 ~]$ cd labs [oracle@ORACLEWS1 labs]$ sqlplus hr/hr SQL*Plus: Release 11.2.0.3.0 Production on Sun Oct 6 13:00:10 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> @flada_dml SQL> set serveroutput on SQL> -- set verify on SQL> set term on SQL> set lines 200 SQL> set pages 44 SQL> set pause on pause "Press [Enter] to continue..." SQL> SQL> /*== Query the current salary for Mr. Fox ==*/ SQL> SQL> SELECT employee_id, last_name, salary 2 FROM hr.employees 3 WHERE last_name = 'Fox' 4 / Press [Enter] to continue... EMPLOYEE_ID LAST_NAME SALARY ----------- ------------------------- ---------170 Fox 9600 SQL> SQL> pause Press [Enter] to continue... Press [Enter] to continue... SQL> SQL> SQL> SQL> 2 3 4 /*== Increase the salary three times by 1000 ==*/ UPDATE hr.employees SET salary = salary + 1000 WHERE last_name = 'Fox' /

1 row updated. SQL> COMMIT 2 /

Commit complete. SQL> 2 3 4 UPDATE hr.employees SET salary = salary + 1000 WHERE last_name = 'Fox' /

1 row updated. SQL> COMMIT 2 / Commit complete. SQL> 2 3 4 UPDATE hr.employees SET salary = salary + 1000 WHERE last_name = 'Fox' /

1 row updated. SQL> COMMIT 2 / Commit complete. SQL> pause Press [Enter] to continue... Press [Enter] to continue... SQL> SQL> /*== Query the up-to-date value for Mr. Fox ==*/ SQL> SQL> SELECT employee_id, last_name, salary 2 FROM hr.employees 3 WHERE last_name = 'Fox' 4 / Press [Enter] to continue... EMPLOYEE_ID LAST_NAME SALARY ----------- ------------------------- ---------170 Fox 12600 SQL> SQL> pause Press [Enter] to continue... Press [Enter] to continue... SQL> SQL> set pause off SQL> SQL> select * from user_flashback_archive_tables; TABLE_NAME OWNER_NAME ------------------------------ -----------------------------FLASHBACK_ARCHIVE_NAME -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ARCHIVE_TABLE_NAME STATUS ----------------------------------------------------- -------------

EMPLOYEES FLA1 SYS_FBA_HIST_76277

HR ENABLED

SQL> connect / as sysdba Connected. SQL> alter system set undo_tablespace=undotbs2; alter system set undo_tablespace=undotbs2 * ERROR at line 1: ORA-02097: parameter cannot be modified because specified value is invalid ORA-30012: undo tablespace 'UNDOTBS2' does not exist or of wrong type SQL> alter system set undo_tablespace=UNDOTBS2; alter system set undo_tablespace=UNDOTBS2 * ERROR at line 1: ORA-02097: parameter cannot be modified because specified value is invalid ORA-30012: undo tablespace 'UNDOTBS2' does not exist or of wrong type SQL> alter system set undo_tablespace=undotbs02; alter system set undo_tablespace=undotbs02 * ERROR at line 1: ORA-02097: parameter cannot be modified because specified value is invalid ORA-30012: undo tablespace 'UNDOTBS02' does not exist or of wrong type SQL> alter system set UNDO_TABLESPACE=UNDOTBS2; alter system set UNDO_TABLESPACE=UNDOTBS2 * ERROR at line 1: ORA-02097: parameter cannot be modified because specified value is invalid ORA-30012: undo tablespace 'UNDOTBS2' does not exist or of wrong type SQL> connect / as sysdba Connected. SQL> SQL> @flada_cleanup SQL> REM Execute this script script for training purposes only SQL> REM Undo Setup for Flashback Data Archive SQL> REM Execute script as SYSDBA SQL> SQL> set echo on SQL> set serveroutput on SQL> -- set verify on SQL> set term on SQL> set lines 200 SQL> set pause on SQL> SQL> connect / as sysdba Connected. SQL> set echo off CREATE SMALLFILE UNDO TABLESPACE undotbs1 * ERROR at line 1:

ORA-01543: tablespace 'UNDOTBS1' already exists SQL> SQL> ALTER SYSTEM SET UNDO_TABLESPACE=undotbs1 2 / System altered. SQL> DROP TABLESPACE fla_tbs1 INCLUDING CONTENTS 2 / DROP TABLESPACE fla_tbs1 INCLUDING CONTENTS * ERROR at line 1: ORA-55641: Cannot drop tablespace used by Flashback Data Archive SQL> DROP TABLESPACE fla_tbs2 INCLUDING CONTENTS 2 / DROP TABLESPACE fla_tbs2 INCLUDING CONTENTS * ERROR at line 1: ORA-00959: tablespace 'FLA_TBS2' does not exist SQL> SQL> DROP TABLESPACE undotbs2 INCLUDING CONTENTS 2 / Tablespace dropped. SQL> host rm -f $HOME/BACKUP/fla_tbs01.dbf SQL> host rm -f $HOME/BACKUP/fla_tbs02.dbf SQL> host rm -f $HOME/BACKUP/undotbs02.dbf SQL> SQL> prompt Flashback Data Archive cleanup complete. Flashback Data Archive cleanup complete. SQL> pause Press [Enter] to continue... Press [Enter] to continue... SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@ORACLEWS1 labs]$ [oracle@ORACLEWS1 labs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Sun Oct 6 13:15:32 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options

SQL> show parameter recycle; NAME TYPE VALUE ------------------------------------ ----------- -----------------------------buffer_pool_recycle string db_recycle_cache_size big integer 0 recyclebin string on SQL> show recyclebin SQL> SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@ORACLEWS1 labs]$ cd /home/labs -bash: cd: /home/labs: No such file or directory [oracle@ORACLEWS1 labs]$ . oraenv ORACLE_SID = [orcl] ? orcl The Oracle base remains unchanged with value /u01/app/oracle [oracle@ORACLEWS1 labs]$ ./recyclebin_lab.sh -bash: ./recyclebin_lab.sh: Permission denied [oracle@ORACLEWS1 labs]$ sh resyclebin_lab.sh sh: resyclebin_lab.sh: No such file or directory [oracle@ORACLEWS1 labs]$ ls -lth total 572K -rw-r--r-- 1 oracle oinstall 506 Sep 25 2009 amm_cleanup.sh -rw-r--r-- 1 oracle oinstall 588 Sep 25 2009 asm_setup.sh -rw-r--r-- 1 oracle oinstall 232 Sep 25 2009 ast_interrupt_task.sh -rw-r--r-- 1 oracle oinstall 769 Sep 25 2009 ast_manual_config.sh -rw-r--r-- 1 oracle oinstall 1.5K Sep 25 2009 ast_run.sh -rw-r--r-- 1 oracle oinstall 671 Sep 25 2009 ast_setup.sh -rw-r--r-- 1 oracle oinstall 1.2K Sep 25 2009 ast_task_report.sh -rw-r--r-- 1 oracle oinstall 96K Sep 25 2009 ast_wrkl11g.sh -rw-r--r-- 1 oracle oinstall 291 Sep 25 2009 bc_cleanup.sh -rw-r--r-- 1 oracle oinstall 609 Sep 25 2009 bc_corrupt.sh -rw-r--r-- 1 oracle oinstall 1022 Sep 25 2009 bc_setup.sh -rw-r--r-- 1 oracle oinstall 263 Sep 25 2009 cleanup_archivelogs.sh -rw-r--r-- 1 oracle oinstall 305 Sep 25 2009 cleanup_from_cloning.sh -rw-r--r-- 1 oracle oinstall 2.4K Sep 25 2009 cleanup_perflab.sh -rw-r--r-- 1 oracle oinstall 54 Sep 25 2009 cleanup_tape_dir.sh -rw-r--r-- 1 oracle oinstall 227 Sep 25 2009 controlfile_autobackup_on.sh -rw-r--r-- 1 oracle oinstall 400 Sep 25 2009 copy_users_df.sh -rw-r--r-- 1 oracle oinstall 305 Sep 25 2009 create_appraisal_ts.sh -rw-r--r-- 1 oracle oinstall 181 Sep 25 2009 del_sales_cust_idx.sh -rw-r--r-- 1 oracle oinstall 288 Sep 25 2009 disable_asynch_io.sh -rw-r--r-- 1 oracle oinstall 280 Sep 25 2009 emp_inserts.sh -rw-r--r-- 1 oracle oinstall 369 Sep 25 2009 flatxn_archivelog_off.sh -rw-r--r-- 1 oracle oinstall 627 Sep 25 2009 flatxn_archivelog.sh -rw-r--r-- 1 oracle oinstall 239 Sep 25 2009 hm_fix.sh -rw-r--r-- 1 oracle oinstall 320 Sep 25 2009 hm_setup.sh -rw-r--r-- 1 oracle oinstall 187 Sep 25 2009 invalid_sql.sh -rw-r--r-- 1 oracle oinstall 317 Sep 25 2009 load_words.sh -rw-r--r-- 1 oracle oinstall 138 Sep 25 2009 man_snapshot.sh -rw-r--r-- 1 oracle oinstall 16 Sep 25 2009 noarchivelog_backup_cleanup.sh -rw-r--r-- 1 oracle oinstall 272 Sep 25 2009 orcl_to_archivelog.sh -rw-r--r-- 1 oracle oinstall 276 Sep 25 2009 orcl_to_noarchivelog.sh -rw-r--r-- 1 oracle oinstall 898 Sep 25 2009 prep_for_cloning.sh -rw-r--r-- 1 oracle oinstall 340 Sep 25 2009 query_block_count.sh -rw-r--r-- 1 oracle oinstall 388 Sep 25 2009 query_logs.sh

-rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--rw-r--r--

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle oracle

oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall oinstall

272 175 124 574 205 269 2.2K 251 1.3K 729 2.8K 327 263 1.2K 100 231 353 282 336 683 636 388 388 308 1003 856 17K 435 113 289 116 292 118 294 288 536 620 1008 1.1K 178 307 296 470 74 791 162 976 1.4K 287 218 1.7K 554 253 641 471 1.5K 296 288 140 1.3K

Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep Sep

25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009 2009

rcat_to_archivelog.sh recyclebin_lab.sh restart_listener.sh rman_archivelog.sh rm_asm_file.sh rm_system.sh rsc_cleanup.sh seg_advsr_cleanup.sh seg_advsr_setup.sh setupasm.sh setup_perflab.sh size_memory_up.sh start_perflab.sh start_workload.sh stop_workload.sh sv1_add.sh sv1_load1.sh sv1_load.sh unlock_accounts_4U.sh amm_components.sql amm_parameters.sql amm_query1.sql amm_query2.sql amm_query3.sql amm_setup2.sql amm_setup.sql ast_workload_stream.sql bc_critical.sql comp0_insert.sql comp0_query.sql comp1_insert.sql comp1_query.sql comp2_insert.sql comp2_query.sql comp_cleanup.sql comp_create_tables.sql comp_setup.sql comp_view_storage.sql create_HRTEST.log cr_sales_cust_idx.sql cr_test_log.sql del_perflab_idx.sql env find_sql_addr.sql flada_cleanup.sql flada_create.sql flada_dml.sql flada_list1.sql flada_list2.sql flada_sel.sql flada_setup.sql flada_tbs2.sql flada_upd.sql flatxn_cleanup.sql flatxn_setup1.sql flatxn_setup2.sql flb_db_txn.sql gather_sales_stats.sql impdphr.par initAMM.ora

-rw-r--r-- 1 oracle oinstall 587 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 556 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 654 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 462 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 2.3K Sep 4 2009 -rw-r--r-- 1 oracle oinstall 540 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 532 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 276 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 652 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 239 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 395 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 303 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 1.5K Sep 4 2009 -rw-r--r-- 1 oracle oinstall 2.0K Sep 4 2009 -rw-r--r-- 1 oracle oinstall 3.7K Sep 4 2009 -rw-r--r-- 1 oracle oinstall 2.0K Sep 4 2009 -rw-r--r-- 1 oracle oinstall 185 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 202 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 140 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 203 Sep 4 2009 -rw-r--r-- 1 oracle oinstall 2.6K Sep 4 2009 [oracle@ORACLEWS1 labs]$ [oracle@ORACLEWS1 labs]$ ./recyclebin_lab.sh -bash: ./recyclebin_lab.sh: Permission denied [oracle@ORACLEWS1 labs]$ sh recyclebin_lab.sh

invalid_sql.sql my_lwt_job.sql my_lwy_job.sql my_prog.sql noise_workload.sql old_tnsnames.ora prog_1.sql purge.sql query_longops2.sql query_longops.sql query_rsc_groups.sql redo_view.sql setup_workload.sql sql_repair1.sql sql_repair2.sql sqltune_workload.sql sv1_load2.sql sv1_names.ora sv1_sel.sql testhost.ora wkfctrfunc

SQL*Plus: Release 11.2.0.3.0 Production on Sun Oct 6 13:22:19 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> SQL> Table dropped. SQL> SQL> select * from hr.departments * ERROR at line 1: ORA-00942: table or view does not exist SQL> select * from hr.departments * ERROR at line 1: ORA-00942: table or view does not exist SQL> select * from hr.departments * ERROR at line 1: ORA-00942: table or view does not exist SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining

and Real Application Testing options [oracle@ORACLEWS1 labs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Sun Oct 6 13:22:49 2013 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> col owner format a5 SQL> select owner, original_name, droptime from dba_recyclebin where owner='HR'; OWNER ----HR HR HR HR ORIGINAL_NAME -------------------------------DEPT_LOCATION_IX DEPT_ID_PK PRUEBAERROR DEPARTMENTS DROPTIME ------------------2013-10-06:13:22:19 2013-10-06:13:22:19 2013-10-06:10:46:21 2013-10-06:13:22:19

SQL> flashback table hr.departaments to before drop; flashback table hr.departaments to before drop * ERROR at line 1: ORA-38305: object not in RECYCLE BIN SQL> flashback table hr.departments to before drop; Flashback complete. SQL> select * from hr.departments; DEPARTMENT_ID ------------10 20 30 40 50 60 70 80 90 100 110 DEPARTMENT_ID ------------120 130 140 150 160 170 180 190 DEPARTMENT_NAME MANAGER_ID LOCATION_ID ------------------------------ ---------- ----------Administration 200 1700 Marketing 201 1800 Purchasing 114 1700 Human Resources 203 2400 Shipping 121 1500 IT 103 1400 Public Relations 204 2700 Sales 145 2500 Executive 100 1700 Finance 108 1700 Accounting 205 1700 DEPARTMENT_NAME MANAGER_ID LOCATION_ID ------------------------------ ---------- ----------Treasury 1700 Corporate Tax 1700 Control And Credit 1700 Shareholder Services 1700 Benefits 1700 Manufacturing 1700 Construction 1700 Contracting 1700

200 Operations 210 IT Support 220 NOC DEPARTMENT_ID ------------230 240 250 260 270

1700 1700 1700

DEPARTMENT_NAME MANAGER_ID LOCATION_ID ------------------------------ ---------- ----------IT Helpdesk 1700 Government Sales 1700 Retail Sales 1700 Recruiting 1700 Payroll 1700

27 rows selected. SQL>

Potrebbero piacerti anche