Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Can OpenQuery be used with DBCC commands?

Author  Topic 

drewsalem
Constraint Violating Yak Guru

304 Posts

Posted - 2007-07-20 : 05:43:33
SELECT * FROM OPENQUERY(myServer, 'dbcc SQLPERF (''LOGSPACE'')')

is returning:

OLE DB error trace [Non-interface error: OLE DB provider unable to process object, since the object has no columnsProviderName='sqloledb', Query=dbcc SQLPERF ('LOGSPACE')'].
Msg 7357, Level 16, State 2, Line 1
Could not process object 'dbcc SQLPERF ('LOGSPACE')'. The OLE DB provider 'sqloledb' indicates that the object has no columns.


Drew
---------------------
"It's Saturday night; I've got no date, a two litre bottle of Shasta, and my all-Rush mix tape... LET'S ROCK."

drewsalem
Constraint Violating Yak Guru

304 Posts

Posted - 2007-07-20 : 08:22:51
It seems that openquery can be used only when a result set is returned. DBCCs do not return result sets but message strings. I want to retrieve data/log space info on linked servers. If sqlperf cannot be used, can anyone tell me what system tables hold this info?

Thanks

Drew
---------------------
"It's Saturday night; I've got no date, a two litre bottle of Shasta, and my all-Rush mix tape... LET'S ROCK."
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2007-07-20 : 11:02:18
try this approach instead http://www.windowsitpro.com/Article/ArticleID/14315/14315.html



-ec
Go to Top of Page

drewsalem
Constraint Violating Yak Guru

304 Posts

Posted - 2007-07-20 : 11:08:18
Thanks, I'll try using the cmdshell approach.

Drew
---------------------
"It's Saturday night; I've got no date, a two litre bottle of Shasta, and my all-Rush mix tape... LET'S ROCK."
Go to Top of Page
   

- Advertisement -