Wednesday, March 21, 2012

HOW TO LOGIN IN TO SQL EXPRESS AND HOW TO ATTACH DATABASE PLZZ ITS URGENT

Hi

i am developing an installer for our produce where there is a need to install sqlexpress and then i have to attach the database to that but i am unable to understand how to do that , i any one can help in this issue plss

To install SQL Express you need to include the installer and then pass command line parameters to it. This link will help http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsse/html/EmSQLExCustApp.asp

Now to attach a database, you need to create the database, then detach it, now you have an .mdf and an .ldf file. You need to include that in the installer, then once SQl Express is installed on the customer machine you need to re-attach it, you can do this by using the sp_detach, called through sqlcmd on or a sqlclient sqlcommand object.

No comments:

Post a Comment