How to install Adventure Work Database


Problem :

When I download Database Adventure Work  I see it MDF file only ok but now how can I attach this database without LDF file . SQL Server give me ERROR

AdventureWork Without LDF File

 

 

ERROR

 

Solution : 

to fix this error and install the database on the production we will create the LDF file by this script .

 

Create Database AdventureWorks2008R2

ON (FILENAME=‘E:\AdventureWorks2008R2_Data.mdf’)

FOR ATTACH_REBUILD_LOG

by this Script I Create Database AdventureWorks2008R2 and put the File name for the MDF file the ( Full path ) then I make REBUILD for the LOG by this Command  (ATTACH_REBUILD_LOG)

Now after you EXCE this Query Check the path of the MDF file you will see the new File LDF for the database adventure work also you check the Databases on SQL Server management studio you will find the Database ADVENTUREWORK2008R2

Regards ,

Eng. Mustafa Elmasry

Database Administrator

 

 

How to transfer Login and password from Server to Server in MSSQL 2008


Problem :

When you install new instance SQL Server in New Server you won’t to Copy all users from Server A to the New Server B so let’s se the solution

Solution :

Microsoft make good solution about this problem  Check this link : http://support.microsoft.com/kb/918992

 

Microsoft make Script to run it on old server to generate Script for your all Users and passwords then take this Script and run it on your new server

 

Error When make Mirroring between SQL Server Standard Edition and Enterprise Edition


we can have Mirroring between Standard and Enterprise editions. But when you do this via SSMS (Graphical Interface), you might end up with following error message.

But when we use T-SQL statements, we were able to setup database mirroring and which worked perfectly fine too.

Error Message:

This mirroring configuration is not supported. Because the principal server instance, <server_name>, is Standard Edition, the mirror server instance must also be Standard Edition.

531x484xSQLServerMirroringEditionError_thumb_jpg_pagespeed_ic_yWV4PufZF4