Friday, December 30, 2016

Disable port from dynamic to static on SQLcluster 2012

Step1 :

Stop SQL services

Get cluster resource from powershell

PS C:\Users\Administrator.DOMAIN> Get-ClusterResource "SQL Network Name (sqlclustername)"


Step 2:

Remove checkpoint using below command from powershell

Get-ClusterResource "SQL Network Name (sqlclustername)" | Remove-ClusterCheckpoint -RegistryCheckpoint


Remove-ClusterCheckpoint
Are you sure you want to remove registry checkpoint 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.InstanceID\Cluster' on resource 'SQL Network Name (sqlclustername)'?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y


Remove-ClusterCheckpoint
Are you sure you want to remove registry checkpoint 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.InstanceID\MSSQLServer' on resource 'SQL Network Name (sqlclustername)'?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

Remove-ClusterCheckpoint
Are you sure you want to remove registry checkpoint 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.InstanceID\Replication' on resource 'SQL Network Name (sqlclustername)'?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

Remove-ClusterCheckpoint
Are you sure you want to remove registry checkpoint 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.InstanceID\Providers' on resource 'SQL Network Name (sqlclustername)'?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

Remove-ClusterCheckpoint
Are you sure you want to remove registry checkpoint 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.InstanceID\SQLServerSCP' on resource 'SQL Network Name (sqlclustername)'?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

Remove-ClusterCheckpoint
Are you sure you want to remove registry checkpoint 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.InstanceID\CPE' on resource 'SQL Network Name (sqlclustername)'?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

Remove-ClusterCheckpoint
Are you sure you want to remove registry checkpoint 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.InstanceID\SQLServerAgent' on resource 'SQL Network Name (sqlclustername)'?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

Remove-ClusterCheckpoint
Are you sure you want to remove registry checkpoint 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.sqlclustername\Cluster' on resource 'SQL Network Name (sqlclustername)'?

[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):



Step 3 :

Chage port from network protocals




Step 4 : Repeat above steps on remaining nodes


Step 5 : Add Checkpoints from powershell

Add-ClusterCheckpoint -ResourceName "SQL Network Name (sqlclustername)" -RegistryCheckpoint "SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.InstanceID\MSSQLServer" 
Add-ClusterCheckpoint -ResourceName "SQL Network Name (sqlclustername)" -RegistryCheckpoint "SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.InstanceID\Replication" 
Add-ClusterCheckpoint -ResourceName "SQL Network Name (sqlclustername)" -RegistryCheckpoint "SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.InstanceID\Providers" 
Add-ClusterCheckpoint -ResourceName "SQL Network Name (sqlclustername)" -RegistryCheckpoint "SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.InstanceID\SQLServerSCP" 
Add-ClusterCheckpoint -ResourceName "SQL Network Name (sqlclustername)" -RegistryCheckpoint "SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.InstanceID\CPE" 
Add-ClusterCheckpoint -ResourceName "SQL Network Name (sqlclustername)" -RegistryCheckpoint "SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.InstanceID\SQLServerAgent" 


Step 6: Now all set. Start the cluster services 



Thursday, October 27, 2016

Activating SSL on clients

Activating SSL on clients

To connect  through SSL, ensure you have set up the user’s grant with ‘REQUIRE SSL’ syntax, similar to below:


$ CREATE SCHEMA testdb;
$ GRANT ALL PRIVILEGES ON testdb.* TO 'test'@'127.0.0.1' IDENTIFIED BY 'password' REQUIRE SSL;
$ FLUSH PRIVILEGES;


Test the console connections by using the following command:


$ mysql -u test-p -h 127.0.0.1 -P3306 --ssl-ca=/etc/ssl/mysql/ca-cert.pem --ssl-cert=/etc/ssl/mysql/client-cert.pem --ssl-key=/etc/ssl/mysql/client-key.pem


Or specify the SSL configuration options inside my.cnf (or .my.cnf for user’s option file) under [client] directive:


[client]
ssl-ca=/etc/ssl/mysql/ca-cert.pem
ssl-cert=/etc/ssl/mysql/client-cert.pem
ssl-key=/etc/ssl/mysql/client-key.pem

 All connections from client applications  now fully encrypted.

Thursday, October 13, 2016

Materialized View Becomes Invalid After Recompiling


Workaround:

 alter session set "_connect_by_use_union_all" = false;


Now recompile the mviews

Sunday, September 25, 2016

Extract process abended

Error:

GGSCI (test.domain.com) 4> start EXTRACT EXT1

Sending START request to MANAGER ...

ERROR: Cannot create process '/home/oracle/gg11g/extract'. Child process is no longer alive
.

2016-09-25 12:09:00  WARNING OGG-01742  Command sent to MGR MGR returned with an ERROR response.



Solution:

SYS@oem> select FORCE_LOGGING,
  2  SUPPLEMENTAL_LOG_DATA_MIN from v$database;

FOR SUPPLEME
--- --------
NO  NO

SYS@oem> alter database force logging;

Database altered.

SYS@oem> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

Database altered.

SYS@oem>  select FORCE_LOGGING,SUPPLEMENTAL_LOG_DATA_MIN from v$database;

FOR SUPPLEME
--- --------
YES YES

Tuesday, August 30, 2016

How to Obtain a Formatted Explain Plan

Version 10.2 and higher
Last Executed SQL
In 10.2 and above, you can pull execution plans from the library cache if the SQL has already been executed (in addition to the standard explain plan option from earlier releases). To get the plan of the last executed SQL issue the following:
set linesize 150
set pagesize 2000
select * from table(dbms_xplan.display_cursor(null,null, 'ALL'));
SQL_ID and child number of the SQL are known
A SQL_ID can have multiple children with different characteristics. You can identify the child number by selecting from V$SQL as follows:
SELECT sql_id, hash_value, child_number, SUBSTR(sql_text,1,40) Text
FROM v$sql
WHERE sql_text LIKE '%&Some_Identifiable_String%'
/
The first child for a cursor will have a CHILD_NUMBER of zero.
Once you have this information, you can use dbms_xplan.display_cursor as follows:
set linesize 150
set pagesize 2000
select * from TABLE(dbms_xplan.display_cursor('&SQL_ID', &CHILD));
gather_plan_statistics hint
The gather_plan_statistics hint with some additional options may also provide run time statistics:e.g:
select /*+ gather_plan_statistics */ col1, col2 etc.....

set linesize 150
set pagesize 2000
select * from TABLE(dbms_xplan.display_cursor('&SQL_ID', &CHILD,'ALL IOSTATS LAST'))
Make sure the syntax is correct in the hint /*+ gather_plan_statistics */.  Do not use explain plan for:
 
EXPLAIN PLAN FOR
    SELECT /* +GATHER_PLAN_STATISTICS */ *  FROM tab1
    WHERE...

Otherwise following error will occur:
  
 - Warning: basic plan statistics not available. These are only collected when:
  * hint 'gather_plan_statistics' is used for the statement or
  * parameter 'statistics_level' is set to 'ALL', at session or system level
Correct syntax is following:
  
SELECT /*+ GATHER_PLAN_STATISTICS */ *  FROM tab1
    WHERE
..

select * from table(dbms_xplan.display_cursor(null,null,'advanced ALLSTATS LAST'));

Plan from Memory
For SQL ID :
select * from table(dbms_xplan.display_cursor('&sql_id'));
select * from table(dbms_xplan.display_cursor('&sql_id', NULL, 'ALL'));

For SQL ID, Child Cursor :
select * from table(dbms_xplan.display_cursor('&sql_id', &child_number, 'ALL'));

For SQL Text :
select t.*
from v$sql s, table(dbms_xplan.display_cursor(s.sql_id, s.child_number, 'ALL')) t
where s.sql_text like '%&querystring%';
From AWR
For SQL ID :
select * from table(dbms_xplan.display_awr('&sql_id')) ;
select * from table(dbms_xplan.display_awr('&sql_id', NULL, NULL, 'ALL')) ;

For SQL ID, Plan Hash Value in the current database :
select * from table(dbms_xplan.display_awr('&sql_id', '&plan_hash_value', NULL, 'ALL')) ;

For SQL ID, Plan Hash Value in a different database ID :
select * from table(dbms_xplan.display_awr('&sql_id', '&plan_hash_value', &dbid, 'ALL')) ;

For SQL ID that was executed during a certain period :
select t.*
from (select distinct sql_id, plan_hash_value, dbid
from dba_hist_sqlstat
where sql_id = '&sql_id'
and snap_id between &begin_snap and &end_snap) s,
table(dbms_xplan.display_awr(s.sql_id, s.plan_hash_value, s.dbid, 'ALL')) t;

For SQL Text :
select t.*
from (select distinct r.sql_id sql_id, r.plan_hash_value plan_hash_value, r.dbid dbid
from dba_hist_sqltext q, dba_hist_sqlstat r
where q.sql_id = r.sql_id
and q.sql_text like '%&querystring%') s,
table(dbms_xplan.display_awr(s.sql_id, s.plan_hash_value, s.dbid, 'ALL')) t;
From SQL Tuning Set (STS)
Note : STS owner is the current user by default.

For SQL ID in a STS :
select * from table (dbms_xplan.display_sqlset( '&sts_name','&sql_id'));

For All Statements in a STS :
select t.*
from dba_sqlset_statements s, table(dbms_xplan.display_sqlset(s.sqlset_name, s.sql_id, s.plan_hash_value, 'ALL', s.sqlset_owner)) t
where s.sqlset_name = '&sts_name';

For SQL ID, Plan Hash Value in a STS :
select * from table (dbms_xplan.display_sqlset( '&sts_name','&sql_id', '&plan_hash_value', 'ALL'));

For SQL ID, Plan Hash Value, STS Owner :
select * from table (dbms_xplan.display_sqlset( '&sts_name','&sql_id', '&plan_hash_value', 'ALL', '&sts_owner'));

For SQL Text in a STS :
select t.*
from dba_sqlset_statements s, table(dbms_xplan.display_sqlset(s.sqlset_name, s.sql_id, s.plan_hash_value, 'ALL', s.sqlset_owner)) t
where s.sqlset_name = '&sts_name'
and s.sql_text like '%&querystring%';
From SQL Plan Baseline
For SQL Handle :
select * from table(dbms_xplan.display_sql_plan_baseline('&sql_handle'));

For SQL Handle, Plan Name :
select * from table(dbms_xplan.display_sql_plan_baseline('&sql_handle', '&plan_name', 'ALL'));

For SQL Text :
select t.*
from (select distinct sql_handle, plan_name
from dba_sql_plan_baselines
where sql_text like '%&querystring%') s,
table(dbms_xplan.display_sql_plan_baseline(s.sql_handle, s.plan_name, 'ALL')) t;


Thursday, August 4, 2016

EMCLI “session expired” Error

./emcli sync

EMCLI “session expired” Error


Commands Fail if the domain name of the OMS fully qualified hostname contains .local in it.

Example:

omshostname.local

Bug 18678477 : EMCLI SETUP FAILS WHEN DOMAIN NAME HAS .LOCAL


OLD:

./emcli setup -url="https://oem.domain.local:7799/em" -username=sysman -trustall

New:
./emcli setup -url="https://oem:7799/em" -username=sysman -trustall



Saturday, July 9, 2016

How to check export dump file details

Create below procedure on system user

CONNECT system/manager 

CREATE OR REPLACE PROCEDURE show_dumpfile_info(
  p_dir  VARCHAR2 DEFAULT 'DATA_PUMP_DIR',
  p_file VARCHAR2 DEFAULT 'EXPDAT.DMP')
