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 Development (2000)
 information schema

Author  Topic 

Westley
Posting Yak Master

229 Posts

Posted - 2005-09-19 : 03:11:51
Hi,
The information schema views are great, but is there a way to select that from another DB? as in if my connection are pointing to master DB (for example), can I still do this:

select * from msdb.dbo.information_schema.views

ie. connection in 1 DB, but selecting details for another DB on the same server, or I need to go through the sysobjects like old times?

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-19 : 03:21:52
Yes like this
select * from msdb.information_schema.views


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Westley
Posting Yak Master

229 Posts

Posted - 2005-09-19 : 03:31:09
aaiii, thanks, i was keep trying to put 2 dots....hahaha
i tried everything like .dbo. and ..Information_schema, but just not with 1 dot :)
thanks a lot
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-19 : 03:38:12
It is because INFORMATION_SCHEMA is a Owner so you cannot use dbo

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -