Sometimes I find that when I restore a database the user
(sa is the only user in the database in this case) comes
up with the "Name" of dbo but there is nothing displayed
in the "Login Name" column in the "users" object. How do I
get the "Login Name" of sa to appear there?
Thanks
JThe login mapping for the 'dbo' user is determined by database ownership.
This can get out-of-sync following a restore or attach. You can correct
this with sp_changedbowner:
USE MyDatabase
EXEC sp_changedbowner 'sa'
GO
"J" <anonymous@.discussions.microsoft.com> wrote in message
news:04e701c3b9e8$ced2ab50$a101280a@.phx.gbl...
> Sometimes I find that when I restore a database the user
> (sa is the only user in the database in this case) comes
> up with the "Name" of dbo but there is nothing displayed
> in the "Login Name" column in the "users" object. How do I
> get the "Login Name" of sa to appear there?
> Thanks
> J
Showing posts with label restore. Show all posts
Showing posts with label restore. Show all posts
Friday, March 23, 2012
Monday, March 19, 2012
mysterious restore
I am a support rep for an app running on SQL Server 7 sp3.
The customer had a table mysteriously restored along with the dependencies [sp.s, indexes, etc] for that table.
Is there any logging in sql server that will show when tables or objects have been dropped, recreated or restored?
thanksLook up the msdb..restorehistory table.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
What hardware is your SQL Server running on?
http://vyaskn.tripod.com/poll.htm
"tlr" <anonymous@.discussions.microsoft.com> wrote in message
news:86C067AA-72E8-49CD-A34A-1E79E4E03315@.microsoft.com...
I am a support rep for an app running on SQL Server 7 sp3.
The customer had a table mysteriously restored along with the dependencies
[sp.s, indexes, etc] for that table.
Is there any logging in sql server that will show when tables or objects
have been dropped, recreated or restored?
thanks
The customer had a table mysteriously restored along with the dependencies [sp.s, indexes, etc] for that table.
Is there any logging in sql server that will show when tables or objects have been dropped, recreated or restored?
thanksLook up the msdb..restorehistory table.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
What hardware is your SQL Server running on?
http://vyaskn.tripod.com/poll.htm
"tlr" <anonymous@.discussions.microsoft.com> wrote in message
news:86C067AA-72E8-49CD-A34A-1E79E4E03315@.microsoft.com...
I am a support rep for an app running on SQL Server 7 sp3.
The customer had a table mysteriously restored along with the dependencies
[sp.s, indexes, etc] for that table.
Is there any logging in sql server that will show when tables or objects
have been dropped, recreated or restored?
thanks
Wednesday, March 7, 2012
My SQL7.0 Problems
I have a SQL 7.0 DB that is working fine, except for some records that a
user deleted. She wants me to restore them. My normal process for
restoring SQL data is to restore last night's backup to a test DB and let
the user access this DB for their information. My problem is that the test
DB is corrupt. When I try to access the DB through Enterprise Manager, I
get this: An error occurred while trying to access the database information.
When I try to get properties on the database, I get this: Error 945:
Database 'database' cannot be opened because some of the files could not be
activated.
I was able to try to restore (and import) data to the DB, but got various
error messages.
My questions:
1. Can this DB be repaired?
2. If this DB can't be repaired, can restore or import to it?
I made a new blank DB and tried to restore (and import) to it, but got
errors when I tried that too.
Any ideas?
Thanks,
JohnHi
Delete the DB and re-create it, then re-restore the Data. "DROP DATABASE" is
the command.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"AnytimeAnywhere" <gm79ta@.yahoo.com> wrote in message
news:11411o8s8vrbibf@.corp.supernews.com...
> I have a SQL 7.0 DB that is working fine, except for some records that a
> user deleted. She wants me to restore them. My normal process for
> restoring SQL data is to restore last night's backup to a test DB and let
> the user access this DB for their information. My problem is that the
test
> DB is corrupt. When I try to access the DB through Enterprise Manager, I
> get this: An error occurred while trying to access the database
information.
> When I try to get properties on the database, I get this: Error 945:
> Database 'database' cannot be opened because some of the files could not
be
> activated.
> I was able to try to restore (and import) data to the DB, but got various
> error messages.
> My questions:
> 1. Can this DB be repaired?
> 2. If this DB can't be repaired, can restore or import to it?
> I made a new blank DB and tried to restore (and import) to it, but got
> errors when I tried that too.
> Any ideas?
> Thanks,
> John
>|||Thanks for the response!
How do I use the 'DROP DATABASE' command? After I delete and restore the
database, do I go into 'Query Analyzer' and issue the command there? What
does it do?
Thanks again,
John
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:u7J0bPzLFHA.568@.TK2MSFTNGP09.phx.gbl...
> Hi
> Delete the DB and re-create it, then re-restore the Data. "DROP DATABASE"
is
> the command.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "AnytimeAnywhere" <gm79ta@.yahoo.com> wrote in message
> news:11411o8s8vrbibf@.corp.supernews.com...
> > I have a SQL 7.0 DB that is working fine, except for some records that a
> > user deleted. She wants me to restore them. My normal process for
> > restoring SQL data is to restore last night's backup to a test DB and
let
> > the user access this DB for their information. My problem is that the
> test
> > DB is corrupt. When I try to access the DB through Enterprise Manager,
I
> > get this: An error occurred while trying to access the database
> information.
> > When I try to get properties on the database, I get this: Error 945:
> > Database 'database' cannot be opened because some of the files could not
> be
> > activated.
> >
> > I was able to try to restore (and import) data to the DB, but got
various
> > error messages.
> >
> > My questions:
> >
> > 1. Can this DB be repaired?
> >
> > 2. If this DB can't be repaired, can restore or import to it?
> >
> > I made a new blank DB and tried to restore (and import) to it, but got
> > errors when I tried that too.
> >
> > Any ideas?
> >
> > Thanks,
> >
> > John
> >
> >
>
user deleted. She wants me to restore them. My normal process for
restoring SQL data is to restore last night's backup to a test DB and let
the user access this DB for their information. My problem is that the test
DB is corrupt. When I try to access the DB through Enterprise Manager, I
get this: An error occurred while trying to access the database information.
When I try to get properties on the database, I get this: Error 945:
Database 'database' cannot be opened because some of the files could not be
activated.
I was able to try to restore (and import) data to the DB, but got various
error messages.
My questions:
1. Can this DB be repaired?
2. If this DB can't be repaired, can restore or import to it?
I made a new blank DB and tried to restore (and import) to it, but got
errors when I tried that too.
Any ideas?
Thanks,
JohnHi
Delete the DB and re-create it, then re-restore the Data. "DROP DATABASE" is
the command.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"AnytimeAnywhere" <gm79ta@.yahoo.com> wrote in message
news:11411o8s8vrbibf@.corp.supernews.com...
> I have a SQL 7.0 DB that is working fine, except for some records that a
> user deleted. She wants me to restore them. My normal process for
> restoring SQL data is to restore last night's backup to a test DB and let
> the user access this DB for their information. My problem is that the
test
> DB is corrupt. When I try to access the DB through Enterprise Manager, I
> get this: An error occurred while trying to access the database
information.
> When I try to get properties on the database, I get this: Error 945:
> Database 'database' cannot be opened because some of the files could not
be
> activated.
> I was able to try to restore (and import) data to the DB, but got various
> error messages.
> My questions:
> 1. Can this DB be repaired?
> 2. If this DB can't be repaired, can restore or import to it?
> I made a new blank DB and tried to restore (and import) to it, but got
> errors when I tried that too.
> Any ideas?
> Thanks,
> John
>|||Thanks for the response!
How do I use the 'DROP DATABASE' command? After I delete and restore the
database, do I go into 'Query Analyzer' and issue the command there? What
does it do?
Thanks again,
John
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:u7J0bPzLFHA.568@.TK2MSFTNGP09.phx.gbl...
> Hi
> Delete the DB and re-create it, then re-restore the Data. "DROP DATABASE"
is
> the command.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "AnytimeAnywhere" <gm79ta@.yahoo.com> wrote in message
> news:11411o8s8vrbibf@.corp.supernews.com...
> > I have a SQL 7.0 DB that is working fine, except for some records that a
> > user deleted. She wants me to restore them. My normal process for
> > restoring SQL data is to restore last night's backup to a test DB and
let
> > the user access this DB for their information. My problem is that the
> test
> > DB is corrupt. When I try to access the DB through Enterprise Manager,
I
> > get this: An error occurred while trying to access the database
> information.
> > When I try to get properties on the database, I get this: Error 945:
> > Database 'database' cannot be opened because some of the files could not
> be
> > activated.
> >
> > I was able to try to restore (and import) data to the DB, but got
various
> > error messages.
> >
> > My questions:
> >
> > 1. Can this DB be repaired?
> >
> > 2. If this DB can't be repaired, can restore or import to it?
> >
> > I made a new blank DB and tried to restore (and import) to it, but got
> > errors when I tried that too.
> >
> > Any ideas?
> >
> > Thanks,
> >
> > John
> >
> >
>
My SQL7.0 Problems
I have a SQL 7.0 DB that is working fine, except for some records that a
user deleted. She wants me to restore them. My normal process for
restoring SQL data is to restore last night's backup to a test DB and let
the user access this DB for their information. My problem is that the test
DB is corrupt. When I try to access the DB through Enterprise Manager, I
get this: An error occurred while trying to access the database information.
When I try to get properties on the database, I get this: Error 945:
Database 'database' cannot be opened because some of the files could not be
activated.
I was able to try to restore (and import) data to the DB, but got various
error messages.
My questions:
1. Can this DB be repaired?
2. If this DB can't be repaired, can restore or import to it?
I made a new blank DB and tried to restore (and import) to it, but got
errors when I tried that too.
Any ideas?
Thanks,
John
Hi
Delete the DB and re-create it, then re-restore the Data. "DROP DATABASE" is
the command.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"AnytimeAnywhere" <gm79ta@.yahoo.com> wrote in message
news:11411o8s8vrbibf@.corp.supernews.com...
> I have a SQL 7.0 DB that is working fine, except for some records that a
> user deleted. She wants me to restore them. My normal process for
> restoring SQL data is to restore last night's backup to a test DB and let
> the user access this DB for their information. My problem is that the
test
> DB is corrupt. When I try to access the DB through Enterprise Manager, I
> get this: An error occurred while trying to access the database
information.
> When I try to get properties on the database, I get this: Error 945:
> Database 'database' cannot be opened because some of the files could not
be
> activated.
> I was able to try to restore (and import) data to the DB, but got various
> error messages.
> My questions:
> 1. Can this DB be repaired?
> 2. If this DB can't be repaired, can restore or import to it?
> I made a new blank DB and tried to restore (and import) to it, but got
> errors when I tried that too.
> Any ideas?
> Thanks,
> John
>
|||Thanks for the response!
How do I use the 'DROP DATABASE' command? After I delete and restore the
database, do I go into 'Query Analyzer' and issue the command there? What
does it do?
Thanks again,
John
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:u7J0bPzLFHA.568@.TK2MSFTNGP09.phx.gbl...
> Hi
> Delete the DB and re-create it, then re-restore the Data. "DROP DATABASE"
is[vbcol=seagreen]
> the command.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "AnytimeAnywhere" <gm79ta@.yahoo.com> wrote in message
> news:11411o8s8vrbibf@.corp.supernews.com...
let[vbcol=seagreen]
> test
I[vbcol=seagreen]
> information.
> be
various
>
user deleted. She wants me to restore them. My normal process for
restoring SQL data is to restore last night's backup to a test DB and let
the user access this DB for their information. My problem is that the test
DB is corrupt. When I try to access the DB through Enterprise Manager, I
get this: An error occurred while trying to access the database information.
When I try to get properties on the database, I get this: Error 945:
Database 'database' cannot be opened because some of the files could not be
activated.
I was able to try to restore (and import) data to the DB, but got various
error messages.
My questions:
1. Can this DB be repaired?
2. If this DB can't be repaired, can restore or import to it?
I made a new blank DB and tried to restore (and import) to it, but got
errors when I tried that too.
Any ideas?
Thanks,
John
Hi
Delete the DB and re-create it, then re-restore the Data. "DROP DATABASE" is
the command.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"AnytimeAnywhere" <gm79ta@.yahoo.com> wrote in message
news:11411o8s8vrbibf@.corp.supernews.com...
> I have a SQL 7.0 DB that is working fine, except for some records that a
> user deleted. She wants me to restore them. My normal process for
> restoring SQL data is to restore last night's backup to a test DB and let
> the user access this DB for their information. My problem is that the
test
> DB is corrupt. When I try to access the DB through Enterprise Manager, I
> get this: An error occurred while trying to access the database
information.
> When I try to get properties on the database, I get this: Error 945:
> Database 'database' cannot be opened because some of the files could not
be
> activated.
> I was able to try to restore (and import) data to the DB, but got various
> error messages.
> My questions:
> 1. Can this DB be repaired?
> 2. If this DB can't be repaired, can restore or import to it?
> I made a new blank DB and tried to restore (and import) to it, but got
> errors when I tried that too.
> Any ideas?
> Thanks,
> John
>
|||Thanks for the response!
How do I use the 'DROP DATABASE' command? After I delete and restore the
database, do I go into 'Query Analyzer' and issue the command there? What
does it do?
Thanks again,
John
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:u7J0bPzLFHA.568@.TK2MSFTNGP09.phx.gbl...
> Hi
> Delete the DB and re-create it, then re-restore the Data. "DROP DATABASE"
is[vbcol=seagreen]
> the command.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "AnytimeAnywhere" <gm79ta@.yahoo.com> wrote in message
> news:11411o8s8vrbibf@.corp.supernews.com...
let[vbcol=seagreen]
> test
I[vbcol=seagreen]
> information.
> be
various
>
My SQL7.0 Problems
I have a SQL 7.0 DB that is working fine, except for some records that a
user deleted. She wants me to restore them. My normal process for
restoring SQL data is to restore last night's backup to a test DB and let
the user access this DB for their information. My problem is that the test
DB is corrupt. When I try to access the DB through Enterprise Manager, I
get this: An error occurred while trying to access the database information.
When I try to get properties on the database, I get this: Error 945:
Database 'database' cannot be opened because some of the files could not be
activated.
I was able to try to restore (and import) data to the DB, but got various
error messages.
My questions:
1. Can this DB be repaired?
2. If this DB can't be repaired, can restore or import to it?
I made a new blank DB and tried to restore (and import) to it, but got
errors when I tried that too.
Any ideas?
Thanks,
JohnHi
Delete the DB and re-create it, then re-restore the Data. "DROP DATABASE" is
the command.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"AnytimeAnywhere" <gm79ta@.yahoo.com> wrote in message
news:11411o8s8vrbibf@.corp.supernews.com...
> I have a SQL 7.0 DB that is working fine, except for some records that a
> user deleted. She wants me to restore them. My normal process for
> restoring SQL data is to restore last night's backup to a test DB and let
> the user access this DB for their information. My problem is that the
test
> DB is corrupt. When I try to access the DB through Enterprise Manager, I
> get this: An error occurred while trying to access the database
information.
> When I try to get properties on the database, I get this: Error 945:
> Database 'database' cannot be opened because some of the files could not
be
> activated.
> I was able to try to restore (and import) data to the DB, but got various
> error messages.
> My questions:
> 1. Can this DB be repaired?
> 2. If this DB can't be repaired, can restore or import to it?
> I made a new blank DB and tried to restore (and import) to it, but got
> errors when I tried that too.
> Any ideas?
> Thanks,
> John
>|||Thanks for the response!
How do I use the 'DROP DATABASE' command? After I delete and restore the
database, do I go into 'Query Analyzer' and issue the command there? What
does it do?
Thanks again,
John
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:u7J0bPzLFHA.568@.TK2MSFTNGP09.phx.gbl...
> Hi
> Delete the DB and re-create it, then re-restore the Data. "DROP DATABASE"
is
> the command.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "AnytimeAnywhere" <gm79ta@.yahoo.com> wrote in message
> news:11411o8s8vrbibf@.corp.supernews.com...
let[vbcol=seagreen]
> test
I[vbcol=seagreen]
> information.
> be
various[vbcol=seagreen]
>
user deleted. She wants me to restore them. My normal process for
restoring SQL data is to restore last night's backup to a test DB and let
the user access this DB for their information. My problem is that the test
DB is corrupt. When I try to access the DB through Enterprise Manager, I
get this: An error occurred while trying to access the database information.
When I try to get properties on the database, I get this: Error 945:
Database 'database' cannot be opened because some of the files could not be
activated.
I was able to try to restore (and import) data to the DB, but got various
error messages.
My questions:
1. Can this DB be repaired?
2. If this DB can't be repaired, can restore or import to it?
I made a new blank DB and tried to restore (and import) to it, but got
errors when I tried that too.
Any ideas?
Thanks,
JohnHi
Delete the DB and re-create it, then re-restore the Data. "DROP DATABASE" is
the command.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"AnytimeAnywhere" <gm79ta@.yahoo.com> wrote in message
news:11411o8s8vrbibf@.corp.supernews.com...
> I have a SQL 7.0 DB that is working fine, except for some records that a
> user deleted. She wants me to restore them. My normal process for
> restoring SQL data is to restore last night's backup to a test DB and let
> the user access this DB for their information. My problem is that the
test
> DB is corrupt. When I try to access the DB through Enterprise Manager, I
> get this: An error occurred while trying to access the database
information.
> When I try to get properties on the database, I get this: Error 945:
> Database 'database' cannot be opened because some of the files could not
be
> activated.
> I was able to try to restore (and import) data to the DB, but got various
> error messages.
> My questions:
> 1. Can this DB be repaired?
> 2. If this DB can't be repaired, can restore or import to it?
> I made a new blank DB and tried to restore (and import) to it, but got
> errors when I tried that too.
> Any ideas?
> Thanks,
> John
>|||Thanks for the response!
How do I use the 'DROP DATABASE' command? After I delete and restore the
database, do I go into 'Query Analyzer' and issue the command there? What
does it do?
Thanks again,
John
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:u7J0bPzLFHA.568@.TK2MSFTNGP09.phx.gbl...
> Hi
> Delete the DB and re-create it, then re-restore the Data. "DROP DATABASE"
is
> the command.
> Regards
> --
> Mike Epprecht, Microsoft SQL Server MVP
> Zurich, Switzerland
> IM: mike@.epprecht.net
> MVP Program: http://www.microsoft.com/mvp
> Blog: http://www.msmvps.com/epprecht/
> "AnytimeAnywhere" <gm79ta@.yahoo.com> wrote in message
> news:11411o8s8vrbibf@.corp.supernews.com...
let[vbcol=seagreen]
> test
I[vbcol=seagreen]
> information.
> be
various[vbcol=seagreen]
>
Subscribe to:
Posts (Atom)