Red Gate forums :: View topic - Object reference not set to an instance of an object
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Doc 2
SQL Doc 2 forum

Object reference not set to an instance of an object

Search in SQL Doc 2 forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
jbold005



Joined: 08 Aug 2012
Posts: 2

PostPosted: Wed Aug 08, 2012 6:38 pm    Post subject: Object reference not set to an instance of an object Reply with quote

Hi,

When trying to document a database I recieve an error message on a few tables: "object reference not set to an instance of an object". Then the documentation for that database is aborded...I can still document the database if i leave out those tables. However i would really like these tables in the documentation. Is there anyway to fix this issue?
Back to top
View user's profile Send private message
eddie davis



Joined: 14 Jun 2006
Posts: 923
Location: Red Gate Software

PostPosted: Fri Aug 10, 2012 2:30 pm    Post subject: Reply with quote

Thank you for your post into the forum and sorry that you have encountered a problem.

What exact full version numer of SQL Doc v2 are you using? You can obtain this information from the help menu ->About SQL Doc.

What version of SQL Server is the database you are attempting to document using?

If attempting to document a SQL 2012 database, the tables that generated the reported error, are they configured to use any of the new SQL 20012 features or data types?

Many Thanks
Eddie
_________________
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
jbold005



Joined: 08 Aug 2012
Posts: 2

PostPosted: Thu Aug 16, 2012 8:26 pm    Post subject: Reply with quote

The database is a SQL 2008 not R2 database and the SQL DOC version is 2.1.2.1
Back to top
View user's profile Send private message
eddie davis



Joined: 14 Jun 2006
Posts: 923
Location: Red Gate Software

PostPosted: Thu Aug 16, 2012 8:30 pm    Post subject: Reply with quote

Thank you for your reply.

Can you please provide a example table creation script for one or two of the tables that are causing you this problem?

Many Thanks
Eddie
_________________
Eddie Davis
Technical Support Engineer
Red Gate Software Ltd
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
pbezanson



Joined: 13 Sep 2007
Posts: 6
Location: Portland, OR USA

PostPosted: Fri Sep 07, 2012 11:54 pm    Post subject: Reply with quote

Was this issue ever resolved? I'd be very intersted in the resolution.

I'm having the very same problem (SQL Server 2005, local OS: Windows 7, SQL Doc v2.1.2.1) and I'd like to know how to fix it. Unfortunately the SQL Doc log doesn't help me much but I'd be happy to make it available to anyone who thinks it might help them unravel this problem.

Thanks!
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6643

PostPosted: Mon Sep 10, 2012 10:06 am    Post subject: Reply with quote

Hello,

Unfortunately "object instance not set to an instance of an object" is a very generic programming error, which has thousands of potential causes and will never by nature be a bug that can be "fixed".

Typically in Red Gate SQL tools it means there is a bit of schema that depends on an object that cannot be read, either because it does not exist or you do not have permissions to it.

So as a first-look I'd try running the program using a SQL sysadmin account or at least one that have VIEW DEFINITION rights on the schema.
Back to top
View user's profile Send private message
pbezanson



Joined: 13 Sep 2007
Posts: 6
Location: Portland, OR USA

PostPosted: Mon Sep 10, 2012 9:11 pm    Post subject: Reply with quote

Thanks for your response, Brian.

I always use an account with Sysadmin permissions to connect to the SQL Docs 2 project.

I've run DBCC Check on the database and found nothing wrong internally. If I remove the offending object from the list of objects to document, it stumbles over an object further down the list. If I remove that object and it stumbles over another object yet further down the list. I've tried this about 10 times and decided that even if it did finally succeed, the resulting documentation would be missing so many items as to be quite useless.

It would be nice if SQL Doc would tell me what it's expecting to find that isn't there. It must know if there is an "object reference" in the first place. It doesn't do that, however, nor does it write this information to its log. If I knew what it was stumbling over, I could fix it, but there are just too many objects in this database to guess.

Any ideas or strategies you may have for tracking down this "missing" object would be greatly appreciated.

Thanks again, Brian.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6643

PostPosted: Tue Sep 11, 2012 10:06 am    Post subject: Reply with quote

Red Gate SQL Tools do not handle corrupt schema/schema it does not understand very well. My apologies for that.

My first step is usually to try debugging it, since the error handling built in to the software is not any help.
Back to top
View user's profile Send private message
stanori



Joined: 23 Apr 2012
Posts: 76

PostPosted: Tue Sep 11, 2012 10:19 pm    Post subject: Reply with quote

Hi pbezanson,

We have opened a support ticket for you in regards to this issue. We will follow up with you shortly.

Best Regards,
Steve
_________________
_________________
Steve Tanori
Product Support
Red Gate Software Ltd.
866-997-0378
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group