AS
-- p_dir        = directory object where dump file can be found
-- p_file       = simple filename of export dump file (case-sensitive)
  v_separator   VARCHAR2(80) := '--------------------------------------' ||
                                '--------------------------------------';
  v_path        all_directories.directory_path%type := '?';
  v_filetype    NUMBER;                 -- 0=unknown 1=expdp 2=exp 3=ext
  v_fileversion VARCHAR2(15);           -- 0.1=10gR1 1.1=10gR2 (etc.)
  v_info_table  sys.ku$_dumpfile_info;  -- PL/SQL table with file info
  type valtype  IS VARRAY(23) OF VARCHAR2(2048);
  var_values    valtype := valtype();
  no_file_found EXCEPTION;
  PRAGMA        exception_init(no_file_found, -39211);

BEGIN

-- Dump file details:
-- ==================
-- For Oracle10g Release 2 and higher:
--    dbms_datapump.KU$_DFHDR_FILE_VERSION        CONSTANT NUMBER := 1;
--    dbms_datapump.KU$_DFHDR_MASTER_PRESENT      CONSTANT NUMBER := 2;
--    dbms_datapump.KU$_DFHDR_GUID                CONSTANT NUMBER := 3;
--    dbms_datapump.KU$_DFHDR_FILE_NUMBER         CONSTANT NUMBER := 4;
--    dbms_datapump.KU$_DFHDR_CHARSET_ID          CONSTANT NUMBER := 5;
--    dbms_datapump.KU$_DFHDR_CREATION_DATE       CONSTANT NUMBER := 6;
--    dbms_datapump.KU$_DFHDR_FLAGS               CONSTANT NUMBER := 7;
--    dbms_datapump.KU$_DFHDR_JOB_NAME            CONSTANT NUMBER := 8;
--    dbms_datapump.KU$_DFHDR_PLATFORM            CONSTANT NUMBER := 9;
--    dbms_datapump.KU$_DFHDR_INSTANCE            CONSTANT NUMBER := 10;
--    dbms_datapump.KU$_DFHDR_LANGUAGE            CONSTANT NUMBER := 11;
--    dbms_datapump.KU$_DFHDR_BLOCKSIZE           CONSTANT NUMBER := 12;
--    dbms_datapump.KU$_DFHDR_DIRPATH             CONSTANT NUMBER := 13;
--    dbms_datapump.KU$_DFHDR_METADATA_COMPRESSED CONSTANT NUMBER := 14;
--    dbms_datapump.KU$_DFHDR_DB_VERSION          CONSTANT NUMBER := 15;
-- For Oracle11gR1:
--    dbms_datapump.KU$_DFHDR_MASTER_PIECE_COUNT  CONSTANT NUMBER := 16;
--    dbms_datapump.KU$_DFHDR_MASTER_PIECE_NUMBER CONSTANT NUMBER := 17;
--    dbms_datapump.KU$_DFHDR_DATA_COMPRESSED     CONSTANT NUMBER := 18;
--    dbms_datapump.KU$_DFHDR_METADATA_ENCRYPTED  CONSTANT NUMBER := 19;
--    dbms_datapump.KU$_DFHDR_DATA_ENCRYPTED      CONSTANT NUMBER := 20;
-- For Oracle11gR2:
--    dbms_datapump.KU$_DFHDR_COLUMNS_ENCRYPTED   CONSTANT NUMBER := 21;
--    dbms_datapump.KU$_DFHDR_ENCRIPTION_MODE     CONSTANT NUMBER := 22;
-- For Oracle12cR1:
--    dbms_datapump.KU$_DFHDR_COMPRESSION_ALG     CONSTANT NUMBER := 23;

-- For Oracle10gR2: KU$_DFHDR_MAX_ITEM_CODE       CONSTANT NUMBER := 15;
-- For Oracle11gR1: KU$_DFHDR_MAX_ITEM_CODE       CONSTANT NUMBER := 20;
-- For Oracle11gR2: KU$_DFHDR_MAX_ITEM_CODE       CONSTANT NUMBER := 22;
-- For Oracle12cR1: KU$_DFHDR_MAX_ITEM_CODE       CONSTANT NUMBER := 23;

