Reply to Re: Backup users

Your name:

Reply:


Posted by Erland Sommarskog on 02/23/06 01:25

Kittikun (kittikun@gmail.com) writes:
> I am currently using the BACKUP DATABASE method to backup my database.
> Everything works fine, except for users. I created various users with
> sp_addlogin to access this database and they are located in the xlogins
> table. The problem is for example, if I backup, remove some users and
> do a restore, i won't have them back because i just backup the
> database.
>
> So the question is, how can I backup specific users and restore them ?
> Do I have to do it manually ? It seems I can't alter the xlogin table
> so I'm pretty confused.

Not really sure that I understand your question. If you decide to drop
a login from the server, you have probably decided to do for good. Why
would you have thst login back if you reture a database?

If you restore the database on a different server, then there is a problem,
because the users in the database will not match the logins. In this case
you can use sp_change_users_login to map users back to logins. For details
on this procedure, please look in Books Online.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация