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.
Author |
Topic |
subhaoviya
Posting Yak Master
135 Posts |
Posted - 2012-10-03 : 10:19:11
|
Hi, I am forming queries in DB1 and for one of my query i need to acces the table of DB2. to make the performance faster i just need to create an index on searching column of that target table of DB2.while i am trying to check for indexes on that particular table i am getting error likeThe multi-part identifier "DB1.dbo.Table" could not be bound.the query that i triedUSE DB1select * from SYS.indexes where object_id=object_id(DB1.dbo.table)thankssubha |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-10-03 : 10:20:56
|
are the DBs in the same server?. you could tryUSE [DB1]GOselect * from SYS.indexes where object_name(object_id)='table' ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
subhaoviya
Posting Yak Master
135 Posts |
Posted - 2012-10-03 : 10:22:29
|
yes both dbs are in same server |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-10-03 : 10:28:37
|
try last posted query as well------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|