Toad World® Forums

Cannot view scripts for tables & views

Hello everyone! I’m relatively new to Toad for Data Analysts, and I have run into a problem when trying to view the script for a table or a view. While it returns the columns and data, when I click on the “Script” tab it flashes “Generating script in background” (I think) for about 1/4 second, and then nothing. The task bar is closed so I believe the task is complete but no script displays.

I’m not sure if this a software or a permissions problem. Any help will be greatly appreciated.



What type and version of a database are you using? The Script tab is generated differently depending on conneciton type. If you are using the Native Oracle connection you need to have privileges to the DBMS_METADATA package.


I’m sorry - I should have included this in my original post: I am running Toad for Data Analysts v3.0.1.1734, connecting to DB2 LUW (AIX) v9.7.

Are you using ODBC to connect with or our Native Db2 connection?
If you are using ODBC change to native.

If you are using a native DB2 connection you need SELECTauth on the SYSCAT IBM Catalog views.
Do you have that privilege? Do you get data when selecting from that view?


I am using the same ODBC drivers that the others here are using (successfully). Thinking it might be a problem with privileges, I had a DBA sign on to my PC with his ID, which has full access, of course, and we got the same results. Since the message says, “Generating script in background” I’m wondering if there is option that is sending the script into cyber-space instead of returning it to my screen. I’ve looked under OPTIONS but I didn’t see anything. Any thoughts?

Dont use ODBC as a connection. Use the Native Connection. See screenshot.


That is what I have - I apologize- I did not explain myself clearly.


See attached screenshot.

Does this happen for you for all tables/views or just a select few?
It is interesting that the DBA id yielded the same results on your machine.
Can the DBA go back to his workstation and successfully view the script for the table that failed on your machine?
If this only happends for several objects, Is there anything in particular about those objects?

Can you right click on the table in the object explorer and select …Create Like?
A new Create Table Dialog should open up. At that time please enter a new table name and generate the script.
Can you right click on the table in the object explorer and select …Generate SQL…To Editor…Creation Script? Or Select Statement?

Please let us know how that goes.

This happens for all tables and view, both on DB2 AIX and DB2 zOS. Yes, the DBA and other DA’s can see the script on their PC’s (although the DBA is running the full version of TOAD for DB2), so I believe the problem lies in either a setting or how the software was installed on this PC.

When I tried to select Create Like, I got the following error:

The type initializer for ‘Quest.Compare.Schema.DB2.DBModel.CNS2Loader’ threw an exception.
Stack Trace:
at Quest.Compare.Schema.DB2.DBModel.CNS2Loader.LimitationsGenerator.GetFieldsAndClauses(SQLObject indType, QueryInd indQuery, Boolean bIncludeContainersContent)
at Quest.Compare.Schema.DB2.DBModel.CNS2Loader.LimitationsGenerator.CreateLimitations(ScriptActionInd indAction, ICollection1 arObjs, Boolean bIncludeContainersContent) at Quest.Compare.Schema.DB2.Scripter.DB2Scripter.Factory.CreateLimitations(ScriptActionInd indAction, ICollection1 arObjs, Boolean bIncludeReferenced)
at Quest.Compare.Schema.DB2.Scripter.DB2Scripter.Factory.FillModel(ScriptActionInd indAction, ICollection1 arDB2Objs, ScriptModeInd indSMode, IList1& alSchemasParent, Boolean bIncludeContainersContent)
at Quest.Compare.Schema.DB2.Scripter.DB2Scripter.Factory.FillModel(ScriptActionInd indAction, ICollection`1 arDB2Objs, ScriptModeInd indSMode)
at Quest.Compare.Schema.DB2.Scripter.DB2Scripter.Factory.GetNode(ISqlObject idb2Obj)
at Quest.Toad.DB2.Doe.Table.TableEditorLUW.CreateNewCNSTable()
at Quest.Toad.DB2.Doe.Table.TableEditorLUW.Initialize()
at Quest.Toad.Doe.BaseDoeForm.BaseDoeForm_Load(Object sender, EventArgs e)
at Quest.Toad.Doe.BaseDoeForm.PreShowInitialize()
at Quest.Toad.Doe.BaseDoeForm.Alter(Object sender, UIActionEntry uiEntry, ITrl[] trls, Object customModeTag)
at Quest.Toad.Doe.BaseDoeForm.Alter(Object sender, ItemClickEventArgs e, Object customModeTag)
at Quest.Toad.Doe.BaseDoeForm.CreateLike(Object sender, ItemClickEventArgs e)

The configuration section 'connectionStrings' has an unexpected declaration.
Stack Trace:
   at System.Configuration.ConfigurationManager.get_ConnectionStrings()
   at System.Configuration.PrivilegedConfigurationManager.get_ConnectionStrings()
   at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties)
   at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider)
   at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
   at System.Configuration.SettingsBase.get_Item(String propertyName)
   at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
   at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
   at Quest.Compare.Schema.DB2.DBModel.Properties.Settings.get_MultiThreadLoading()
   at Quest.Compare.Schema.DB2.DBModel.CNS2Loader..cctor()

Thanks for the information.
Can you let us know on your machine that is having the issues:

  • How many Toad for Data Analyst products do you have installed?
    • what versions?
    • how were those installed?
  • How many Toad for DB2 products do you have installed?
    • what versions?
    • how were those installed?


Currently I only have one copy of Toad for Data Analysts Base Edition v3.0.1.1734 installed. The installation was performed our software team here at JCP. At first they installed Toad for DB2 but this product was uninstalled and replace by Toad for Data Analysts. Unfortunately I do not have a record of which version of Toad for DB2 was installed and removed.

I also have Quest Installer, Toad for Oracle and Quest SQL Optimizer for Oracle 8.0.01551 installed on this machine. A check of the registry confirms this; Toad for DB2 does not appear in the registry.

The installation is is kept on a network drive and the software team uses a remote access product to take control of the PC and install the software.

Message was edited by: Rick_S

Thanks for the information.
Can you please assist us by using Toad for Data Analyst to:

  • Recreate the exception caused by ‘Create Like’ action
  • Immediately create a support bundle (via Help | Support bundle)
    Post that support bundle file or send it to me at



I have sent you (and an email generated by the Support function.

Thanks for your help!


Thanks again for this information.
I have opened CR 94521 to track this issue.

Any progress on this issue?



We are having trouble reproducing this on our end. The developers are suspicious of what dlls are being loaded when you run your app.

Can you run TDA and produce the no script issue? Then go to Accessories| System Information | Software Environment | loaded Modules. Take a screenshot as wide as you can to get the full paths showing all dlls that start with "Quest.Compare".

See my sample screenshot.


Here it is:

I should add that I had our software support uninstall and then, after rebooting, re-install TDA this afternoon.

The only difference I see is that my loaded modules are using some of GAC dlls and yours are not.

Let’s try this.

  1. Go to your install dir and runn the ngenUninstall.bat. This will uninstall our dlls in the GAC.
  2. Then run NGenWrapper.exe. Wait for it to finish. You may need to watch the task manager to see when done.
  3. Retry the script tab.
  4. If still errors send new screen shot of loaded modules and the file ngen.txt created in the in the install dir.