﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Bert Scalzo's Blog</title>
    <description>&lt;table&gt;
        &lt;tr&gt;
            &lt;td valign="top"&gt;&lt;img height="183" alt="" width="139" src="/Portals/0/Blog/blog-bert-scalzo.png" /&gt;&lt;/td&gt;
            &lt;td valign="top"&gt;Bert Scalzo is a product architect for Quest Software,&amp;#160;a member of the Toad team and an &lt;a href="http://www.oracle.com/technology/community/oracle_ace/index.html"&gt;Oracle ACE&lt;/a&gt;. He has worked with Oracle databases for over two decades; his key areas of interest are data modeling, database benchmarking, tuning and optimization, "Star Schema" data warehouses and Linux. Bert is the author of several books and has written articles for many online outlets and publications,&amp;#160;and has presented at numerous Oracle conferences and user groups.
            &lt;p&gt;Bert's blog provides useful Toad “how to” and “tips and tricks” covering topics on database admin and benchmarking.&lt;/p&gt;
            &lt;p&gt;&lt;font color="#003366" size="3"&gt;&lt;strong&gt;Recent postings:&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
&lt;/table&gt;</description>
    <link>http://toadworld.com/BLOGS/tabid/67/BlogId/14/Default.aspx</link>
    <language>en-US</language>
    <managingEditor>Bert Scalzo</managingEditor>
    <webMaster>webmaster@toadworld.com</webMaster>
    <pubDate>Thu, 18 Mar 2010 01:01:11 GMT</pubDate>
    <lastBuildDate>Thu, 18 Mar 2010 01:01:11 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 3.2.0.15477</generator>
    <item>
      <title>Toad Dynamic SQL Scripting</title>
      <description>&lt;div&gt;Sometimes people will request that Toad have a certain special new feature, often special to the task at hand which they’re trying to accomplish. Keeping in mind my recent Toad blog about &lt;a href="http://www.toadworld.com/Community/ExpertsBlog/tabid/67/EntryID/172/Default.aspx"&gt;SQL*Plus compatibility&lt;/a&gt;, there are very often easy ways to use existing Toad features to do what they want.  In fact, many times it’s simply using Toad’s SQL*Plus capabilities once again – namely, just using the Toad editor to write dynamic SQL scripts (i.e. scripts that write scripts). Here’s an example.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Let’s say we want to simply toggle off all our referential integrity in the current schema such that we can run an import or data load. The idea being two fold – we want to maximize the load speed and also forgo the error messages for now. One way to accomplish this task would be to open the schema browser; multi-select all those tables to process, and then press the disable toolbar button. That’s still a lot of manual effort, plus there just happens to be a toolbar button to do what I’m asking. But, what if the enable/disable buttons were not there – or better yet, that we just simply did not know about them? Now we might ask for a new feature to do this. Yet it’s easily done via SQL *Plus scripting – and Toad’s support for it:&lt;br /&gt;
 &lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;a href="http://toadworld.com/LinkClick.aspx?fileticket=ZWcvG0dbwhA%3d&amp;tabid=67"&gt;&lt;img height="390" alt="Click image to view full size" width="500" src="http://toadworld.com/Portals/0/blogimages/BertBlog0206-1-sm.gif" /&gt;&lt;/a&gt; &lt;br /&gt;
&lt;font size="1"&gt;&lt;strong&gt;Click image above to view full size.&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;The following SQL script executed the Toad editor as a script (i.e. F5), can be made to accomplish the exact same thing. It’s smart enough to both adjust to the changing nature of the database – and to require an absolute minimum amount of work (i.e. steps to do).&lt;/div&gt;
&lt;div&gt;  &lt;/div&gt;
&lt;div&gt;&lt;a href="http://toadworld.com/LinkClick.aspx?fileticket=2U27ufpn46c%3d&amp;tabid=67"&gt;&lt;img alt="Click image to view full size" src="http://toadworld.com/Portals/0/blogimages/BertBlog0206-2-sm.gif" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;font size="1"&gt;&lt;strong&gt;Click image above to view full size.&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;  &lt;/div&gt;
&lt;div&gt;Look at that! The script creates the correct script of commands based upon the current status of the data dictionary data. So this script is always up to date – and requires no modifications as the database or its objects change. Now since I’m so totally lazy (i.e. like to press as few buttons as possible), I’d simply add this script to my Toad script manager such that I can run it anytime from anywhere by simply pressing one button.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;a href="http://toadworld.com/LinkClick.aspx?fileticket=w%2b56HX1lBJs%3d&amp;tabid=67"&gt;&lt;img height="113" alt="Click image to view full size" width="500" src="http://toadworld.com/Portals/0/blogimages/BertBlog0206-3-sm.gif" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;font size="1"&gt;&lt;strong&gt;Click image above to view full size.&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;</description>
      <link>http://toadworld.com/BLOGS/tabid/67/EntryID/175/Default.aspx</link>
      <author>Bert Scalzo</author>
      <comments>http://toadworld.com/BLOGS/tabid/67/EntryID/175/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://toadworld.com/Default.aspx?tabid=67&amp;EntryID=175</guid>
      <pubDate>Wed, 06 Feb 2008 15:36:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://toadworld.com/DesktopModules/Blog/Trackback.aspx?id=175</trackback:ping>
    </item>
  </channel>
</rss>