I’m working on a project that has to be turned in tomorrow. For this project I use a SQL Server Express database running on a remote server.
Now, I need to generate a .mdf file from the remote database. I have searched everywhere, and I can not find a proper solution.
I have scripted the database to a .sql file, but I can’t find a way of executing it against a local .mdf file. Either I can create a .sdf which will not work, or connect to a database engine.
Help will be greatly appreciated!
.mdfis the SQL Server’s datafile format.So you need to these steps:
.sqlscript against itNow, after all the steps, you can copy the resulting
.mdffile from the SQL Server data directory to somewhere else.