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. SQL Server 2005 - path for log files when creating a new database

SQL Server 2005 - path for log files when creating a new database

Scheduled Pinned Locked Moved Database
databasesql-serversysadminhelpquestion
5 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.
  • N Offline
    N Offline
    Neophyte30
    wrote on last edited by
    #1

    Can anyone tell me where the default value for the logfile path is stored? I presume it is in one of the system tables somewhere... The problem is that at the moment, using the "Create New Database" option generates a path of: ...C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\YourDBname for the DB and ...C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DAT\YourDBname for the logfiles :confused: Obviously I can change this at creation time, but I'd rather that my colleagues and I don't have to do this every time (sigh). Google (so far) has not been my friend.

    A M 2 Replies Last reply
    0
    • N Neophyte30

      Can anyone tell me where the default value for the logfile path is stored? I presume it is in one of the system tables somewhere... The problem is that at the moment, using the "Create New Database" option generates a path of: ...C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\YourDBname for the DB and ...C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DAT\YourDBname for the logfiles :confused: Obviously I can change this at creation time, but I'd rather that my colleagues and I don't have to do this every time (sigh). Google (so far) has not been my friend.

      A Offline
      A Offline
      Alsvha
      wrote on last edited by
      #2

      I have never tried this myself, but what happens if you change it for the "model" database?

      --------------------------- Blogging about SQL, Technology and many other things

      N 1 Reply Last reply
      0
      • A Alsvha

        I have never tried this myself, but what happens if you change it for the "model" database?

        --------------------------- Blogging about SQL, Technology and many other things

        N Offline
        N Offline
        Neophyte30
        wrote on last edited by
        #3

        I see where you are coming from - but model database files location are both correct (i.e. both \DATA) Thanks for your attention. :)

        1 Reply Last reply
        0
        • N Neophyte30

          Can anyone tell me where the default value for the logfile path is stored? I presume it is in one of the system tables somewhere... The problem is that at the moment, using the "Create New Database" option generates a path of: ...C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\YourDBname for the DB and ...C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DAT\YourDBname for the logfiles :confused: Obviously I can change this at creation time, but I'd rather that my colleagues and I don't have to do this every time (sigh). Google (so far) has not been my friend.

          M Offline
          M Offline
          Mike Dimmick
          wrote on last edited by
          #4

          In Management Studio, right-click the server in the Object Explorer tree, select Properties, go to Database Settings, and change the paths under Database Default Locations. IIRC, you need to restart the SQL Server service before the change takes effect.

          DoEvents: Generating unexpected recursion since 1991

          N 1 Reply Last reply
          0
          • M Mike Dimmick

            In Management Studio, right-click the server in the Object Explorer tree, select Properties, go to Database Settings, and change the paths under Database Default Locations. IIRC, you need to restart the SQL Server service before the change takes effect.

            DoEvents: Generating unexpected recursion since 1991

            N Offline
            N Offline
            Neophyte30
            wrote on last edited by
            #5

            Woohoo! Yup - the default locations were blank (dunno where it was getting them from before :doh: ) Changed and successful - did not even have to restart SQL server agent or anything. Cheers Mike! :rose:

            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