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. Configure MS SQL server 2005

Configure MS SQL server 2005

Scheduled Pinned Locked Moved Database
databasesql-serversysadmin
4 Posts 3 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.
  • P Offline
    P Offline
    phokojoe
    wrote on last edited by
    #1

    Hi! I have installed MS SQL Server 2005 on my Company's server (c drive) and I want to create my databases so that the Data is on another hard drive (N:\) is is possible to do that. Thank you:~

    phokojoe

    M 1 Reply Last reply
    0
    • P phokojoe

      Hi! I have installed MS SQL Server 2005 on my Company's server (c drive) and I want to create my databases so that the Data is on another hard drive (N:\) is is possible to do that. Thank you:~

      phokojoe

      M Offline
      M Offline
      mghiassi
      wrote on last edited by
      #2

      You can Attach the .mdf file

      P 1 Reply Last reply
      0
      • M mghiassi

        You can Attach the .mdf file

        P Offline
        P Offline
        phokojoe
        wrote on last edited by
        #3

        I do not understand. I know how to attach the database. My question is, when you install ms sql server, the default directory is c:\ whatver the name of the hard drive it is. And the .mdf file is located at c:\program files\microsoft sql\mssql\data\databasename.mdf. Now I want this database to be in the other drive not the default drive. Is it possible?

        phokojoe

        R 1 Reply Last reply
        0
        • P phokojoe

          I do not understand. I know how to attach the database. My question is, when you install ms sql server, the default directory is c:\ whatver the name of the hard drive it is. And the .mdf file is located at c:\program files\microsoft sql\mssql\data\databasename.mdf. Now I want this database to be in the other drive not the default drive. Is it possible?

          phokojoe

          R Offline
          R Offline
          Rob Graham
          wrote on last edited by
          #4

          " CREATE Database Mydb
          ON (Name = mydbdat. FILENAME = 'N:\Mydbdir\mydb.mdf', SIZE = 5MB, MAXSIZE = 10MB FILEGROWTH = 1MB)
          Log On (NAME= MydbLog, FILNAME = 'N:\Mydbdir\MyDb.ldf', SIZE =1MB, MAX SIZE = 5MB, FILEGROWTH = 1MB)"

          TO move an existing database:

          "sp_detach_db Mydb;
          GO
          --Physically move the full-text catalog to the new location.
          --Attach the myDbdatabase and specify the new location
          CREATE DATABASE Mydb ON
          (FILENAME = 'N:\Mydbdir\MyDb.mdf'),
          (FILENAME = 'N:\Mydbdir\MyDb.ldf'),
          FOR ATTACH;
          GO

          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