March 20, 2009 at 10:02 am
I was testing running this in a query window: exec sp_msforeachtable 'alter index all on [?] rebuild'
And I got the message : Cannot find the object "[dbo].[diskspace_hist]" because it does not exist or you do not have permissions.
But it's right there along with all the other tables. I'm sysadmin and have no trouble working with any of the tables.
What obvious thing am I missing this time ?
March 20, 2009 at 10:22 am
exec sp_msforeachtable 'alter index all on ? rebuild'
works for me
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
March 20, 2009 at 10:51 am
I guess I'm wondering if there's some quirk about a particular table that could make it fail
March 20, 2009 at 10:56 am
homebrew01 (3/20/2009)
I guess I'm wondering if there's some quirk about a particular table that could make it fail
no quirk, you just dont need the []
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
March 20, 2009 at 11:05 am
Yep, by putting in the [] in your query, you are looking for table name [dbo].[[dbo].[diskspace_hist]]
not [dbo].[diskspace_hist]
March 20, 2009 at 11:10 am
[] was the problem .. thanks !
March 21, 2009 at 2:59 am
😉
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply