|
Home > Archive > MS SQL Server > March 2006 > -S.O.S- Error 927: Error 21776:
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
-S.O.S- Error 927: Error 21776:
|
|
| cdiazs 2006-03-25, 7:27 am |
| I need your help please.
I was restoring a database from backup complete, When I remember that I
Not may do it.
I CANCEL the accion inmediately. And them when click on BDname
properties, say me:
Error 927: ... the BD is in restoring accion.
Then
I did copy with click right on de archive *.mdf y *.ldf fron DBname and
copy them in other part.
When I did again properties in DBname, say me a error diferent a 927,
The error now is:
Error 21776: The name 'dbo' was not found in de users collection, if
the name is a qualified name .. etc.. and try again.
When see this error I did:
DECLARE @ChangeDBOwner nvarchar(4000)
DECLARE ChangeDBOwner CURSOR
LOCAL FAST_FORWARD READ_ONLY FOR
SELECT N'USE ' + CATALOG_NAME + N'
EXEC sp_changedbowner ''sa'''
FROM INFORMATION_SCHEMA.SCHEMATA
WHERE CATALOG_NAME NOT IN
(
'master',
'model',
'msdb',
'tempdb',
'distribution'
)
OPEN ChangeDBOwner
WHILE 1 = 1
BEGIN
FETCH NEXT FROM ChangeDBOwner INTO @ChangeDBOwner
IF @@FETCH_STATUS = -1 BREAK
EXEC(@ChangeDBOwner)
END
CLOSE ChangeDBOwner
DEALLOCATE ChangeDBOwner
GO
And .... The Dbname was in colour Grey, now the Dbname Is NOT on de
Console. I don`t see it.
The dbname I don`t see in sysdatabase...
Can I do something please?
| |
| John Bell 2006-03-25, 1:23 pm |
| Hi
You don't say when the backup was from or if you had taken a backup before
you tried to restore the database. If you have a backup you can restore,
then you should do that.
It is not clear how you moved the archive files, if SQL Server was running
then I don't think you could have replaced the files. If you used
sp_detach_db and sp_attach_db then you may be ok, but if the owner is not
correct I suggest that you set it to a different login and then back to sa.
You may also have orphaned users which may require correcting by using
sp_change_users_logi
n
John
"cdiazs" <cdiazs@hotmail.com> wrote in message
news:1143286644.816937.48640@z34g2000cwc.googlegroups.com...
>I need your help please.
>
> I was restoring a database from backup complete, When I remember that I
> Not may do it.
>
> I CANCEL the accion inmediately. And them when click on BDname
> properties, say me:
>
> Error 927: ... the BD is in restoring accion.
>
> Then
>
> I did copy with click right on de archive *.mdf y *.ldf fron DBname and
> copy them in other part.
>
> When I did again properties in DBname, say me a error diferent a 927,
> The error now is:
>
> Error 21776: The name 'dbo' was not found in de users collection, if
> the name is a qualified name .. etc.. and try again.
>
> When see this error I did:
>
> DECLARE @ChangeDBOwner nvarchar(4000)
> DECLARE ChangeDBOwner CURSOR
> LOCAL FAST_FORWARD READ_ONLY FOR
> SELECT N'USE ' + CATALOG_NAME + N'
> EXEC sp_changedbowner ''sa'''
> FROM INFORMATION_SCHEMA.SCHEMATA
> WHERE CATALOG_NAME NOT IN
> (
> 'master',
> 'model',
> 'msdb',
> 'tempdb',
> 'distribution'
> )
> OPEN ChangeDBOwner
> WHILE 1 = 1
> BEGIN
> FETCH NEXT FROM ChangeDBOwner INTO @ChangeDBOwner
> IF @@FETCH_STATUS = -1 BREAK
> EXEC(@ChangeDBOwner)
> END
> CLOSE ChangeDBOwner
> DEALLOCATE ChangeDBOwner
> GO
>
>
> And .... The Dbname was in colour Grey, now the Dbname Is NOT on de
> Console. I don`t see it.
>
> The dbname I don`t see in sysdatabase...
>
> Can I do something please?
>
| |
| ChrisR 2006-03-26, 3:23 am |
| Delete the DB and start over with the restore.
"cdiazs" <cdiazs@hotmail.com> wrote in message
news:1143286644.816937.48640@z34g2000cwc.googlegroups.com...
> I need your help please.
>
> I was restoring a database from backup complete, When I remember that I
> Not may do it.
>
> I CANCEL the accion inmediately. And them when click on BDname
> properties, say me:
>
> Error 927: ... the BD is in restoring accion.
>
> Then
>
> I did copy with click right on de archive *.mdf y *.ldf fron DBname and
> copy them in other part.
>
> When I did again properties in DBname, say me a error diferent a 927,
> The error now is:
>
> Error 21776: The name 'dbo' was not found in de users collection, if
> the name is a qualified name .. etc.. and try again.
>
> When see this error I did:
>
> DECLARE @ChangeDBOwner nvarchar(4000)
> DECLARE ChangeDBOwner CURSOR
> LOCAL FAST_FORWARD READ_ONLY FOR
> SELECT N'USE ' + CATALOG_NAME + N'
> EXEC sp_changedbowner ''sa'''
> FROM INFORMATION_SCHEMA.SCHEMATA
> WHERE CATALOG_NAME NOT IN
> (
> 'master',
> 'model',
> 'msdb',
> 'tempdb',
> 'distribution'
> )
> OPEN ChangeDBOwner
> WHILE 1 = 1
> BEGIN
> FETCH NEXT FROM ChangeDBOwner INTO @ChangeDBOwner
> IF @@FETCH_STATUS = -1 BREAK
> EXEC(@ChangeDBOwner)
> END
> CLOSE ChangeDBOwner
> DEALLOCATE ChangeDBOwner
> GO
>
>
> And .... The Dbname was in colour Grey, now the Dbname Is NOT on de
> Console. I don`t see it.
>
> The dbname I don`t see in sysdatabase...
>
> Can I do something please?
>
|
|
|
|
|