Home > SQL Server Tips > Database Administrator > Error 21002 cloning SQL Server 7 database solution
SQL Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DATABASE ADMINISTRATOR

Error 21002 cloning SQL Server 7 database solution


David McGrath
07.22.2005
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


This tip was submitted to the SearchSQLServer.com tip library by David McGrath. Please let others know how useful it is via the rating scale at the end of the tip. Do you know a useful tip, timesaver or workaround? Submit it to our monthly tip contest and you could win a prize.


This tip allows the cloning of SQL Server 7 databases to SQL Server 2000 that have named users with database administrator privileges. Using this tip enables the security role that already exists for each of the database instances to be added to the global security role, and provides the applicable privileges to the named instances. Without this tip the database administrator will receive an error, stating that this user already exists!

USE dbname
UPDATE sysusers sed id=
(
SELECT SID
FROM master dbo.sysxlogins
WHERE UPPER(name)='USERNAME'
)
WHERE UPPER(name)='USERNAME'
GO
Prior to this script you must ensure that you have ticked the 'Allow
modification to be made directly to the system catalog' checkbox in SQL
Server configuration Properties!

Code: USE dbname
UPDATE sysusers sed id=
(
SELECT SID
FROM master dbo.sysxlogins
WHERE UPPER(name)='USERNAME'
)
WHERE UPPER(name)='USERNAME'
GO

About the author: David McGrath is a database administrator located in England.


Do you have comments on this tip? Let us know.

Rate this Tip
To rate tips, you must be a member of SearchSQLServer.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Microsoft SQL Server
SQL Server 2008 backup compression pros and cons
Tuning SQL Server performance via disk arrays and disk partitioning
Should you upgrade to SQL Server 2005 or SQL Server 2008?
SQL Server data conversions from date/time values to character types
Using full-text search for symbols in SQL Server
Monitor database mirroring and replication after a SQL Server upgrade
Basics for working with DATETIME and SMALLDATETIME in SQL Server 2005
How to configure Database Mail in SQL Server 2005 to send mail
Upgrade live applications to SQL Server 2005 for high availability
How to use rank function in SQL Server 2005

Database Administrator
How to create a SQL Server linked server to DB2
Virtual database storage for SQL Server: Friend or foe?
How to restore SQL Server database to transition server during upgrade
Storage area network (SAN) basics every SQL Server DBA must know
SQL Server backups using SAN database snapshots
Sarbanes-Oxley compliance checklist: IT security and SQL audits
SQL Server 2005 log shipping setup using the wizard
Track changes to SQL Server 2000 and 2005 with one simple utility
Tips for scheduling and testing SQL Server backups
Ten common SQL Server security vulnerabilities you may be overlooking

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2005 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts