Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


CMS Query Error Suppression


CMS Query Error Suppression

Author
Message
Erin Ramsay
Erin Ramsay
Mr or Mrs. 500
Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)

Group: General Forum Members
Points: 561 Visits: 1099
I'm not sure if there is a specific ability in queries against server groups or if there is something more generic but my Google-Fu turned up WAY too many results..

Essentially I need to get a return on my query despite the errors I get. For example, I have a server group created in the CMS that contains 25 servers with various versions of SQL on them, ranging from SQL 2000 to SQL 2012.

So a query like this...

select * from sysdatabases where name = 'someTable'


will return
server1(ABC\ME): Msg 208, Level 16, State 1, Line 3
Invalid object name 'sys.databases'.

server2(ABC\dsvramsay): (11 row(s) affected)

server3(ABC\dsvramsay): (6 row(s) affected)

server4(ABC\dsvramsay): (14 row(s) affected)
....ETC


because there is no sys.databases in SQL Server 2000, just sysdatabases. I've tried using if (select @@version) switches to no avail either. I can't use if exists(select * from sys.ojbects) because, of course, there is no sys.objects in 2000, just sysobjects.

Any thoughs on how to force ssms to give me the results for the parts of the query that DO run?
Erin Ramsay
Erin Ramsay
Mr or Mrs. 500
Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)

Group: General Forum Members
Points: 561 Visits: 1099
*bump*
Erin Ramsay
Erin Ramsay
Mr or Mrs. 500
Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)Mr or Mrs. 500 (561 reputation)

Group: General Forum Members
Points: 561 Visits: 1099
*bump* Really? Has no one ever tried to do this?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search