Difference between revisions of "Oracle Tidbits"

From ChipWiki
Jump to navigationJump to search
(Clean Output SQLPlus Settings)
Line 19: Line 19:
 
<li>SET PAGESIZE 0</li>
 
<li>SET PAGESIZE 0</li>
 
<li>SET LINESIZE 200 (or whatever)</li>
 
<li>SET LINESIZE 200 (or whatever)</li>
 +
<li>SET LONG 90000</li>
 
</ul>
 
</ul>

Revision as of 16:15, 21 April 2008

Useful things I always forget about Oracle

If Archive Logs Fill Up

After you've made some space, or to direct archiving to an emptier place, remind Oracle where to right the archive files. When it locks up, it resets something in memory that needs to be reset.

  • SQLPLUS /NOLOG
  • Connect internal
  • alter system set log_archive_dest_1="LOCATION=F:\ORACLE\EDWD" SCOPE=MEMORY;

Retrieving DDL from Oracle 9i

Use this:

SELECT DBMS_METADATA.GET_DDL(object_type, object_name, owner)

as in:

SELECT DBMS_METADATA.GET_DDL('TABLE', MY_TABLE, CHIP);

Setting Up a Clean Output for long Spools from SQL*Plus

  • SET HEAD OFF
  • SET FEED OFF
  • SET PAGESIZE 0
  • SET LINESIZE 200 (or whatever)
  • SET LONG 90000