SQL 2005 Backup File

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bryan

    SQL 2005 Backup File

    We have a SQL 2005 server running the following backup job:

    <font face="Courier New" size="2"><br><f ont color="blue">/* Created by
    <a href="http://www.wangz.net/gsqlparser/sqlpp/sqlformat.htm"> free
    online sql formatter</a*/</font><br><br>
    <font color = "blue">EXEC UTE</font>&nbsp;<fon t color =
    "maroon">master </font><font color = "silver">.</font><font color =
    "maroon">db o</font><font color = "silver">.</font><font color =
    "#8000FF">xp_cr eate_subdir</font>
    <br>&nbsp;&nbsp ;&nbsp;<font color = "red">N'\\Serve r\Backups
    \DBServerName\\ DB_Name__METABA SE'</font>

    <br><br>
    <font color = "blue">GO</font>

    <br><br>
    <font color = "blue">EXEC UTE</font>&nbsp;<fon t color =
    "maroon">master </font><font color = "silver">.</font><font color =
    "maroon">db o</font><font color = "silver">.</font><font color =
    "#8000FF">xp_cr eate_subdir</font>
    <br>&nbsp;&nbsp ;&nbsp;<font color = "red">N'\\serve r\Backups
    \DBServerName\\ DB_Name__MSCRM' </font>

    <br><br>
    <font color = "blue">GO</font>

    <br><br>
    <font color = "blue">BACK UP</font>&nbsp;<fon t color = "blue">DATABASE </
    font>&nbsp;<fon t color = "maroon">[db_name__metaba se]</
    font>&nbsp;<fon t color = "blue">TO</font>&nbsp;<fon t color =
    "maroon">di sk</font>&nbsp;<fon t color = "silver">=</font>&nbsp;<fon t
    color = "red">N'\\serve r\Backups\DBSer verName\\DB_Nam e__METABASE
    \DB_Name__METAB ASE_backup_2006 10261158.bak'</font>&nbsp;<fon t color =
    "blue">WITH </font>&nbsp;<fon t color = "maroon">differ ential</
    font>&nbsp;<fon t color = "silver">,</font>&nbsp;<fon t color =
    "maroon">noform at</font>&nbsp;<fon t color = "silver">,</
    font>&nbsp;<fon t color = "maroon">noinit </font>&nbsp;<fon t color =
    "silver">,</font>&nbsp;<fon t color = "maroon">na me</font>&nbsp;<fon t
    color = "silver">=</font>&nbsp;<fon t color =
    "red">N'DB_Name __METABASE_back up_200610261158 39'</font>&nbsp;<fon t
    color = "silver">,</font>&nbsp;<fon t color = "maroon">sk ip</
    font>&nbsp;<fon t color = "silver">,</font>&nbsp;<fon t color =
    "maroon">rewind </font>&nbsp;<fon t color = "silver">,</font>&nbsp;<fon t
    color = "maroon">nounlo ad</font>&nbsp;<fon t color = "silver">,</
    font>&nbsp;<fon t color = "maroon">st ats</font>&nbsp;<fon t color =
    "silver">=</font>&nbsp;<fon t color = "black">10</font>

    <br><br>
    <font color = "blue">GO</font>

    <br><br>
    <font color = "blue">DECL ARE</font>&nbsp;&nbs p;<font color =
    "#8000FF">@back upSetId</font>&nbsp;&nbs p;<font color = "blue">AS</
    font>&nbsp;<fon t color = "black">INT </font>

    <br><br>
    <font color = "blue">SELE CT</font>&nbsp;<fon t color =
    "#8000FF">@back upSetId</font>&nbsp;<fon t color = "silver">=</
    font>&nbsp;<fon t color = "maroon">positi on</font>
    <br><font color = "blue">FROM </font>&nbsp;&nbs p;&nbsp;<font color =
    "maroon">ms db</font><font color = "silver">.</font><font color =
    "silver">.</font><font color = "maroon">backup set</font>
    <br><font color = "blue">WHER E</font>&nbsp;&nbs p;<font color =
    "maroon">databa se_name</font>&nbsp;<fon t color = "silver">=</
    font>&nbsp;<fon t color = "red">N'DB_Name __METABASE'</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;<font color =
    "blue">AND</font>&nbsp;<fon t color = "maroon">backup _set_id</
    font>&nbsp;<fon t color = "silver">=</font>&nbsp;<fon t color =
    "silver">(</font><font color = "blue">SELE CT</font>&nbsp;<fon t color =
    "fuchsia"><b>MA X</font></b><font color = "silver">(</font><font color
    = "maroon">backup _set_id</font><font color = "silver">)</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;<font
    color = "blue">FROM </font>&nbsp;&nbs p;&nbsp;<font color =
    "maroon">ms db</font><font color = "silver">.</font><font color =
    "silver">.</font><font color = "maroon">backup set</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;<font
    color = "blue">WHER E</font>&nbsp;&nbs p;<font color =
    "maroon">databa se_name</font>&nbsp;<fon t color = "silver">=</
    font>&nbsp;<fon t color = "red">N'DB_Name __METABASE'</font><font color
    = "silver">)</font>

    <br><br>
    <font color = "blue">IF</font>&nbsp;<fon t color =
    "#8000FF">@back upSetId</font>&nbsp;<fon t color = "blue">IS</
    font>&nbsp;<fon t color = "blue">NULL </font>
    <br>&nbsp;&nbsp ;<font color = "blue">BEGI N</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;<f ont color = "blue">RAISERRO R</
    font>&nbsp;<fon t color = "silver">(</font><font color =
    "red">N'Verify& nbsp;failed.&nb sp;Backup&nbsp; information&nbs p;for&nbsp;data base&nbsp;''DB_ Name__METABASE' '&nbsp;not&nbsp ;found.'</
    font><font color = "silver">,</font><font color = "black">16</
    font><font color = "silver">,</font><font color = "black">1</
    font><font color = "silver">)</font>
    <br>&nbsp;&nbsp ;<font color = "blue">END</font>

    <br><br>
    <font color = "blue">REST ORE</font>&nbsp;<fon t color =
    "maroon">verify only</font>&nbsp;<fon t color = "blue">FROM </
    font>&nbsp;<fon t color = "maroon">di sk</font>&nbsp;<fon t color =
    "silver">=</font>&nbsp;<fon t color = "red">N'\\serve r\Backups
    \DBServerName\\ DB_Name__METABA SE
    \DB_Name__METAB ASE_backup_2006 10261158.bak'</font>&nbsp;<fon t color =
    "blue">WITH </font>&nbsp;<fon t color = "blue">FILE </font>&nbsp;<fon t
    color = "silver">=</font>&nbsp;<fon t color = "#8000FF">@back upSetId</
    font>&nbsp;<fon t color = "silver">,</font>&nbsp;<fon t color =
    "maroon">nounlo ad</font>&nbsp;<fon t color = "silver">,</
    font>&nbsp;<fon t color = "maroon">norewi nd</font>

    <br><br>
    <font color = "blue">GO</font>

    <br><br>
    <font color = "blue">BACK UP</font>&nbsp;<fon t color = "blue">DATABASE </
    font>&nbsp;<fon t color = "maroon">[db_name__mscrm]</font>&nbsp;<fon t
    color = "blue">TO</font>&nbsp;<fon t color = "maroon">di sk</
    font>&nbsp;<fon t color = "silver">=</font>&nbsp;<fon t color = "red">N'\
    \server\Backups \DBServerName\\ DB_Name__MSCRM
    \DB_Name__MSCRM _backup_2006102 61158.bak'</font>&nbsp;<fon t color =
    "blue">WITH </font>&nbsp;<fon t color = "maroon">differ ential</
    font>&nbsp;<fon t color = "silver">,</font>&nbsp;<fon t color =
    "maroon">noform at</font>&nbsp;<fon t color = "silver">,</
    font>&nbsp;<fon t color = "maroon">noinit </font>&nbsp;<fon t color =
    "silver">,</font>&nbsp;<fon t color = "maroon">na me</font>&nbsp;<fon t
    color = "silver">=</font>&nbsp;<fon t color =
    "red">N'DB_Name __MSCRM_backup_ 20061026115839' </font>&nbsp;<fon t color
    = "silver">,</font>&nbsp;<fon t color = "maroon">sk ip</font>&nbsp;<fon t
    color = "silver">,</font>&nbsp;<fon t color = "maroon">rewind </
    font>&nbsp;<fon t color = "silver">,</font>&nbsp;<fon t color =
    "maroon">nounlo ad</font>&nbsp;<fon t color = "silver">,</
    font>&nbsp;<fon t color = "maroon">st ats</font>&nbsp;<fon t color =
    "silver">=</font>&nbsp;<fon t color = "black">10</font>

    <br><br>
    <font color = "blue">GO</font>

    <br><br>
    <font color = "blue">DECL ARE</font>&nbsp;&nbs p;<font color =
    "#8000FF">@back upSetId</font>&nbsp;&nbs p;<font color = "blue">AS</
    font>&nbsp;<fon t color = "black">INT </font>

    <br><br>
    <font color = "blue">SELE CT</font>&nbsp;<fon t color =
    "#8000FF">@back upSetId</font>&nbsp;<fon t color = "silver">=</
    font>&nbsp;<fon t color = "maroon">positi on</font>
    <br><font color = "blue">FROM </font>&nbsp;&nbs p;&nbsp;<font color =
    "maroon">ms db</font><font color = "silver">.</font><font color =
    "silver">.</font><font color = "maroon">backup set</font>
    <br><font color = "blue">WHER E</font>&nbsp;&nbs p;<font color =
    "maroon">databa se_name</font>&nbsp;<fon t color = "silver">=</
    font>&nbsp;<fon t color = "red">N'DB_Name __MSCRM'</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;<font color =
    "blue">AND</font>&nbsp;<fon t color = "maroon">backup _set_id</
    font>&nbsp;<fon t color = "silver">=</font>&nbsp;<fon t color =
    "silver">(</font><font color = "blue">SELE CT</font>&nbsp;<fon t color =
    "fuchsia"><b>MA X</font></b><font color = "silver">(</font><font color
    = "maroon">backup _set_id</font><font color = "silver">)</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;<font
    color = "blue">FROM </font>&nbsp;&nbs p;&nbsp;<font color =
    "maroon">ms db</font><font color = "silver">.</font><font color =
    "silver">.</font><font color = "maroon">backup set</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;<font
    color = "blue">WHER E</font>&nbsp;&nbs p;<font color =
    "maroon">databa se_name</font>&nbsp;<fon t color = "silver">=</
    font>&nbsp;<fon t color = "red">N'DB_Name __MSCRM'</font><font color =
    "silver">)</font>

    <br><br>
    <font color = "blue">IF</font>&nbsp;<fon t color =
    "#8000FF">@back upSetId</font>&nbsp;<fon t color = "blue">IS</
    font>&nbsp;<fon t color = "blue">NULL </font>
    <br>&nbsp;&nbsp ;<font color = "blue">BEGI N</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;<f ont color = "blue">RAISERRO R</
    font>&nbsp;<fon t color = "silver">(</font><font color =
    "red">N'Verify& nbsp;failed.&nb sp;Backup&nbsp; information&nbs p;for&nbsp;data base&nbsp;''DB_ Name__MSCRM''&n bsp;not&nbsp;fo und.'</
    font><font color = "silver">,</font><font color = "black">16</
    font><font color = "silver">,</font><font color = "black">1</
    font><font color = "silver">)</font>
    <br>&nbsp;&nbsp ;<font color = "blue">END</font>

    <br><br>
    <font color = "blue">REST ORE</font>&nbsp;<fon t color =
    "maroon">verify only</font>&nbsp;<fon t color = "blue">FROM </
    font>&nbsp;<fon t color = "maroon">di sk</font>&nbsp;<fon t color =
    "silver">=</font>&nbsp;<fon t color = "red">N'\\serve r\Backups
    \DBServerName\\ DB_Name__MSCRM\ DB_Name__MSCRM_ backup_20061026 1158.bak'</
    font>&nbsp;<fon t color = "blue">WITH </font>&nbsp;<fon t color =
    "blue">FILE </font>&nbsp;<fon t color = "silver">=</font>&nbsp;<fon t
    color = "#8000FF">@back upSetId</font>&nbsp;<fon t color = "silver">,</
    font>&nbsp;<fon t color = "maroon">nounlo ad</font>&nbsp;<fon t color =
    "silver">,</font>&nbsp;<fon t color = "maroon">norewi nd</font>
    </font>

    This job was set up long before i started here and the problem is that
    the backup file itself has grown to be over 230 GB. It does not
    appear that the backup job is pruning the file. is there a way to
    view the contents of this file and then prune it so we keep no more
    then two weeks worth of data.

    Thanks

  • Greg D. Moore \(Strider\)

    #2
    Re: SQL 2005 Backup File



    Can you please repost WITHOUT the HTML

    Tht's basically impossible to read.



    --
    Greg Moore
    SQL Server DBA Consulting
    Email: sql (at) greenms.com http://www.greenms.com

    "Bryan" <bsockel@gmail. comwrote in message
    news:1173818991 .982147.112650@ y66g2000hsf.goo glegroups.com.. .
    We have a SQL 2005 server running the following backup job:
    >
    <font face="Courier New" size="2"><br><f ont color="blue">/* Created by
    <a href="http://www.wangz.net/gsqlparser/sqlpp/sqlformat.htm"> free
    online sql formatter</a*/</font><br><br>
    <font color = "blue">EXEC UTE</font>&nbsp;<fon t color =
    "maroon">master </font><font color = "silver">.</font><font color =
    "maroon">db o</font><font color = "silver">.</font><font color =
    "#8000FF">xp_cr eate_subdir</font>
    <br>&nbsp;&nbsp ;&nbsp;<font color = "red">N'\\Serve r\Backups
    \DBServerName\\ DB_Name__METABA SE'</font>
    >
    <br><br>
    <font color = "blue">GO</font>
    >
    <br><br>
    <font color = "blue">EXEC UTE</font>&nbsp;<fon t color =
    "maroon">master </font><font color = "silver">.</font><font color =
    "maroon">db o</font><font color = "silver">.</font><font color =
    "#8000FF">xp_cr eate_subdir</font>
    <br>&nbsp;&nbsp ;&nbsp;<font color = "red">N'\\serve r\Backups
    \DBServerName\\ DB_Name__MSCRM' </font>
    >
    <br><br>
    <font color = "blue">GO</font>
    >
    <br><br>
    <font color = "blue">BACK UP</font>&nbsp;<fon t color = "blue">DATABASE </
    font>&nbsp;<fon t color = "maroon">[db_name__metaba se]</
    font>&nbsp;<fon t color = "blue">TO</font>&nbsp;<fon t color =
    "maroon">di sk</font>&nbsp;<fon t color = "silver">=</font>&nbsp;<fon t
    color = "red">N'\\serve r\Backups\DBSer verName\\DB_Nam e__METABASE
    \DB_Name__METAB ASE_backup_2006 10261158.bak'</font>&nbsp;<fon t color =
    "blue">WITH </font>&nbsp;<fon t color = "maroon">differ ential</
    font>&nbsp;<fon t color = "silver">,</font>&nbsp;<fon t color =
    "maroon">noform at</font>&nbsp;<fon t color = "silver">,</
    font>&nbsp;<fon t color = "maroon">noinit </font>&nbsp;<fon t color =
    "silver">,</font>&nbsp;<fon t color = "maroon">na me</font>&nbsp;<fon t
    color = "silver">=</font>&nbsp;<fon t color =
    "red">N'DB_Name __METABASE_back up_200610261158 39'</font>&nbsp;<fon t
    color = "silver">,</font>&nbsp;<fon t color = "maroon">sk ip</
    font>&nbsp;<fon t color = "silver">,</font>&nbsp;<fon t color =
    "maroon">rewind </font>&nbsp;<fon t color = "silver">,</font>&nbsp;<fon t
    color = "maroon">nounlo ad</font>&nbsp;<fon t color = "silver">,</
    font>&nbsp;<fon t color = "maroon">st ats</font>&nbsp;<fon t color =
    "silver">=</font>&nbsp;<fon t color = "black">10</font>
    >
    <br><br>
    <font color = "blue">GO</font>
    >
    <br><br>
    <font color = "blue">DECL ARE</font>&nbsp;&nbs p;<font color =
    "#8000FF">@back upSetId</font>&nbsp;&nbs p;<font color = "blue">AS</
    font>&nbsp;<fon t color = "black">INT </font>
    >
    <br><br>
    <font color = "blue">SELE CT</font>&nbsp;<fon t color =
    "#8000FF">@back upSetId</font>&nbsp;<fon t color = "silver">=</
    font>&nbsp;<fon t color = "maroon">positi on</font>
    <br><font color = "blue">FROM </font>&nbsp;&nbs p;&nbsp;<font color =
    "maroon">ms db</font><font color = "silver">.</font><font color =
    "silver">.</font><font color = "maroon">backup set</font>
    <br><font color = "blue">WHER E</font>&nbsp;&nbs p;<font color =
    "maroon">databa se_name</font>&nbsp;<fon t color = "silver">=</
    font>&nbsp;<fon t color = "red">N'DB_Name __METABASE'</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;<font color =
    "blue">AND</font>&nbsp;<fon t color = "maroon">backup _set_id</
    font>&nbsp;<fon t color = "silver">=</font>&nbsp;<fon t color =
    "silver">(</font><font color = "blue">SELE CT</font>&nbsp;<fon t color =
    "fuchsia"><b>MA X</font></b><font color = "silver">(</font><font color
    = "maroon">backup _set_id</font><font color = "silver">)</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;<font
    color = "blue">FROM </font>&nbsp;&nbs p;&nbsp;<font color =
    "maroon">ms db</font><font color = "silver">.</font><font color =
    "silver">.</font><font color = "maroon">backup set</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;<font
    color = "blue">WHER E</font>&nbsp;&nbs p;<font color =
    "maroon">databa se_name</font>&nbsp;<fon t color = "silver">=</
    font>&nbsp;<fon t color = "red">N'DB_Name __METABASE'</font><font color
    = "silver">)</font>
    >
    <br><br>
    <font color = "blue">IF</font>&nbsp;<fon t color =
    "#8000FF">@back upSetId</font>&nbsp;<fon t color = "blue">IS</
    font>&nbsp;<fon t color = "blue">NULL </font>
    <br>&nbsp;&nbsp ;<font color = "blue">BEGI N</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;<f ont color = "blue">RAISERRO R</
    font>&nbsp;<fon t color = "silver">(</font><font color =
    "red">N'Verify& nbsp;failed.&nb sp;Backup&nbsp; information&nbs p;for&nbsp;data base&nbsp;''DB_ Name__METABASE' '&nbsp;not&nbsp ;found.'</
    font><font color = "silver">,</font><font color = "black">16</
    font><font color = "silver">,</font><font color = "black">1</
    font><font color = "silver">)</font>
    <br>&nbsp;&nbsp ;<font color = "blue">END</font>
    >
    <br><br>
    <font color = "blue">REST ORE</font>&nbsp;<fon t color =
    "maroon">verify only</font>&nbsp;<fon t color = "blue">FROM </
    font>&nbsp;<fon t color = "maroon">di sk</font>&nbsp;<fon t color =
    "silver">=</font>&nbsp;<fon t color = "red">N'\\serve r\Backups
    \DBServerName\\ DB_Name__METABA SE
    \DB_Name__METAB ASE_backup_2006 10261158.bak'</font>&nbsp;<fon t color =
    "blue">WITH </font>&nbsp;<fon t color = "blue">FILE </font>&nbsp;<fon t
    color = "silver">=</font>&nbsp;<fon t color = "#8000FF">@back upSetId</
    font>&nbsp;<fon t color = "silver">,</font>&nbsp;<fon t color =
    "maroon">nounlo ad</font>&nbsp;<fon t color = "silver">,</
    font>&nbsp;<fon t color = "maroon">norewi nd</font>
    >
    <br><br>
    <font color = "blue">GO</font>
    >
    <br><br>
    <font color = "blue">BACK UP</font>&nbsp;<fon t color = "blue">DATABASE </
    font>&nbsp;<fon t color = "maroon">[db_name__mscrm]</font>&nbsp;<fon t
    color = "blue">TO</font>&nbsp;<fon t color = "maroon">di sk</
    font>&nbsp;<fon t color = "silver">=</font>&nbsp;<fon t color = "red">N'\
    \server\Backups \DBServerName\\ DB_Name__MSCRM
    \DB_Name__MSCRM _backup_2006102 61158.bak'</font>&nbsp;<fon t color =
    "blue">WITH </font>&nbsp;<fon t color = "maroon">differ ential</
    font>&nbsp;<fon t color = "silver">,</font>&nbsp;<fon t color =
    "maroon">noform at</font>&nbsp;<fon t color = "silver">,</
    font>&nbsp;<fon t color = "maroon">noinit </font>&nbsp;<fon t color =
    "silver">,</font>&nbsp;<fon t color = "maroon">na me</font>&nbsp;<fon t
    color = "silver">=</font>&nbsp;<fon t color =
    "red">N'DB_Name __MSCRM_backup_ 20061026115839' </font>&nbsp;<fon t color
    = "silver">,</font>&nbsp;<fon t color = "maroon">sk ip</font>&nbsp;<fon t
    color = "silver">,</font>&nbsp;<fon t color = "maroon">rewind </
    font>&nbsp;<fon t color = "silver">,</font>&nbsp;<fon t color =
    "maroon">nounlo ad</font>&nbsp;<fon t color = "silver">,</
    font>&nbsp;<fon t color = "maroon">st ats</font>&nbsp;<fon t color =
    "silver">=</font>&nbsp;<fon t color = "black">10</font>
    >
    <br><br>
    <font color = "blue">GO</font>
    >
    <br><br>
    <font color = "blue">DECL ARE</font>&nbsp;&nbs p;<font color =
    "#8000FF">@back upSetId</font>&nbsp;&nbs p;<font color = "blue">AS</
    font>&nbsp;<fon t color = "black">INT </font>
    >
    <br><br>
    <font color = "blue">SELE CT</font>&nbsp;<fon t color =
    "#8000FF">@back upSetId</font>&nbsp;<fon t color = "silver">=</
    font>&nbsp;<fon t color = "maroon">positi on</font>
    <br><font color = "blue">FROM </font>&nbsp;&nbs p;&nbsp;<font color =
    "maroon">ms db</font><font color = "silver">.</font><font color =
    "silver">.</font><font color = "maroon">backup set</font>
    <br><font color = "blue">WHER E</font>&nbsp;&nbs p;<font color =
    "maroon">databa se_name</font>&nbsp;<fon t color = "silver">=</
    font>&nbsp;<fon t color = "red">N'DB_Name __MSCRM'</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;<font color =
    "blue">AND</font>&nbsp;<fon t color = "maroon">backup _set_id</
    font>&nbsp;<fon t color = "silver">=</font>&nbsp;<fon t color =
    "silver">(</font><font color = "blue">SELE CT</font>&nbsp;<fon t color =
    "fuchsia"><b>MA X</font></b><font color = "silver">(</font><font color
    = "maroon">backup _set_id</font><font color = "silver">)</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;<font
    color = "blue">FROM </font>&nbsp;&nbs p;&nbsp;<font color =
    "maroon">ms db</font><font color = "silver">.</font><font color =
    "silver">.</font><font color = "maroon">backup set</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp ;&nbsp;<font
    color = "blue">WHER E</font>&nbsp;&nbs p;<font color =
    "maroon">databa se_name</font>&nbsp;<fon t color = "silver">=</
    font>&nbsp;<fon t color = "red">N'DB_Name __MSCRM'</font><font color =
    "silver">)</font>
    >
    <br><br>
    <font color = "blue">IF</font>&nbsp;<fon t color =
    "#8000FF">@back upSetId</font>&nbsp;<fon t color = "blue">IS</
    font>&nbsp;<fon t color = "blue">NULL </font>
    <br>&nbsp;&nbsp ;<font color = "blue">BEGI N</font>
    <br>&nbsp;&nbsp ;&nbsp;&nbsp;<f ont color = "blue">RAISERRO R</
    font>&nbsp;<fon t color = "silver">(</font><font color =
    "red">N'Verify& nbsp;failed.&nb sp;Backup&nbsp; information&nbs p;for&nbsp;data base&nbsp;''DB_ Name__MSCRM''&n bsp;not&nbsp;fo und.'</
    font><font color = "silver">,</font><font color = "black">16</
    font><font color = "silver">,</font><font color = "black">1</
    font><font color = "silver">)</font>
    <br>&nbsp;&nbsp ;<font color = "blue">END</font>
    >
    <br><br>
    <font color = "blue">REST ORE</font>&nbsp;<fon t color =
    "maroon">verify only</font>&nbsp;<fon t color = "blue">FROM </
    font>&nbsp;<fon t color = "maroon">di sk</font>&nbsp;<fon t color =
    "silver">=</font>&nbsp;<fon t color = "red">N'\\serve r\Backups
    \DBServerName\\ DB_Name__MSCRM\ DB_Name__MSCRM_ backup_20061026 1158.bak'</
    font>&nbsp;<fon t color = "blue">WITH </font>&nbsp;<fon t color =
    "blue">FILE </font>&nbsp;<fon t color = "silver">=</font>&nbsp;<fon t
    color = "#8000FF">@back upSetId</font>&nbsp;<fon t color = "silver">,</
    font>&nbsp;<fon t color = "maroon">nounlo ad</font>&nbsp;<fon t color =
    "silver">,</font>&nbsp;<fon t color = "maroon">norewi nd</font>
    </font>
    >
    This job was set up long before i started here and the problem is that
    the backup file itself has grown to be over 230 GB. It does not
    appear that the backup job is pruning the file. is there a way to
    view the contents of this file and then prune it so we keep no more
    then two weeks worth of data.
    >
    Thanks
    >

    Comment

    Working...