Hi,
I am created SQL database on my pc & working successfully. Now I copy that files ( .mdf & .lof ) on cd & I want to open that files on another pc.
Can I open?
Please Help me.
Thank you.
Then in query analyzer use:
(At FILENAME = ... put the path to your mdf file)
CREATE DATABASE your_database
ON PRIMARY (FILENAME = 'c:\program files\microsoft sql server\mssql\data\your_database.mdf')
FOR ATTACH
Or you can do it in enterprise manager, right click on Databases, then All tasks and Attach database. Ckick on [...] (browse) and find your mdf file.
Zhavic
--------------------------------------------------------------- In the 1960s you needed the power of two Comodore64s to get a rocket to the moon. Now you need a machine which is a vast number of times more powerful just to run the most popular GUI.
Dear Sir,
Thankyou for your reply.
I am using SQL-7 and there is no option of Attach Database in enterprise manager.
Another method - 'CREAT DATABASE....' SQL throw the error message
'sever: Msg 5172, Level 16, State 15, Line 1'
"The header for file 'c:\MSSQL7\Data\Milind.mdf' is not a valid database file header. The PageAudit property is incorrect."
Can I use the latest version of SQL?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.