Showing posts with label thedatabase. Show all posts
Showing posts with label thedatabase. Show all posts

Friday, February 24, 2012

Copy users between databases

Hello All,
I used DTS to copy one database to a blank database for a backup of the
database. A duplicate database.
How do I copy over the user logins to the new database.
This did not happen with DTS.
The databases are on the same instance of SQL.
Any help appreciated.
Thanks,
Terry
tgwillett@.cox.netRun this on the database to autofix users
select 'exec sp_change_users_login ''Auto_Fix'', ''' + name + '''' from
sysusers
where name not in ('INFORMATION_SCHEMA', 'dbo', 'guest', 'public')
"Terry" wrote:

> Hello All,
> I used DTS to copy one database to a blank database for a backup of the
> database. A duplicate database.
> How do I copy over the user logins to the new database.
> This did not happen with DTS.
> The databases are on the same instance of SQL.
> Any help appreciated.
> Thanks,
> Terry
> tgwillett@.cox.net
>
>

Copy users between databases

Hello All,
I used DTS to copy one database to a blank database for a backup of the
database. A duplicate database.
How do I copy over the user logins to the new database.
This did not happen with DTS.
The databases are on the same instance of SQL.
Any help appreciated.
Thanks,
Terry
tgwillett@.cox.netThis is a pretty good article on it:
http://support.microsoft.com/defaul...kb;en-us;246133
Christian
"Terry" <tgwillett@.cox.net> wrote in message
news:r_62g.56456$gE.9859@.dukeread06...
> Hello All,
> I used DTS to copy one database to a blank database for a backup of the
> database. A duplicate database.
> How do I copy over the user logins to the new database.
> This did not happen with DTS.
> The databases are on the same instance of SQL.
> Any help appreciated.
> Thanks,
> Terry
> tgwillett@.cox.net
>