Results 1 to 5 of 5

Thread: way to do SQL export from MDF>

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    way to do SQL export from MDF>

    hey is there a way to "export" data/table/schema in a .sql file from a mdf file I use?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: way to do SQL export from MDF>

    You would most likely do that from SQL Server Management Studio, not a VB.NET app.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2006
    Posts
    607

    Re: way to do SQL export from MDF>

    Hey thanks for the reply. I guess there isnt a way because i couldnt even find is uing LIVE search. (mind you i havnt googled ityet).

    I just want to give the option to my users to transfer the database over to a full blown server 2005 or setup a online database and change the connection string.

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: way to do SQL export from MDF>

    I take it that you are deploying your app for SQL Server Express with an MDF file, correct? If so then anyone who is using SQL Server can simply attach the MDF to the server in Management Studio. Each SQL Server database IS an MDF file already. They are just permanently attached instead of attached and detached on demand as they can be with SQL Server Express.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: way to do SQL export from MDF>

    You can also use the T-SQL BACKUP and RESTORE commands to move a database from one server to another.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width