Hi,
I migrated two 110 Gigabyte databases from SQL Server 2000 to SQL Server 2005 some weeks ago. The server with the SQL2000 databases still exists. It is a data warehouse database, thus data is updated once a day by ETL processes. The data is exact the same on the SQL Server 2000 and on the SQL Server 2005 database.
Database backup needs about 2 hours on the SQL2000 server using a maintenance plan to do a full backup daily. I tried to do a full backup on the SQL Server 2005 Server. I had to stop the process after some hours because no progress was visible. Activity monitor just shows one process in the database with 3 elements doing BACKUP DATABASE on 1 of the databases.
1st one: status is stopped, wait type is Async_io_completion, wait time is very high and rising constantly (over 8.000.000 after 2,5 hours)
2nd one: status is stopped, wait type is backupbuffer, wait time is changing in values in the range of 20 to 90
3rd one: status is executeable, not wait type, no wait time
No users or processes were accessing the database at this time.
The SQL Server 2000 has SP4 installed and SQL Server 2005 has SP2.
The SQL 2005 server is based on a Itanium Dual Core with 2 processors and SATA Raid, and usually all database operations are about 3 or 4 times faster than on the SQL Server 2000 Server. The SQL Server 2000 server is a Xeon with two processors and a slower RAID.
Why is the backup so slow on the SQL Server 2005 server? How could I enfasten this.
What do the wait types mean, how could I avoid them.
SQL Server 2008 r2 - 6 GB memory...I attempted a backup on a 500GB database but it was taking way too long. I checked the resources on the box and saw the CPU at 100%. I checked the SQL Server activity log and saw a hung query (user was not even logged on) that had multiple threads so I killed it and now the CPU utilization is back to normal.
Trouble is, now all of the threads in the activity monitor for the backup show 'suspended' and the backup appears to be not doing anything.
I am having a serious problem which I need some help with regarding our SQL Server backup.
Basically it has started to take ages (as in 48hrs +), when it should only take about 4 hrs. The database is only 380GB and up until monday our backups have not been completing. When I check the activity monitor I have seen that the 'BACKUP DATABASE' process is set to suspended with a huge wait time and the wait type is ASYNC_IO_COMPLETION.
I am not sure how to solve this, but I am going to have to!
So if anyone has any ideas please help me! If you need any othe info please let me know.
I'm trying to figure out why my transaction log backup is taking up to an hour to complete. I started off with a full recovery model with a Full database back up every Sunday, differential backups every Tuesday/Thursday and log backups every 5 minutes. I would have thought that the log file backups would execute much quicker because I'm backing them up more often.
Here is my backup statement, I'm hoping I've got a wrong option that you can point out to me:
BACKUP LOG [xxxx] TO [LogFilexxxxBackups] WITH NOINIT , NOUNLOAD , NAME = N'xxxx log backup', SKIP , STATS = 10, NOFORMAT
How can deploy Reporting Service 2005 runtime with VisualStudio 2005? The reason here goes...
I have completed my project in VS2005. Now I am trying to make package. But here, i do not know how to deploy Reporting Service (My Report files) to Customer's Server with Setup or any other runtime solution. thanks
Bob writes "Does SQL Server 2005 Express have a runtime version? If it does, how do I get it? And if I can get it, Will this waive the 180 day trial period I have? Thanks."
I upgraded my primary production server this morning to SQL 2005. Everything went fairly smoothly, but a couple of hours after my installation was complete, I found the following error in my event log:
Source: .NET Runtime Optimization Service EventID: 1101 .NET Runtime Optimization Service (clr_optimization_v2.0.50727_32) - Failed to compile: Microsoft.ReportingServices.QueryDesigners, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91 . Error code = 0x80070002
I am a little stumped since we did not install Reporting Services. We only installed Database Services, Integration Services and Workstation Components. I'm open to any suggestions on this. This does not seem to be negatively affecting our server, but I do want to resolve it as soon as possible.
Does SQL Server 2005 Express have a runtime version? if so, How do I get It. I already have downloaded the Free Express version. If there is a runtime version, will it waive the 180 day trial period, and give me full permenant use?
I am trying to use the new Common Language Runtime (CLR) hosting feature to write stored procedures in C# i have addedMicrosfot.sqlserevr.server name spaceand ia m trying to use sqlContext Object as below using (SqlConnection connection = new SqlConnection(dbConn)) { connection.Open(); SqlCommand sqlcmd = new SqlCommand("select @@ version", connection); SqlContext.Pipe.ExecuteAndSend(sqlcmd); } i get the below error when i execute (SqlContext.Pipe.ExecuteAndSend(sqlcmd);) System.InvalidOperationException was unhandled by user code Message="The requested operation requires a SqlClr context, which is only available when running in the Sql Server process." Source="System.Data" i checked if (SqlContext.IsAvailable) and it returns false as well. Please le me know how to make it work. Thanks THNQDigital
I posted this on the .NET Framework inside Sql Server forum as well. Sorry if the cross-post offends anybody.
I upgraded my primary production server this morning to SQL 2005. Everything went fairly smoothly, but a couple of hours after my installation was complete, I found the following error in my event log:
Source: .NET Runtime Optimization Service EventID: 1101 .NET Runtime Optimization Service (clr_optimization_v2.0.50727_32) - Failed to compile: Microsoft.ReportingServices.QueryDesigners, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91 . Error code = 0x80070002
I am a little stumped since we did not install Reporting Services. We only installed Database Services, Integration Services and Workstation Components. I'm open to any suggestions on this. This does not seem to be negatively affecting our server, but I do want to resolve it as soon as possible.
I moved all my databases to sql server 2005 & when appliction is trying to connect to 2005 databases i get the following error In the connection string i am using Password=test;Persist Security Info=True;User ID=test;Initial Catalog=test;Data Source=externalip/instancename
this is the only change on the web server
Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration> Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
I have a very small project written in VB.Net 2005 using the SQL Server 2005 SSiS DTSx package.
I migrated a SLQ 2000 DTS package using the SQL 2005 Legacy tools and saved the package as a local .DTSx package on our file server.
I need to run the package from a clients PC.
I added the reference Microsoft.SqlServer.ManagedDTS so I could then use the Microsoft.SqlServer.Dts.Runtime so I can execute the commands:
Dim oApp As New Application Dim oPkg As New Package oPkg = oApp.LoadPackage(g_DTSx_Directory & "AOC copy Generic1 CSV to AOC_verify_file_1.dtsx", Nothing) Dim oResults As DTSExecResult oResults = oPkg.Execute
Ok. That works fine and is basically the entire app. It executes without a hitch in debug and as a compiled exe on my PC, but I have all the tools. So now I try and create a setup project for this and I use the setup wizard.
During the creation of the setup project I get a message that states: The following files may have dependencies that cannot be determined automatically. Please confirm that all dependencies have been added to the project. C:windowssystem32msxml6.dll
OK. The dll is part of the reference I mentioned above and I have no idea what other dependencies it may have.
How do I find this out?
Has anyone else created a project like this and experenced the same?
I am on a clean build running WinXP Pro with SP2 - VS2005 with SP1 and the SQL Server 2005 tools.
We've deployed an assembly to a new production sql server 2005 instance, and have been having periodic restarts of sql server. The sql server service appears to be stopping and restarting on it's own since the assembly was deployed.
We've narrowed it down to a decryption method. We haven't been able to produce the issue on a consistant basis. Even if we put a ton of load on the stored procedure calls.
The error is below we receive (I cut out some, so it would fit in the thread), we also have mdmp files, that I've attempted to debug with Visual Studio 2005 and Windbg with no success. I have all the symbols (I'm pretty sure), but I don't have much experience with WinDbg, so it's been slow going.
Here's a little about the environment.
Windows Server 2003 Enterprise x64 SP2 Microsoft SQL Server version 9.00.3042.00 SP2 16 MB physical memory Quad 3.2 GHz Xeon 3 sets of raid drives. c: OS e: sql data e: sql logs All Sql and windows patches are up to date.
Only thing I can figure is this is something to do with the .NET libraries. When the assembly was compiled it was set to compile for any CPU. We even tried compiling on the 64 bit OS with no luck still.
If anyone has had a similar issue, it would be most helpful, thanks, Byron
I am having a Data flow task in For each loop which will gets 100 sourcetable names and 100 target table names...
am having a simpleData flow task which trasferes from OLEDBSource to OLEDBDestination. I am repeating the Dataflow task which transfers from sourcetablename extracted from for loop to a destination table var.
The problem am gettting is for the first table it is able to transfer correcly because I did mapping for those tables at design time...but for the next coming sourcetable-desttable (which r having different no of cols,datatypes) its giving Validation failed...and...needs to refresh metadata....
is there any way to refresh the metadata of Data flow task (I set the property of OLEDBSource validate external meta to false then also same error is coming)
I have a simple update statement that is running forever in SQL 2005 but works fine in SQL 2000. We have a new server we put SQL 2005, restored db. The table in question WEEKLYSALESHISTORY I even re-indexed all the indexes and rebuilt the stats as well. But still no luck, still running extremely long. 1 hour 20 minutes.
I'll try to give you some background on these table. Weeklysalehistory has approx 30 fields. I have 11 indesxes set up weekending date being one of them. And replication control has index on lasttrandatetime as well. So I think my indexes are fine.
/* Update WeekEnding Date for current weeks WeeklySales Records */ Update WeeklySalesHistory set weekendingdate = (SELECT LastTransDateTime from ReplicationControl where TableName = 'WEEKHST') where weekendingdate is null
Weekly sales has approx 100,000,000 rows Replication control has 631,000 (Ithink I can delete some from here to bring it down to 100 or 200 records) Although I don't think this is issue since on 2000 has same thing and works fine.
I was trying to do this within SSIS and thought that was issue. I am new so SSIS but it runs long even if I just run it as a job with this simple Update statement so I think its something with tables, etc that is wrong.
One thing on noticed if I look at the statistics in SQL Server Management studio there is a ton of stats. some being statistics on indexes which makes sense then I have a ton of hind_113_9_6 and simiiar one like this. I must have 90 or so named like this. Not sure how to check on SQL 2000 all the stats to see if they moved over from there or what. I checked a few other tables and don't have all these extra stats. Could this be causing the issue do I need to delete all these extras? Any help would be greatly appreciated.
I have problem with JDBC 2005 (1.1) running against SQL 2005 Express edition (SP2). Sometimes, the statement takes long time (more than 10 seconds). Sometimes, the same statement takes just a few seconds. It is very unpredictable. The query that we have problem is most of the time is join sql statement.
I was just wondering if anybody came across this behaviour where closing a Fast Forward Read only cursor takes abnormally long time to close. I am running SQL Server 2005 standard edition.
Help! I have posted this before and I had hoped that the VS2005 SP1 would help my problem. It didn't. My code is shown below. I have dropped a sqlconnection, sqldataadapter and a strongly-typed dataset from the toolbox onto the component designer for my page and written my code. It compiles without any errors but at runtine I receive the system error "Object reference not set to an instance of an object." The error occurs at the first line where the sqldataadapter is mentioned. I have shufflled the code and the error still occurs at first mention of the dataadapter. I have set parameters to a simple string such as "myemail." It hasn't helped. I have used the "Dim" statement as "Dim DaAuthorLogin as System.Data.SqlClient.SqlDataadapter and Dim DaAuthorLogin as New ......) at the start of the private sub generated by the event requiring the data. Nothing helps. Here is my simple code to select data from a sqlserver 2000 database. Why do I continue to get this error? Partial Class AuthorLogin Inherits System.Web.UI.Page Protected WithEvents AuthorInformation As System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand Me.DaAuthorLogin = New System.Data.SqlClient.SqlDataAdapter Me.MDData = New System.Data.SqlClient.SqlConnection Me.DsAuthorLogin = New MedicalDecisions.DsAuthorLogin CType(Me.DsAuthorLogin, System.ComponentModel.ISupportInitialize).BeginInit() ' 'SqlSelectCommand1 ' Me.SqlSelectCommand1.CommandText = "SELECT AuthorAlias, AuthorEmail, AuthorPassword, LastName, PreferredName" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FRO" & _ "M T_Author" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (AuthorEmail = @AuthorEmail) AND (AuthorPassword =" & _ " @AuthorPassword)" Me.SqlSelectCommand1.Connection = Me.MDData Me.SqlSelectCommand1.Parameters.AddRange(New System.Data.SqlClient.SqlParameter() {New System.Data.SqlClient.SqlParameter("@AuthorEmail", System.Data.SqlDbType.NVarChar, 50, "AuthorEmail"), New System.Data.SqlClient.SqlParameter("@AuthorPassword", System.Data.SqlDbType.NVarChar, 50, "AuthorPassword")}) ' 'DaAuthorLogin ' Me.DaAuthorLogin.SelectCommand = Me.SqlSelectCommand1 Me.DaAuthorLogin.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "T_Author", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("AuthorAlias", "AuthorAlias"), New System.Data.Common.DataColumnMapping("AuthorEmail", "AuthorEmail"), New System.Data.Common.DataColumnMapping("AuthorPassword", "AuthorPassword"), New System.Data.Common.DataColumnMapping("LastName", "LastName"), New System.Data.Common.DataColumnMapping("PreferredName", "PreferredName")})}) ' 'MDData ' Me.MDData.ConnectionString = "Data Source=CIS1022DAVID;Initial Catalog=CGData;Integrated Security=True;Pooling" & _ "=False" Me.MDData.FireInfoMessageEventOnUserErrors = False ' 'DsAuthorLogin ' Me.DsAuthorLogin.DataSetName = "DsAuthorLogin" Me.DsAuthorLogin.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema CType(Me.DsAuthorLogin, System.ComponentModel.ISupportInitialize).EndInit() End Sub Friend WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand Friend WithEvents MDData As System.Data.SqlClient.SqlConnection Friend WithEvents DaAuthorLogin As System.Data.SqlClient.SqlDataAdapter Friend WithEvents DsAuthorLogin As MedicalDecisions.DsAuthorLogin 'NOTE: The following placeholder declaration is required by the Web Form Designer. 'Do not delete or move it. Private designerPlaceholderDeclaration As System.Object Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) 'no code here End Sub Private Sub AuthorLoginRegister_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AuthorLoginRegister.Click 'for new author registration Response.Redirect("AuthorInformation.aspx") End Sub Private Sub AuthorLoginBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AuthorLoginBack.Click 'to navigate back Response.Redirect("MainPaths.aspx") End Sub Protected Sub AuthorLoginPassword_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AuthorLoginPassword.TextChanged 'pass the parameters to the dataadapter and return dataset DaAuthorLogin.SelectCommand.Parameters("@AuthorEmail").Value = AuthorLoginEmail.Text DaAuthorLogin.SelectCommand.Parameters("@AuthorPassword").Value = AuthorLoginPassword.Text MDData.Open() DaAuthorLogin.Fill(DsAuthorLogin, "T_Author") MDData.Close() 'set session objects If DsAuthorLogin.T_Author.Rows.Count > 0 Then Session("AuthorAlias") = DsAuthorLogin.T_Author(0).AuthorAlias Session("LastName") = DsAuthorLogin.T_Author(0).LastName Session("PreferredName") = DsAuthorLogin.T_Author(0).PreferredName Response.Redirect("AuthorPaths.aspx") Else : AuthorLoginNotValid.Visible = True AuthorLoginEmail.Text = "" AuthorLoginPassword.Text = "" End If End Sub End Class
I would like to ask you if there is better to recreate database structure on 2005 from 2000 and move data or to just load 2000 backup.
Currently I loaded the backup, but I am wondering if there might be slightly better performance on 2005 when recreating structure on 2005 to loading 2000 backup?
Does loading 2000 backup create 2005 binary structure?
I'm getting this message on my third automated backup of the transaction logs of the day. Both databases are in full recovery mode, both successfully backed up at 01.00. The transaction logs backed up perfectly happily at 01:30 and 05:30, but failed at 09:30.
The only difference between 05:30 and 09:30's backups is that the log files were shrunk at 08:15 (the databases in question are the ones that sit under ILM2007, and keeping the log files small keeps the system running better).
Is it possible that shrinking the log files causes the database to think that there hasn't been a full database backup?
I have ctreated a maintenance plan to backup a database daily. The option is set to overwrite.
1) How is it possible to allow for say four days of backup files to remain but any older backups to be deleted. At present I only get one file which gets overwritten every day.
2) What does the Append database option do? I know that it increases the backup file size on every backup. Not sure what that does to the file internally. i.e. why doe the file size increase even if there has not been any activity on the database on that day?
Hi, I'm trying to setup a Maintenance Plan under SQL2005 to backup selected DB's to a UNC share for later backup to tape. This was easy and straightforward under SQL2k, but doesn't seem to be as simple under 2005 as I've been unable to get it to work.
I have the Maint. Plan created and working to backup to the local drive, but am unable to get it to work to a UNC.
Hello,I am learning SQL Server 2005. I need to know how to make a backup ofa database. I tried (according to my book):BACKUP DATABASE DemoSQLServer TO DISK = "G:DemoSQLServer.bak"But I got error:Incorrect syntax near 'G:DemoSQLServer.bak'.Please help.Thank you very much./RAM/
I created a job to backup my database. Sometimes I get the following error: The job failed. Unable to determine if the owner (DOMAINAdministrator) of job Backup.Subplan_1 has server access (reason: Could not obtain information about Windows NT group/user 'DOMAINAdministrator'<c/> error code 0x54b. [SQLSTATE 42000] (Error 15404))
I already deleted the job and made it again. Same problem. I don't get that error every day. For example: I got it 4 times last month.
Does anybody know what I can do to resolve the error?
I know I've been posting a lot about another problem but you all have been most helpful so I thought I'd throw this one at you too.
My nephew's company has a server with Small Business Server 2003 SP1 and they run Windows Backup for their daily backups. They also have SQL 2005 Workgroup on that machine. Prior to SQL 2005, they ran SQL 7 and had no problems with their daily backups. Once they upgraded (clean installed actually) SQL 2005 their backups fail. The event log errors with Event ID 6013 and says:
SQLlib error: OLEDB Error encountered calling IDBInitialize::Initialize. hr=0x80004005 SQLSTATE: 08001, Native Error: 17 Error state: 1, Severity: 16 Source: Microsoft OLE DB Provider for SQL Server Error Message: [DBNETLIB][ConnectionOpen[Connect[]].]SQL Server does not exist or access denied.
Obviously, SQL Server does exist, so I presume it has to do with an access denial. Microsoft has been no help and Googling other sites have gotten nowhere. DLL updates have been done and hot fixes installed. But the error persists.
I have sent a mssql backup file in .bak format to my host admin and asked them restore it. but they told me there are 3 files with 3 different dates in that backup what does it mean? should I ask them to restore all of them or just the last one? Thanks very much in addvance (context: MS SQL 2005 express)
We have a SQL 2005 server running the following backup job:<font face="Courier New" size="2"><br><font color="blue">/* Created by<a href="http://www.wangz.net/gsqlparser/sqlpp/sqlformat.htm">freeonline sql formatter</a*/</font><br><br><font color = "blue">EXECUTE</font> <font color ="maroon">master</font><font color = "silver">.</font><font color ="maroon">dbo</font><font color = "silver">.</font><font color ="#8000FF">xp_create_subdir</font><br> <font color = "red">N'\ServerBackupsDBServerName\DB_Name__METABASE'</font><br><br><font color = "blue">GO</font><br><br><font color = "blue">EXECUTE</font> <font color ="maroon">master</font><font color = "silver">.</font><font color ="maroon">dbo</font><font color = "silver">.</font><font color ="#8000FF">xp_create_subdir</font><br> <font color = "red">N'\serverBackupsDBServerName\DB_Name__MSCRM'</font><br><br><font color = "blue">GO</font><br><br><font color = "blue">BACKUP</font> <font color = "blue">DATABASE</font> <font color = "maroon">[db_name__metabase]</font> <font color = "blue">TO</font> <font color ="maroon">disk</font> <font color = "silver">=</font> <fontcolor = "red">N'\serverBackupsDBServerName\DB_Name__METABASE DB_Name__METABASE_backup_200610261158.bak'</font> <font color ="blue">WITH</font> <font color = "maroon">differential</font> <font color = "silver">,</font> <font color ="maroon">noformat</font> <font color = "silver">,</font> <font color = "maroon">noinit</font> <font color ="silver">,</font> <font color = "maroon">name</font> <fontcolor = "silver">=</font> <font color ="red">N'DB_Name__METABASE_backup_20061026115839'</font> <fontcolor = "silver">,</font> <font color = "maroon">skip</font> <font color = "silver">,</font> <font color ="maroon">rewind</font> <font color = "silver">,</font> <fontcolor = "maroon">nounload</font> <font color = "silver">,</font> <font color = "maroon">stats</font> <font color ="silver">=</font> <font color = "black">10</font><br><br><font color = "blue">GO</font><br><br><font color = "blue">DECLARE</font> <font color ="#8000FF">@backupSetId</font> <font color = "blue">AS</font> <font color = "black">INT</font><br><br><font color = "blue">SELECT</font> <font color ="#8000FF">@backupSetId</font> <font color = "silver">=</font> <font color = "maroon">position</font><br><font color = "blue">FROM</font> <font color ="maroon">msdb</font><font color = "silver">.</font><font color ="silver">.</font><font color = "maroon">backupset</font><br><font color = "blue">WHERE</font> <font color ="maroon">database_name</font> <font color = "silver">=</font> <font color = "red">N'DB_Name__METABASE'</font><br> <font color ="blue">AND</font> <font color = "maroon">backup_set_id</font> <font color = "silver">=</font> <font color ="silver">(</font><font color = "blue">SELECT</font> <font color ="fuchsia"><b>MAX</font></b><font color = "silver">(</font><font color= "maroon">backup_set_id</font><font color = "silver">)</font><br> <fontcolor = "blue">FROM</font> <font color ="maroon">msdb</font><font color = "silver">.</font><font color ="silver">.</font><font color = "maroon">backupset</font><br> <fontcolor = "blue">WHERE</font> <font color ="maroon">database_name</font> <font color = "silver">=</font> <font color = "red">N'DB_Name__METABASE'</font><font color= "silver">)</font><br><br><font color = "blue">IF</font> <font color ="#8000FF">@backupSetId</font> <font color = "blue">IS</font> <font color = "blue">NULL</font><br> <font color = "blue">BEGIN</font><br> <font color = "blue">RAISERROR</font> <font color = "silver">(</font><font color ="red">N'Verify failed. Backup information for database ' 'DB_Name__METABASE'' not 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> <font color = "blue">END</font><br><br><font color = "blue">RESTORE</font> <font color ="maroon">verifyonly</font> <font color = "blue">FROM</font> <font color = "maroon">disk</font> <font color ="silver">=</font> <font color = "red">N'\serverBackupsDBServerName\DB_Name__METABASEDB_Name__METABASE_backup_200610261158.bak'</font> <font color ="blue">WITH</font> <font color = "blue">FILE</font> <fontcolor = "silver">=</font> <font color = "#8000FF">@backupSetId</font> <font color = "silver">,</font> <font color ="maroon">nounload</font> <font color = "silver">,</font> <font color = "maroon">norewind</font><br><br><font color = "blue">GO</font><br><br><font color = "blue">BACKUP</font> <font color = "blue">DATABASE</font> <font color = "maroon">[db_name__mscrm]</font> <fontcolor = "blue">TO</font> <font color = "maroon">disk</font> <font color = "silver">=</font> <font color = "red">N'serverBackupsDBServerName\DB_Name__MSCRMDB_Name__MSCRM_backup_200610261158.bak'</font> <font color ="blue">WITH</font> <font color = "maroon">differential</font> <font color = "silver">,</font> <font color ="maroon">noformat</font> <font color = "silver">,</font> <font color = "maroon">noinit</font> <font color ="silver">,</font> <font color = "maroon">name</font> <fontcolor = "silver">=</font> <font color ="red">N'DB_Name__MSCRM_backup_20061026115839'</font> <font color= "silver">,</font> <font color = "maroon">skip</font> <fontcolor = "silver">,</font> <font color = "maroon">rewind</font> <font color = "silver">,</font> <font color ="maroon">nounload</font> <font color = "silver">,</font> <font color = "maroon">stats</font> <font color ="silver">=</font> <font color = "black">10</font><br><br><font color = "blue">GO</font><br><br><font color = "blue">DECLARE</font> <font color ="#8000FF">@backupSetId</font> <font color = "blue">AS</font> <font color = "black">INT</font><br><br><font color = "blue">SELECT</font> <font color ="#8000FF">@backupSetId</font> <font color = "silver">=</font> <font color = "maroon">position</font><br><font color = "blue">FROM</font> <font color ="maroon">msdb</font><font color = "silver">.</font><font color ="silver">.</font><font color = "maroon">backupset</font><br><font color = "blue">WHERE</font> <font color ="maroon">database_name</font> <font color = "silver">=</font> <font color = "red">N'DB_Name__MSCRM'</font><br> <font color ="blue">AND</font> <font color = "maroon">backup_set_id</font> <font color = "silver">=</font> <font color ="silver">(</font><font color = "blue">SELECT</font> <font color ="fuchsia"><b>MAX</font></b><font color = "silver">(</font><font color= "maroon">backup_set_id</font><font color = "silver">)</font><br> <fontcolor = "blue">FROM</font> <font color ="maroon">msdb</font><font color = "silver">.</font><font color ="silver">.</font><font color = "maroon">backupset</font><br> <fontcolor = "blue">WHERE</font> <font color ="maroon">database_name</font> <font color = "silver">=</font> <font color = "red">N'DB_Name__MSCRM'</font><font color ="silver">)</font><br><br><font color = "blue">IF</font> <font color ="#8000FF">@backupSetId</font> <font color = "blue">IS</font> <font color = "blue">NULL</font><br> <font color = "blue">BEGIN</font><br> <font color = "blue">RAISERROR</font> <font color = "silver">(</font><font color ="red">N'Verify failed. Backup information for database ' 'DB_Name__MSCRM'' not 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> <font color = "blue">END</font><br><br><font color = "blue">RESTORE</font> <font color ="maroon">verifyonly</font> <font color = "blue">FROM</font> <font color = "maroon">disk</font> <font color ="silver">=</font> <font color = "red">N'\serverBackupsDBServerName\DB_Name__MSCRMDB_Name__MSCRM_backu p_200610261158.bak'</font> <font color = "blue">WITH</font> <font color ="blue">FILE</font> <font color = "silver">=</font> <fontcolor = "#8000FF">@backupSetId</font> <font color = "silver">,</font> <font color = "maroon">nounload</font> <font color ="silver">,</font> <font color = "maroon">norewind</font></font>This job was set up long before i started here and the problem is thatthe backup file itself has grown to be over 230 GB. It does notappear that the backup job is pruning the file. is there a way toview the contents of this file and then prune it so we keep no morethen two weeks worth of data.Thanks