-- Show header output info:
-- ========================

  dbms_output.put_line(v_separator);
  dbms_output.put_line('Purpose..: Obtain details about export ' ||
        'dumpfile.        Version: 18-DEC-2013');
  dbms_output.put_line('Required.: RDBMS version: 10.2.0.1.0 or higher');
  dbms_output.put_line('.          ' ||
        'Export dumpfile version: 7.3.4.0.0 or higher');
  dbms_output.put_line('.          ' ||
        'Export Data Pump dumpfile version: 10.1.0.1.0 or higher');
  dbms_output.put_line('Usage....: ' ||
        'execute show_dumfile_info(''DIRECTORY'', ''DUMPFILE'');');
  dbms_output.put_line('Example..: ' ||
        'exec show_dumfile_info(''MY_DIR'', ''expdp_s.dmp'')');
  dbms_output.put_line(v_separator);
  dbms_output.put_line('Filename.: ' || p_file);
  dbms_output.put_line('Directory: ' || p_dir);

-- Retrieve Export dumpfile details:
-- =================================

  SELECT directory_path INTO v_path FROM all_directories
   WHERE directory_name = p_dir
      OR directory_name = UPPER(p_dir);

  dbms_datapump.get_dumpfile_info(
           filename   => p_file,       directory => UPPER(p_dir),
           info_table => v_info_table, filetype  => v_filetype);

  var_values.EXTEND(23);
  FOR i in 1 .. 23 LOOP
    BEGIN
      SELECT value INTO var_values(i) FROM TABLE(v_info_table)
       WHERE item_code = i;
    EXCEPTION WHEN OTHERS THEN var_values(i) := '';
    END;
  END LOOP;

  dbms_output.put_line('Disk Path: ' || v_path);

  IF v_filetype >= 1 THEN
    -- Get characterset name:
    BEGIN
      SELECT var_values(5) || ' (' || nls_charset_name(var_values(5)) ||
        ')' INTO var_values(5) FROM dual;
    EXCEPTION WHEN OTHERS THEN null;
    END;
    IF v_filetype = 2 THEN
      dbms_output.put_line(
         'Filetype.: ' || v_filetype || ' (Original Export dumpfile)');
      dbms_output.put_line(v_separator);
      SELECT DECODE(var_values(13), '0', '0 (Conventional Path)',
        '1', '1 (Direct Path)', var_values(13))
        INTO var_values(13) FROM dual;
      dbms_output.put_line('...Characterset ID of source db..: ' || var_values(5));
      dbms_output.put_line('...Direct Path Export Mode.......: ' || var_values(13));
      dbms_output.put_line('...Export Version................: ' || var_values(15));
    ELSIF v_filetype = 1 OR v_filetype = 3 THEN
      SELECT SUBSTR(var_values(1), 1, 15) INTO v_fileversion FROM dual;
      SELECT DECODE(var_values(1),
                    '0.1', '0.1 (Oracle10g Release 1: 10.1.0.x)',
                    '1.1', '1.1 (Oracle10g Release 2: 10.2.0.x)',
                    '2.1', '2.1 (Oracle11g Release 1: 11.1.0.x)',
                    '3.1', '3.1 (Oracle11g Release 2: 11.2.0.x)',
                    '4.1', '4.1 (Oracle12c Release 1: 12.1.0.x)',
        var_values(1)) INTO var_values(1) FROM dual;
      SELECT DECODE(var_values(2), '0', '0 (No)', '1', '1 (Yes)',
        var_values(2)) INTO var_values(2) FROM dual;
      SELECT DECODE(var_values(14), '0', '0 (No)', '1', '1 (Yes)',
        var_values(14)) INTO var_values(14) FROM dual;
      SELECT DECODE(var_values(18), '0', '0 (No)', '1', '1 (Yes)',
        var_values(18)) INTO var_values(18) FROM dual;
      SELECT DECODE(var_values(19), '0', '0 (No)', '1', '1 (Yes)',
        var_values(19)) INTO var_values(19) FROM dual;
      SELECT DECODE(var_values(20), '0', '0 (No)', '1', '1 (Yes)',
        var_values(20)) INTO var_values(20) FROM dual;
      SELECT DECODE(var_values(21), '0', '0 (No)', '1', '1 (Yes)',
        var_values(21)) INTO var_values(21) FROM dual;
      SELECT DECODE(var_values(22),
                    '1', '1 (Unknown)',
                    '2', '2 (None)',
                    '3', '3 (Password)',
                    '4', '4 (Password and Wallet)',
                    '5', '5 (Wallet)',
        var_values(22)) INTO var_values(22) FROM dual;
      SELECT DECODE(var_values(23),
                    '2', '2 (None)',
                    '3', '3 (Basic)',
                    '4', '4 (Low)',
                    '5', '5 (Medium)',
                    '6', '6 (High)',
        var_values(23)) INTO var_values(23) FROM dual;
      IF v_filetype = 1 THEN
        dbms_output.put_line(
           'Filetype.: ' || v_filetype || ' (Export Data Pump dumpfile)');
        dbms_output.put_line(v_separator);
        dbms_output.put_line('...Database Job Version..........: ' || var_values(15));
        dbms_output.put_line('...Internal Dump File Version....: ' || var_values(1));
        dbms_output.put_line('...Creation Date.................: ' || var_values(6));
        dbms_output.put_line('...File Number (in dump file set): ' || var_values(4));
        dbms_output.put_line('...Master Present in dump file...: ' || var_values(2));
        IF dbms_datapump.KU$_DFHDR_MAX_ITEM_CODE > 15 AND v_fileversion >= '2.1' THEN
          dbms_output.put_line('...Master in how many dump files.: ' || var_values(16));
          dbms_output.put_line('...Master Piece Number in file...: ' || var_values(17));
        END IF;
        dbms_output.put_line('...Operating System of source db.: ' || var_values(9));
        IF v_fileversion >= '2.1' THEN
          dbms_output.put_line('...Instance Name of source db....: ' || var_values(10));
        END IF;
        dbms_output.put_line('...Characterset ID of source db..: ' || var_values(5));
        dbms_output.put_line('...Language Name of characterset.: ' || var_values(11));
        dbms_output.put_line('...Job Name......................: ' || var_values(8));
        dbms_output.put_line('...GUID (unique job identifier)..: ' || var_values(3));
        dbms_output.put_line('...Block size dump file (bytes)..: ' || var_values(12));
        dbms_output.put_line('...Metadata Compressed...........: ' || var_values(14));
        IF dbms_datapump.KU$_DFHDR_MAX_ITEM_CODE > 15 THEN
          dbms_output.put_line('...Data Compressed...............: ' || var_values(18));
          IF dbms_datapump.KU$_DFHDR_MAX_ITEM_CODE > 22 AND v_fileversion >= '4.1' THEN
            dbms_output.put_line('...Compression Algorithm.........: ' || var_values(23));
          END IF;
          dbms_output.put_line('...Metadata Encrypted............: ' || var_values(19));
          dbms_output.put_line('...Table Data Encrypted..........: ' || var_values(20));
          dbms_output.put_line('...Column Data Encrypted.........: ' || var_values(21));
          dbms_output.put_line('...Encryption Mode...............: ' || var_values(22));
        END IF;
      ELSE
        dbms_output.put_line(
           'Filetype.: ' || v_filetype || ' (External Table dumpfile)');
        dbms_output.put_line(v_separator);
        dbms_output.put_line('...Database Job Version..........: ' || var_values(15));
        dbms_output.put_line('...Internal Dump File Version....: ' || var_values(1));
        dbms_output.put_line('...Creation Date.................: ' || var_values(6));
        dbms_output.put_line('...File Number (in dump file set): ' || var_values(4));
        dbms_output.put_line('...Operating System of source db.: ' || var_values(9));
        IF v_fileversion >= '2.1' THEN
          dbms_output.put_line('...Instance Name of source db....: ' || var_values(10));
        END IF;
        dbms_output.put_line('...Characterset ID of source db..: ' || var_values(5));
        dbms_output.put_line('...Language Name of characterset.: ' || var_values(11));
        dbms_output.put_line('...GUID (unique job identifier)..: ' || var_values(3));
        dbms_output.put_line('...Block size dump file (bytes)..: ' || var_values(12));
        IF dbms_datapump.KU$_DFHDR_MAX_ITEM_CODE > 15 THEN
          dbms_output.put_line('...Data Compressed...............: ' || var_values(18));
          IF dbms_datapump.KU$_DFHDR_MAX_ITEM_CODE > 22 AND v_fileversion >= '4.1' THEN
            dbms_output.put_line('...Compression Algorithm.........: ' || var_values(23));
          END IF;
          dbms_output.put_line('...Table Data Encrypted..........: ' || var_values(20));
          dbms_output.put_line('...Encryption Mode...............: ' || var_values(22));
        END IF;
      END IF;
      dbms_output.put_line('...Internal Flag Values..........: ' || var_values(7));
      dbms_output.put_line('...Max Items Code (Info Items)...: ' ||
                  dbms_datapump.KU$_DFHDR_MAX_ITEM_CODE);
    END IF;
  ELSE
    dbms_output.put_line('Filetype.: ' || v_filetype);
    dbms_output.put_line(v_separator);
    dbms_output.put_line('ERROR....: Not an export dumpfile.');
  END IF;
  dbms_output.put_line(v_separator);

EXCEPTION
  WHEN no_data_found THEN
    dbms_output.put_line('Disk Path: ?');
    dbms_output.put_line('Filetype.: ?');
    dbms_output.put_line(v_separator);
    dbms_output.put_line('ERROR....: Directory Object does not exist.');
    dbms_output.put_line(v_separator);
  WHEN no_file_found THEN
    dbms_output.put_line('Disk Path: ' || v_path);
    dbms_output.put_line('Filetype.: ?');
    dbms_output.put_line(v_separator);
    dbms_output.put_line('ERROR....: File does not exist.');
    dbms_output.put_line(v_separator);
END;
/
 


SYSTEM@wood> SET serveroutput on SIZE 1000000

SYSTEM@wood>  exec show_dumpfile_info(p_dir=> 'DATA_PUMP_DIR', p_file=> 't2.dmp');

----------------------------------------------------------------------------
Purpose..: Obtain details about export dumpfile.        Version: 18-DEC-2013
Required.: RDBMS version: 10.2.0.1.0 or higher
.          Export dumpfile version: 7.3.4.0.0 or higher
.          Export Data Pump dumpfile version: 10.1.0.1.0 or higher
Usage....: execute show_dumfile_info('DIRECTORY', 'DUMPFILE');
Example..: exec show_dumfile_info('MY_DIR', 'expdp_s.dmp')
----------------------------------------------------------------------------
Filename.: t2.dmp
Directory: DATA_PUMP_DIR
Disk Path: /u01/app/oracle/admin/wood/dpdump/
Filetype.: 1 (Export Data Pump dumpfile)
----------------------------------------------------------------------------
...Database Job Version..........: 11.02.00.00.00
...Internal Dump File Version....: 3.1 (Oracle11g Release 2: 11.2.0.x)
...Creation Date.................: Sat Jul 09 10:35:59 2016
...File Number (in dump file set): 1
...Master Present in dump file...: 1 (Yes)
...Master in how many dump files.: 1
...Master Piece Number in file...: 1
...Operating System of source db.: x86_64/Linux 2.4.xx
...Instance Name of source db....: test
...Characterset ID of source db..: 178 (WE8MSWIN1252)
...Language Name of characterset.: WE8MSWIN1252
...Job Name......................: "SYS"."SYS_EXPORT_TABLE_01"
...GUID (unique job identifier)..: 3735D5E2856463E6E0532200A8C07FC7
...Block size dump file (bytes)..: 4096
...Metadata Compressed...........: 1 (Yes)
...Data Compressed...............: 0 (No)
...Metadata Encrypted............: 0 (No)
...Table Data Encrypted..........: 0 (No)
...Column Data Encrypted.........: 0 (No)
...Encryption Mode...............: 2 (None)
...Internal Flag Values..........: 2
...Max Items Code (Info Items)...: 22
----------------------------------------------------------------------------

