Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Connected to:
- Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
- With the Partitioning, OLAP, Advanced Analytics, Real Application Testing
- and Unified Auditing options
- SQL> select log_mode from v$database;
- LOG_MODE
- ------------
- ARCHIVELOG
- SQL> alter database open;
- alter database open
- *
- ERROR at line 1:
- ORA-01531: a database already open by the instance
- SQL> select supplemental_log_data_min from v$database;
- SUPPLEME
- --------
- YES
- SQL> show parameter utl_file_dir
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- utl_file_dir string
- SQL> Create Pfile from SPfile;
- File created.
- SQL> shutdown immediate;
- Database closed.
- Database dismounted.
- ORACLE instance shut down.
- SQL> select name, value from v$parameter where name like 'utl_file_dir';
- select name, value from v$parameter where name like 'utl_file_dir'
- *
- ERROR at line 1:
- ORA-01034: ORACLE not available
- Process ID: 0
- Session ID: 0 Serial number: 0
- ERROR:
- ORA-01034: ORACLE not available
- Process ID: 0
- Session ID: 0 Serial number: 0
- SQL> startup mount
- ORACLE instance started.
- Total System Global Area 5117050880 bytes
- Fixed Size 3056232 bytes
- Variable Size 1040190872 bytes
- Database Buffers 4060086272 bytes
- Redo Buffers 13717504 bytes
- Database mounted.
- SQL> select name, value from v$parameter where name like 'utl_file_dir';
- NAME
- --------------------------------------------------
- VALUE
- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- utl_file_dir
- SQL> shutdown immediate;
- ORA-01109: database not open
- Database dismounted.
- ORACLE instance shut down.
- SQL> startup pfile='C:\app\Oracle12\product\12.1.0\dbhome_1\database\INItorcl.ORA';
- ORACLE instance started.
- Total System Global Area 5117050880 bytes
- Fixed Size 3056232 bytes
- Variable Size 1040190872 bytes
- Database Buffers 4060086272 bytes
- Redo Buffers 13717504 bytes
- Database mounted.
- Database opened.
- SQL> show parameter utl_file_dir
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- utl_file_dir string C:\app\backup\logmnr
- SQL> select supplemental_log_data_min from v$database;
- SUPPLEME
- --------
- YES
- SQL> show parameter db_recovery_file_dest;
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- db_recovery_file_dest string
- db_recovery_file_dest_size big integer 0
- SQL> Alter system set db_recovery_file_dest_size=20G;
- System altered.
- SQL> Alter system set db_recovery_file_dest='C:\app\backup';
- System altered.
- SQL> begin
- 2 dbms_logmnr_d.build(
- 3 dictionary_filename => 'dictionary.ora',
- 4 dictionary_location => 'C:\app\backup\logmnr',
- 5 options => dbms_logmnr_d.store_in_flat_file);
- 6 end;
- 7 /
- PL/SQL procedure successfully completed.
- SQL> conn test/test@pdborcl
- ERROR:
- ORA-01033: ORACLE initialization or shutdown in progress
- Process ID: 0
- Session ID: 0 Serial number: 0
- Warning: You are no longer connected to ORACLE.
- SQL> conn test/test@pdborcl
- ERROR:
- ORA-01033: ORACLE initialization or shutdown in progress
- Process ID: 0
- Session ID: 0 Serial number: 0
- SQL> conn sys as sysdba
- Enter password:
- Connected.
- SQL> conn sys@pdborcl as sysdba
- Enter password:
- Connected.
- SQL> Create user test identified by test
- 2 Default tablespace users
- 3 Temporary tablespace temp
- 4 Quota unlimited on users;
- Create user test identified by test
- *
- ERROR at line 1:
- ORA-01109: database not open
- SQL> Grant create session, create procedure to test;
- Grant create session, create procedure to test
- *
- ERROR at line 1:
- ORA-01109: database not open
- SQL> Grant execute on list_libraries to test;
- Grant execute on list_libraries to test
- *
- ERROR at line 1:
- ORA-01109: database not open
- SQL> alter pluggable database pdborcl open read write;
- Pluggable database altered.
- SQL> conn test/test@pdborcl
- Connected.
- SQL> exec sys.list_libraries('NOUSER''||test.get_dba() --');
- BEGIN sys.list_libraries('NOUSER''||test.get_dba() --'); END;
- *
- ERROR at line 1:
- ORA-06598: insufficient INHERIT PRIVILEGES privilege
- ORA-06512: at "TEST.GET_DBA", line 1
- ORA-06512: at "SYS.LIST_LIBRARIES", line 9
- ORA-06512: at line 1
- SQL> conn sys as sysdba
- Enter password:
- Connected.
- SQL> alter system switch logfile;
- System altered.
- SQL> begin
- 2 dbms_logmnr.add_logfile( LogFileName =>βC:/app/backup/archive/ARC0000000240_0922032286.0001β,
- 3 options => DBMS_LOGMNR.NEW);
- 4 end;
- 5 /
- PL/SQL procedure successfully completed.
- SQL> begin
- 2 dbms_logmnr.add_logfile( LogFileName =>
- 3 ' C:/app/backup/CDB1/archivelog/2016_10_31/ ARC0000000241_0922032286.0001',
- 4 options => DBMS_LOGMNR.ADDFILE);
- 5 end;
- 6 /
- begin
- *
- ERROR at line 1:
- ORA-01284: file C:/app/backup/CDB1/archivelog/2016_10_31/ ARC0000000241_0922032286.0001 cannot be opened
- ORA-00308: cannot open archived log ' C:/app/backup/CDB1/archivelog/2016_10_31/ ARC0000000241_0922032286.0001'
- ORA-27041: unable to open file
- OSD-04002: unable to open file
- O/S-Error: (OS 123) The filename, directory name, or volume label syntax is incorrect.
- ORA-06512: at "SYS.DBMS_LOGMNR", line 68
- ORA-06512: at line 2
- SQL> begin
- 2 dbms_logmnr.add_logfile( LogFileName =>
- 3 'C:/app/backup/archive/ARC0000000241_0922032286.0001',
- 4 options => DBMS_LOGMNR.ADDFILE);
- 5 end;
- 6 /
- PL/SQL procedure successfully completed.
- SQL> begin
- 2 dbms_logmnr.add_logfile( LogFileName =>
- 3 'C:/app/backup/archive/ARC0000000242_0922032286.0001',
- 4 options => DBMS_LOGMNR.ADDFILE);
- 5 end;
- 6 /
- PL/SQL procedure successfully completed.
- SQL> begin
- 2 dbms_logmnr.start_logmnr( options => dbms_logmnr.dict_from_redo_logs +
- 3 dbms_logmnr.ddl_dict_tracking +
- 4 dbms_logmnr.print_pretty_sql);
- 5 end;
- 6 /
- begin
- *
- ERROR at line 1:
- ORA-01371: Complete LogMiner dictionary not found
- ORA-06512: at "SYS.DBMS_LOGMNR", line 58
- ORA-06512: at line 2
- SQL> Execute dbms_logmnr.start_logmnr( -
- > DICTFILENAME => 'C:\app\backup\logmnr\dictionary.ora');
- PL/SQL procedure successfully completed.
- SQL> Select username, operation, sql_redo, sql_undo from v$logmnr_contents where username =βTESTβ;
- no rows selected
- SQL>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement