Monthly Archives: gennaio 2015

TKPROF ED EXPLAIN PLAN
  • 29
    Gen

TKPROF ED EXPLAIN PLAN

TKPROF The TKPROF program converts Oracle trace files into a more readable form. If you have a problem query you can user TKPROF to get more information. The TKProf executable is located in the ORACLE HOME/bin directory. Step: sqlplus schema/password set head off ALTER SESSION SET sql_trace = true; ALTER SESSION SET tracefile_identifier = trace_xxx; run the query...

Read More
A simple way to run n-script sql in one command.
  • 20
    Gen

A simple way to run n-script sql in one command.

The following script.sh will help you launch even a great number of sql script assuming you are running oracle under a unix machine the script wants you give it the following instructions: dbuser, dbpassword, sid AND a list of the script.sql you want to launch. this script also stop and rollback on oracle error. ======= #!/bin/bash # the...

Read More
Copy Asm Datafile to another diskgroup
  • 12
    Gen

Copy Asm Datafile to another diskgroup

SQL> select file_name from dba_data_files where tablespace_name='TEST'; FILE_NAME ------------------------------------------------------ +DATA/TEST/datafile/test_01.363.837018395 SQL> alter database datafile '+DATA/TEST/datafile/test_01.363.837018395' offline; RMAN> copy datafile '+DATA/TEST/datafile/test_01.363.837018395' to '+DATA_2'; RMAN>run { set newname for datafile '+DATA/TEST/datafile/test_01.363.837018395' to '+DATA_2/TEST/datafile/test_01.264.837098131' ; switch datafile all; } SQL> recover datafile '+DATA_2/TEST/datafile/test_01.264.837098131'; SQL> alter database datafile '+DATA_2/TEST/datafile/test_01.264.837098131' online; SQL> select file_name from dba_data_files where tablespace_name='TEST'; FILE_NAME ----------------------------- +DATA_2/TEST/datafile/test_01.264.837098131 SQL> alter...

Read More
Setup Oracle 12c Enterprise Manager Express for a PDB
  • 4
    Gen

Setup Oracle 12c Enterprise Manager Express for a PDB

There are many articles on the web explaining how to create, duplicate or plug/unplug a Pluggable Database (PDB) into a Container Database (CDB), e remarkable new feature in Oracle 12c Database. A few of them show how to open and use the Oracle 12c Enterprise Manager Express, the new web graphical administration application created "out-of-the-box" in every Oracle...

Read More