PL/SQL procedure successfully completed.


Refer Metalink ID(462488.1)

Saturday, July 2, 2016

Internet Explorer Has Modified This Page To Prevent Cross-site Scripting R12 page



1. Make a backup copy of the original Forms system-jazn-data.xml.
       This file is found in $INST_TOP/ora/10.1.3/j2ee/forms/config/system-jazn-data.xml

   2. Change oc4jadmin password if the password is unknown
 
   $ vi $INST_TOP/ora/10.1.3/j2ee/forms/config/system-jazn-data.xml

========= excerpt from original file =============

oc4jadmin
OC4J Administrator
oc4jadmin
OC4J Administrator
OC4J Administrator
{903}9VrhYTuhd7DyBJf7J/4KwbSEIlETQJOO
==================================================

========= excerpt from file with change ==========

oc4jadmin
OC4J Administrator
oc4jadmin
OC4J Administrator
OC4J Administrator
!welcome123

==================================================


$
 

   3. Execute $FND_TOP/bin/txkrun.pl -script=CfgOC4JApp

         Enter Application name for re-deployment ? forms
         Enter Oc4j Instance password for re-deployment ? welcome (or current password)
         Run Autoconfig ? No 

    4. Run AutoConfig on the instance by running the command:
   
        $ADMIN_SCRIPTS_HOME/adautocfg.sh

Internet Explorer Has Modified This Page To Prevent Cross-site Scripting R12 page



1. Make a backup copy of the original Forms system-jazn-data.xml.
       This file is found in $INST_TOP/ora/10.1.3/j2ee/forms/config/system-jazn-data.xml

   2. Change oc4jadmin password if the password is unknown
 
   $ vi $INST_TOP/ora/10.1.3/j2ee/forms/config/system-jazn-data.xml

========= excerpt from original file =============

oc4jadmin
OC4J Administrator
oc4jadmin
OC4J Administrator
OC4J Administrator
{903}9VrhYTuhd7DyBJf7J/4KwbSEIlETQJOO
==================================================

========= excerpt from file with change ==========

oc4jadmin
OC4J Administrator
oc4jadmin
OC4J Administrator
OC4J Administrator
!welcome123

==================================================


$
 

   3. Execute $FND_TOP/bin/txkrun.pl -script=CfgOC4JApp

         Enter Application name for re-deployment ? forms
         Enter Oc4j Instance password for re-deployment ? welcome (or current password)
         Run Autoconfig ? No 

    4. Run AutoConfig on the instance by running the command:
   
        $ADMIN_SCRIPTS_HOME/adautocfg.sh

Internet Explorer Has Modified This Page To Prevent Cross-site Scripting R12 page



1. Make a backup copy of the original Forms system-jazn-data.xml.
       This file is found in $INST_TOP/ora/10.1.3/j2ee/forms/config/system-jazn-data.xml

   2. Change oc4jadmin password if the password is unknown
 
   $ vi $INST_TOP/ora/10.1.3/j2ee/forms/config/system-jazn-data.xml

========= excerpt from original file =============

oc4jadmin
OC4J Administrator
oc4jadmin
OC4J Administrator
OC4J Administrator
{903}9VrhYTuhd7DyBJf7J/4KwbSEIlETQJOO
==================================================

========= excerpt from file with change ==========

oc4jadmin
OC4J Administrator
oc4jadmin
OC4J Administrator
OC4J Administrator
!welcome123

==================================================

:wq!
$
 

   3. Execute $FND_TOP/bin/txkrun.pl -script=CfgOC4JApp

         Enter Application name for re-deployment ? forms
         Enter Oc4j Instance password for re-deployment ? welcome (or current password)
         Run Autoconfig ? No 

    4. Run AutoConfig on the instance by running the command:
   
        $ADMIN_SCRIPTS_HOME/adautocfg.sh