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 |
|
bridge
Yak Posting Veteran
93 Posts |
Posted - 2005-04-05 : 09:19:47
|
| I have a table in database created by user TIM now I want to run SELECT query on this table but I got the error Invalid Object Name. Please tell me how can I run SELECT on this table? |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-04-05 : 09:23:12
|
| SELECT col1, col2 FROM TIM.tableMeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
bridge
Yak Posting Veteran
93 Posts |
Posted - 2005-04-05 : 09:25:45
|
| But I do not want to use the user name as I have lot of stored procedures referencing the table. |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-04-05 : 09:29:13
|
| Well, then change the owner to dbo. You probably shouldn't have TIM owning the table anyway.EXEC sp_changeobjectowner 'TIM.table','dbo'Be sure you test this on development first of course.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
bridge
Yak Posting Veteran
93 Posts |
Posted - 2005-04-05 : 09:32:51
|
| Actually we have a software which logs in through NT login and when we create the Table it creates it taking NT login as the user. And this NT user does not have the right to execute sp_changeobjectowner. When other NT user runs a report on that table it gets error Invalid Object Name. |
 |
|
|
|
|
|