Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Regarding mdf file

Regarding mdf file

Scheduled Pinned Locked Moved Database
csharptoolsdatabasehelpquestion
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lalitN
    wrote on last edited by
    #1

    Hi All, How we make the .mdf file of a database ? I want a script or C# code that could be used in a utility in C#.Net. Please help !! Regards, Lalit

    L 1 Reply Last reply
    0
    • L lalitN

      Hi All, How we make the .mdf file of a database ? I want a script or C# code that could be used in a utility in C#.Net. Please help !! Regards, Lalit

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      lalitN wrote:

      How we make the .mdf file of a database ?

      That extension is used both for Sql Server as well as Microsoft Access. Which are you targetting?

      Bastard Programmer from Hell :suss:

      L 1 Reply Last reply
      0
      • L Lost User

        lalitN wrote:

        How we make the .mdf file of a database ?

        That extension is used both for Sql Server as well as Microsoft Access. Which are you targetting?

        Bastard Programmer from Hell :suss:

        L Offline
        L Offline
        lalitN
        wrote on last edited by
        #3

        I am using SQL Server 2008 R2.

        L 1 Reply Last reply
        0
        • L lalitN

          I am using SQL Server 2008 R2.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          The command to create a database is documented here[^], examples are at the bottom of the page.

          Bastard Programmer from Hell :suss:

          L 1 Reply Last reply
          0
          • L Lost User

            The command to create a database is documented here[^], examples are at the bottom of the page.

            Bastard Programmer from Hell :suss:

            L Offline
            L Offline
            lalitN
            wrote on last edited by
            #5

            Hi, Can we create the mdf file by taking the backup of one existing database ? Regrds, Lalit

            L 1 Reply Last reply
            0
            • L lalitN

              Hi, Can we create the mdf file by taking the backup of one existing database ? Regrds, Lalit

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Yes. Backup the existing database, and restore[^] it. Keep in mind that this procedure will convert "older" database versions (backups from 2005) to the format of your server (2008R2).

              Bastard Programmer from Hell :suss:

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups