Friday, March 23, 2012

Moved database to new server...before creating logins

I feel like an idiot for this.
We are moving our SQL Server database (2000 Standard) to a new server
(also 2000 standard--don't worry, we've got a separate license for it).
What I did was backup the database on the old server and restore it to
the new server for testing our software application.
Only problem is, I didn't create the users beforehand, so now I can't
log into the new server with the login. It says I can't access my
default database.
WIthout dropping the database, is there a way I can fix this? It would
be easy enough to drop and re-restore the database, but if there is a
shorter way that would also work just as well, please enlighten me.Sure there are several articles here that cover this and more. But at the
least you can just create a new Login and then use sp_change_users_login to
map the user to the login.
http://vyaskn.tripod.com/moving_sql_server.htm Moving DBs
http://www.databasejournal.com/feat...cle.php/3379901 Moving
system DB's
http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465 Using WITH MOVE in a
Restore
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scr...sp?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
Andrew J. Kelly SQL MVP
"Brent White" <bwhite@.badgersportswear.com> wrote in message
news:1131724756.657385.127960@.f14g2000cwb.googlegroups.com...
>I feel like an idiot for this.
> We are moving our SQL Server database (2000 Standard) to a new server
> (also 2000 standard--don't worry, we've got a separate license for it).
> What I did was backup the database on the old server and restore it to
> the new server for testing our software application.
> Only problem is, I didn't create the users beforehand, so now I can't
> log into the new server with the login. It says I can't access my
> default database.
> WIthout dropping the database, is there a way I can fix this? It would
> be easy enough to drop and re-restore the database, but if there is a
> shorter way that would also work just as well, please enlighten me.
>|||Hi,
i found a good article by Mr. Vyas ,a very famous SQL Professional :
http://vyaskn.tripod.com/moving_sql_server.htm
Regards
--
Andy Davis
Activecrypt Team
---
SQL Server Encryption Software
http://www.activecrypt.com
"Brent White" wrote:

> I feel like an idiot for this.
> We are moving our SQL Server database (2000 Standard) to a new server
> (also 2000 standard--don't worry, we've got a separate license for it).
> What I did was backup the database on the old server and restore it to
> the new server for testing our software application.
> Only problem is, I didn't create the users beforehand, so now I can't
> log into the new server with the login. It says I can't access my
> default database.
> WIthout dropping the database, is there a way I can fix this? It would
> be easy enough to drop and re-restore the database, but if there is a
> shorter way that would also work just as well, please enlighten me.
>

No comments:

Post a Comment