mess up the security and want to get one database up

  • I tried to learn how to set up the security of the database server. I messed up the setting. Right now when I tried to connect to the default sql server, it gave me the message. "Connection could not establish. sql server does not exist or fail. "

     

    I tried to reinstall the sql server. it did not allow me . I could not remove the ms sql server in my computer,either. It did not work .

     

    I have one database resided in the default sql server. Right now I do not know how to get that database up. Thanks.

  • Reason why sql server is not remove:

                                                   You might have remove the MS SQL SERVER Folder or some other folder depend to SQL Server.

     

    How To Solve this problem:

                                                   a) You first of all take the database file from   \Microsoft SQL Server\MSSQL\Data\ .MDF to safe location.

                                                   b) You try to install the SQL server with different Instance name.

                                                   c) Create the database (Your previous database name)

                                                   d) Use sp_detach_db 'databasename' command to Detach database

                                                   e) copy the database file (which you have copy before) to  \Microsoft SQL Server\MSSQL\Data\ .MDF or your own location

                                                    f) use sp_attach_db 'database name','path'.

    path=specify the path which you have copied very first.

    If this not work then you have to physical work on your system registery to remove sql server                     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply