However last week I came across a need to get the percent of total for 1000’s of records. Most of the time (if you are like me) you spend 85 of your time writing basic Select statements with a variety of where clauses. Old 1: SELECT DBMS_METADATA.GET_DDL('TABLESPACE','&TABLESPACE_NAME') FROM dual I am always amazed at how SQL server provides a lot of calculations and logic built right into a select statement. SQL> SELECT DBMS_METADATA.GET_DDL('TABLESPACE','&TABLESPACE_NAME') FROM dual Enter the tablespace Name then it will get you the DDL for your tablespace. In SQL Server 2005 Management Studio, it appears that the output of PRINT statements doesn't appear immediately: If I have a PRINT statement followed by a long-running statement, the PRINT output doesn't appear until after the following statement. SELECT DBMS_METADATA.GET_DDL('TABLESPACE','&TABLESPACE_NAME') FROM dual Get the DDL for specific tablespace present in Oracle Note: If you want the Semicolon after every statement generated then you can execute the following command at your session Enable the SQL Terminator after each object syntax completed.ĮXEC DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SQLTERMINATOR',TRUE)
Get fully functioning software free for 30 days or download freeware. A new Treat blank line as statement terminator option was added to Toad. Toad World Downloads No matter which database platforms you use, we offer solutions that make your job easier than ever. to the targeted SQL server and not your client running this command. The configuration settings are not saved to the database server until the Apply. Select dbms_metadata.get_ddl('TABLESPACE',tb.tablespace_name) from dba_tablespaces tb You can insert into a varbinary(max) field using T-SQL within SQL Server Management.
Get the DDL of all the Tablespaces present in Oracle
Fetch the DDL commands for all or one tablespace in Oracle