# Cannot view scripts for tables & views

**URL:** <https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023>\
**Category:** Toad Data Point & Toad Intelligence Central\
**Created:** [January 6, 2012, 11:13am UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023 "2012-01-06T11:13:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick\_S](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Rick\_S](https://forums.toadworld.com/u/Rick_S)\
**Post date:** [January 6, 2012, 11:13am UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/1 "2012-01-06T11:13:38Z")

</div>

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.

Thanks!

Rick

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [January 6, 2012, 11:43am UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/2 "2012-01-06T11:43:14Z")

</div>

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.

Debbie

---

<div class="post-metadata">

**Author:** ![Rick\_S](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Rick\_S](https://forums.toadworld.com/u/Rick_S)\
**Post date:** [January 6, 2012, 1:10pm UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/3 "2012-01-06T13:10:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [January 6, 2012, 4:28pm UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/4 "2012-01-06T16:28:09Z")

</div>

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?

Debbie

---

<div class="post-metadata">

**Author:** ![Rick\_S](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Rick\_S](https://forums.toadworld.com/u/Rick_S)\
**Post date:** [January 9, 2012, 11:51am UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/5 "2012-01-09T11:51:37Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [January 9, 2012, 1:24pm UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/6 "2012-01-09T13:24:37Z")

</div>

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

Debbie  
 ![DB2Connection.png](https://global.discourse-cdn.com/quest/original/2X/2/2503ac9639aca5954ef6af870820df3a9699ecce.png)

---

<div class="post-metadata">

**Author:** ![Rick\_S](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Rick\_S](https://forums.toadworld.com/u/Rick_S)\
**Post date:** [January 9, 2012, 2:04pm UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/7 "2012-01-09T14:04:01Z")

</div>

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

null

---

<div class="post-metadata">

**Author:** ![Rick\_S](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Rick\_S](https://forums.toadworld.com/u/Rick_S)\
**Post date:** [January 9, 2012, 2:04pm UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/8 "2012-01-09T14:04:57Z")

</div>

See attached screenshot.

 ![Toad for Data Analyst.bmp](https://global.discourse-cdn.com/quest/original/2X/d/d78442e47b1dcc0a18ac9da03faab6bb71d9cccd.bmp)

---

<div class="post-metadata">

**Author:** ![Jeff\_Podlasek](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/jeff_podlasek/32/29_2.png) [@Jeff\_Podlasek](https://forums.toadworld.com/u/Jeff_Podlasek)\
**Post date:** [January 9, 2012, 3:20pm UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/9 "2012-01-09T15:20:01Z")

</div>

Rick,  
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.  
Thanks,  
Jeff

---

<div class="post-metadata">

**Author:** ![Rick\_S](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Rick\_S](https://forums.toadworld.com/u/Rick_S)\
**Post date:** [January 10, 2012, 4:12pm UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/10 "2012-01-10T16:12:04Z")

</div>

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:

System.TypeInitializationException  
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, ICollection`1 arObjs, Boolean bIncludeContainersContent) at Quest.Compare.Schema.DB2.Scripter.DB2Scripter.Factory.CreateLimitations(ScriptActionInd indAction, ICollection`1 arObjs, Boolean bIncludeReferenced)  
at Quest.Compare.Schema.DB2.Scripter.DB2Scripter.Factory.FillModel(ScriptActionInd indAction, ICollection`1 arDB2Objs, ScriptModeInd indSMode, IList`1& 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)

```
System.Configuration.ConfigurationErrorsException
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()
```

---

<div class="post-metadata">

**Author:** ![Jeff\_Podlasek](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/jeff_podlasek/32/29_2.png) [@Jeff\_Podlasek](https://forums.toadworld.com/u/Jeff_Podlasek)\
**Post date:** [January 12, 2012, 9:37am UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/11 "2012-01-12T09:37:51Z")

</div>

Rick,  
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?

Thanks

---

<div class="post-metadata">

**Author:** ![Rick\_S](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Rick\_S](https://forums.toadworld.com/u/Rick_S)\
**Post date:** [January 12, 2012, 10:36am UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/12 "2012-01-12T10:36:14Z")

</div>

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 10.6.0.42 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

---

<div class="post-metadata">

**Author:** ![Jeff\_Podlasek](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/jeff_podlasek/32/29_2.png) [@Jeff\_Podlasek](https://forums.toadworld.com/u/Jeff_Podlasek)\
**Post date:** [January 13, 2012, 8:14am UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/13 "2012-01-13T08:14:55Z")

</div>

Rick  
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 [jpodlasek@quest.com](mailto:jpodlasek@quest.com)

thanks  
Jeff

---

<div class="post-metadata">

**Author:** ![Rick\_S](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Rick\_S](https://forums.toadworld.com/u/Rick_S)\
**Post date:** [January 13, 2012, 9:41am UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/14 "2012-01-13T09:41:56Z")

</div>

Jeff

I have sent you (and [support@quest.com](mailto:support@quest.com)) an email generated by the Support function.

Thanks for your help!

Rick

---

<div class="post-metadata">

**Author:** ![Jeff\_Podlasek](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/jeff_podlasek/32/29_2.png) [@Jeff\_Podlasek](https://forums.toadworld.com/u/Jeff_Podlasek)\
**Post date:** [January 13, 2012, 10:54am UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/15 "2012-01-13T10:54:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rick\_S](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Rick\_S](https://forums.toadworld.com/u/Rick_S)\
**Post date:** [January 27, 2012, 3:46pm UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/16 "2012-01-27T15:46:56Z")

</div>

Any progress on this issue?

Thanks!

Rick

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [January 31, 2012, 12:00pm UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/17 "2012-01-31T12:00:42Z")

</div>

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.

Debbie

 ![db2Scripter2.png](https://global.discourse-cdn.com/quest/original/2X/d/d0acc7eb4faa008bb7c11800738be81bd1d0be5e.png)

---

<div class="post-metadata">

**Author:** ![Rick\_S](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Rick\_S](https://forums.toadworld.com/u/Rick_S)\
**Post date:** [February 9, 2012, 4:23pm UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/18 "2012-02-09T16:23:18Z")

</div>

Here it is:

 ![Toad for Data Analyst2.bmp](https://global.discourse-cdn.com/quest/original/2X/9/9b8db1967b9e27bcdc63bf321af2cfdb1ab4f4d4.bmp)

---

<div class="post-metadata">

**Author:** ![Rick\_S](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@Rick\_S](https://forums.toadworld.com/u/Rick_S)\
**Post date:** [February 9, 2012, 4:30pm UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/19 "2012-02-09T16:30:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [February 10, 2012, 1:09pm UTC](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023/20 "2012-02-10T13:09:13Z")

</div>

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.

Debbie

[Next page](https://forums.toadworld.com/t/cannot-view-scripts-for-tables-views/7023.md?page=2)
