Backup using relative backup directory

  • According to the SQL Server 2000 Books Online, the BACKUP command may use a relative path name for DISK=. How does one code the BACKUP command using the relative path name?

  • I figured it out. If I code BACKUP DISK=pubs\pubs_db_200311111104.bak it will create my backup in C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\pubs\pubs_db_200311111104.bak

  • From Books Online:

    Note If a relative path name is entered for a backup to disk, the backup file is placed in the default backup directory. This directory is set during installation and stored in the BackupDirectory registry key under KEY_LOCAL_MACHINE\Software\Microsoft\MSSQLServer\MSSQLServer.

    So, there really is no reason to code a relative path.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply