I have a project I'm trying to open using sql server .Net but there's a problem with the "connection" between the two. What should I do? Something with "attaching" the *.ldf and *.mdf files?!
I'll apperciate any kind of suggestion.
Thanks,
Inbal.
Hi,
Before connecting it from the application attach the database (MDF and LDF)
file using Query Analyzer.
Steps:
1. Login to SQL Serevr using Query analyzer
2. Copy the MDF and LDF file to a specific directory say (C:\mssql\data\)
3 Attach the MDF and LDF files to SQL server using a database name, use the
below command
sp_attach_db 'dbname','c:\msql\data\dbname_data.MDFdbname_log.L DF'
Executing the above command will attach the database to SQl server, After
that try to access your database using application.
Thanks
Hari
MCDBA
"inbal" <inbal_rulz@.hotmail.com> wrote in message
news:EF7647E2-5CDC-4651-9DE0-6DEE94456460@.microsoft.com...
> I have a project I'm trying to open using sql server .Net but there's a
problem with the "connection" between the two. What should I do? Something
with "attaching" the *.ldf and *.mdf files?!
> I'll apperciate any kind of suggestion.
> Thanks,
> Inbal.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment