Moving A SQL Server Database

Written by Desirée Harris


Continued from page 1

Attachingrepparttar Database

1. Right-clickrepparttar 118376 database, select 'All Tasks', and then click 'Attach Database…'. 2. Navigate torepparttar 118377 data file by clickingrepparttar 118378 button that has 3 dots on it (…). 3. Once you've selectedrepparttar 118379 database .mdf file, you'll seerepparttar 118380 data file path (which should be verified for bothrepparttar 118381 data and transaction log file) and haverepparttar 118382 option to chooserepparttar 118383 database name and owner. Attach it asrepparttar 118384 database name, and ensurerepparttar 118385 owner name is 'sa'. 4. Verifyrepparttar 118386 path forrepparttar 118387 transaction log file is correct. Ifrepparttar 118388 path isn’t correct, update it torepparttar 118389 appropriate directory. 5. Click ‘OK’.

Note: If you didn't moverepparttar 118390 transaction log file torepparttar 118391 new server withrepparttar 118392 data file, you'll be prompted to create a new one. If you choose to create a new one, it will be done for you automatically.

Orphaned Users

Ifrepparttar 118393 database user doesn't exist onrepparttar 118394 new server, create it now. When creating it, you may receive an error that it already exists, but that's ok,repparttar 118395 work that needs completed by SQL Server to addrepparttar 118396 user account is done. After you receiverepparttar 118397 error thatrepparttar 118398 user already exists, press cancel and continue on torepparttar 118399 next user.

Movingrepparttar 118400 database to a new server will result in orphaned users. You will need to run a stored procedure that will maprepparttar 118401 user inrepparttar 118402 database to a user onrepparttar 118403 server. This stored procedure will changerepparttar 118404 relationship between a Microsoft SQL Server login and a SQL Server user inrepparttar 118405 current database. Basically, it changesrepparttar 118406 SID inrepparttar 118407 database to matchrepparttar 118408 one generated byrepparttar 118409 local server, which allows all custom permissions to be retained - it remembersrepparttar 118410 access and permissions.

1. Open Query Analyzer. 2. Selectrepparttar 118411 database inrepparttar 118412 drop-down box onrepparttar 118413 tool bar if it isn't already selected. 3. For each database user, we'll need to executerepparttar 118414 command: "sp_change_users_login 'update_one', 'db_username', 'db_username'*" (withoutrepparttar 118415 double-quotes).

*changerepparttar 118416 db_username torepparttar 118417 actual database username in both places.

Now update any connection strings to point torepparttar 118418 new SQL server (this could have been done whilerepparttar 118419 database was moving between servers to utilize all available time) and test it well. Also, check any DTS jobs, Full-Text Indexes and Replication configurations to ensure that they are set up onrepparttar 118420 new server as they won't fully move during this process. Now you should be set. Test it well and sit back, relax and reflect on a job well done.

Sources: http://vyaskn.tripod.com/moving_sql_server.htm http://www.databasejournal.com/features/mssql/article.php/2224361 http://vyaskn.tripod.com/troubleshooting_orphan_users.htm

Desirée Harris is a support specialist with ORCS Web - a company that provides managed hosting services for clients who develop and deploy their applications on Microsoft Windows platforms.

Desirée Harris is a support specialist with ORCS Web - a company that provides managed hosting services for clients who develop and deploy their applications on Microsoft Windows platforms.


Blogging: The best Introduction to Internet Publishing

Written by David A. Saharkhiz


Continued from page 1

Blogging is a great way to get familiar with internet publishing, and without even trying, you'll learn valuable HTML codes that you can put to use once you finally decide to set up a website.

AND, not only are blogs free, but you can even earn money from them throughrepparttar Google Adsense Program. There's nothing to lose, and you might end up learning enough about HTML to set up your own website, and finally have things your own way.

No matter which way you look at it, setting up a blog is one ofrepparttar 118375 best ways to enterrepparttar 118376 world of internet publishing. Get started today!

David Saharkhiz is a computer science major and National Merit Semifinalist at America's Clemson University. He provides comprehensive web-help and HTML coding tutorials, codes free HTML scripts, and works to help novice webmasters learn how to create a website.


    <Back to Page 1
 
ImproveHomeLife.com © 2005
Terms of Use