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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 restore without restoring users

Author  Topic 

dotosu
Starting Member

42 Posts

Posted - 2004-12-08 : 17:29:04
I need to restore a database without restoring users so that I do not change the security on the database. How do I do this? Can someone please help?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-12-08 : 18:25:20
You can't with restore. You'll have to create your tables in the database and copy all of the data over with bcp or DTS.

Tara
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-12-08 : 18:52:02
Why not restore the database and drop all the users?
Go to Top of Page

dotosu
Starting Member

42 Posts

Posted - 2004-12-08 : 22:09:35
So will the suggestion by robvolk work?
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2004-12-08 : 22:40:47
yes, less work

--------------------
keeping it simple...
Go to Top of Page

Wanderer
Master Smack Fu Yak Hacker

1168 Posts

Posted - 2004-12-09 : 03:01:23
Extending on Rob's pint, the full sequence is:

1> Create a script that grants rights to your database (ideally, you have this already). Do this from your target server if you want to re-create rights as it is in that environment (for example, your tester usrids and etc. in a test environment), or on your source environment (if you are wanting to create a new environment for the same users).

2> Backup database on source server

3> Restore database on target server

4> Drop users from database on TARGET server (make sure you are on the right server here!!!!)

5> Run the script granting rights on you TARGET server, for the newly restored database!

I miss anything?

HTH

*##* *##* *##* *##*

Chaos, Disorder and Panic ... my work is done here!
Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2004-12-10 : 01:03:31
The login is a server level concept; not a database level concept. First the SQL Server authenticates the User. Next, the SQL Server determines if the User is authorized to use the particular database.

Backing up or restoring the user database has no impact on any of that.

We might be able to supply some better feedback if you could be more explicit about the actual problem that you are trying to correct.

HTH

=================================================================
Hear the sledges with the bells - Silver bells!
What a world of merriment their melody foretells!
How they tinkle, tinkle, tinkle,
In the icy air of night!
While the stars that oversprinkle
All the heavens, seem to twinkle
With a crystalline delight;
Keeping time, time, time,
In a sort of Runic rhyme,
To the tintinnabulation that so musically wells
From the bells, bells, bells, bells,
Bells, bells, bells
From the jingling and the tinkling of the bells.

Happy Holidays!
Go to Top of Page

Wanderer
Master Smack Fu Yak Hacker

1168 Posts

Posted - 2004-12-10 : 03:43:14
Bustaz,

Reading the 2 comments by Dotosu, I inferred that he is concerned with getting a DB to another server, and having the logins of that server be able to access and use the DB, hence my process. I do agree that Dotosu needs to confirm if this has resolved the requirement, or else the requirements needs to be expanded upon.

Nice SIG

*##* *##* *##* *##*

Chaos, Disorder and Panic ... my work is done here!
Go to Top of Page
   

- Advertisement -