About Me

Database and GIS Consultant.

Tuesday, June 2, 2020

Dump contents of Oracle INIT Parameter File

Purpose: Dump the content of init parameter file that was used to start the database or create a copy of parameters and its values that was used to start the database

Environment: Oracle 12cR1 DB, on Windows, using a basic initXXXX.ora at its default location [$ORACLE_HOME\database]

SET FEEDBACK OFF 
SET LINES 190
SET PAGES 1000
COL NAME FOR A160
COL INIT FOR A190

SPOOL C:\TMP\INIT_copy.TXT

select distinct INIT from
(SELECT NAME||' = '''||VALUE||'''' INIT FROM v$system_parameter where ISDEFAULT='FALSE' and TYPE = 2 
UNION ALL
SELECT NAME||' = '||VALUE INIT FROM v$system_parameter where ISDEFAULT='FALSE' and TYPE <> 2)
order by 1;

SPOOL OFF

Init Parameters


No comments: