.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Getting an error while restoring logs in LOG SHIPPING environment

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :Sql Server


I'm working with SQL SERVER 2005 SP2.

I have a working and a steady environment of LOG SHIPPING for quite a while.

Yesterday, the Restore job of the LOG SHIPPING in the DR server failed with the locking error (the log starts from the last line and goes up):

05:02:38.34  *** Error: The log backup file 'C:\database\LogShipping\20100927021501.trn' was verified but could not be applied to secondary database '
05:02:37.42  *** Error

View Complete Post

More Related Resource Links

Databasemail error in clustered environment

Hi. I'm having trouble getting DBmail to work on a SQL 2005 SP3 STD. (64-bit) installation. I've setup database mail with the wizard. I've tested sending an e-mail using telnet -> OK!   But when I try to send a test e-mail from the sql server management studio I the message is queued, and the Windows Event Viewer logs an error like this: *************************************** Event Type: Error Event Source: DatabaseMail Event Category: None Event ID: 0 Date:  27-08-2010 Time:  10:01:23 User:  N/A Computer: <My_servername> Description: 1) Exception Information =================== Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException Message: There was an error on the connection. Reason: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified), connection parameters: Server Name: <My_servername>\<My_named_instance>, Database Name: msdb Data: System.Collections.ListDictionaryInternal TargetSite: Void OpenConnection(Microsoft.SqlServer.Management.Common.SqlConnectionInfo) HelpLink: NULL

Error restoring SQL 2000 db to SQL 2008 - The WITH MOVE clause can be used to relocate one or more f

Hi, While trying to restore a SQL 2000 db into SQL 2008, I get this error: ------------------------------ Restore failed for Server 'S2B22347'.  (Microsoft.SqlServer.SmoExtended) ADDITIONAL INFORMATION: System.Data.SqlClient.SqlError: File 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Build51_Testing_db.mdf' is claimed by 'CCHRI_UAT_Tran'(3) and 'CCHRI_UAT_Data'(1). The WITH MOVE clause can be used to relocate one or more files. (Microsoft.SqlServer.Smo) ------------------------------ The script looks something like this: RESTORE   DATABASE [Build51_Testing_db] FROM DISK = N'C:\Shival\Build51_Testing_db_bkp' WITH FILE = 1, MOVE N'CCHRI_UAT_Data' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Build51_Testing_db.mdf', MOVE N'CCHRI_UAT_Tran' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Build51_Testing_db.mdf', MOVE N'CCHRI_UAT_Index' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Build51_Testing_db.mdf', MOVE N'CCHRI_UAT_Log' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Build51_Testing_db.LDF', MOVE N'CCHRI_UAT_Log1' TO N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Build51_Testing_db.LDF', NOUNLOAD, REPLACE, STATS = 10 GO Please help me resolve this. Shival

Effect of error logs

Hi, I just came across a situtation where one of my application is trying to connect SQL box and is failing because of permission. It is writing audit failure to the Error log file. Can anyone please explain what would be the effect of this continous writing to error log. Does it affect performance of SQL Server in any ways or if there is a way i can check.Regards, Deven ----------------------------------------- Please vote if you find any of my post helpful.

Restoring 2008 Database with Filestream - Process cannot access file error

I'm trying to restore a copy of a database that has a filestream and am getting the error below. I've tried with move option to specify a new path and left it with default path, neither worked. Did a trace with procmon, didn't see anything. FileStream1 is a new folder that the restore process creates. I've deleted the folder, tried it with a new name, re-took the backup from the source machine, restarted SQL, rebooted the machine, drive permissions are open. I've run out of ideas on how to debug further. Looking up the error online wasn't much help either. Msg 3634, Level 16, State 1, Line 1 The operating system returned the error '32(The process cannot access the file because it is being used by another process.)' while attempting 'OpenFile' on 'X:\Data\FileStream1\4ecb2e48-0eee-4c99-a3f0-f1e6c7f00b24\f2efe374-9481-4c1b-a7f2-dcdcee350807\0000001b-0000aaa6-00f6'. Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally. ' SQL Server 2008 SP 1, MS Server 2008 R2 Server

Invalid object error on temp table on a particular environment

Hi, I am using a temp table in my sp. I have written the following tsql before and after using the temp table. IF OBJECT_ID('tempdb..##TEMP') IS NOT NULL DROP TABLE tempdb..##TEMP; Data will be inserted to the temp table consecutively using a cursor. I use SELECT * INTO tempdb..##TEMP FROM EXEC('query') to fill this temp table for the first time and INSERT INTO tempdb..##TEMP(<fields>) EXEC('query') for the remaining times. The SP is working fine in my laptop, but I am getting an Invalid Object error on this temp table name in the production server. Could anyone tell me the possible causes please? Thanks Sree

error while restoring database at subscriber

Hi ALL,             I have merge replication configured between 2008 publihser and 2000 subscriber. I was trying to restore database at subscriber and reinitialize it...While i am trying to restore database at subscriber its failing with error System.Data.SqlClient.SqlError: Invalid column name 'retention_period_unit'. (Microsoft.SqlServer.Smo)   any suggestions TIA

AjaxToolkit's CascadingDropDown control is throwing Method Error 404 in Hybrid system environment (

Hi Experts, We have an Asp.net web application, which is deployed in shared hosting environment. On shared hosting environment initial request to this web application is handled by Linux server and then based on the requested page the Linux server is redirecting request to web server on windows OS. Now, in our web application, we have used ajaxToolkit's CascadingDropDown control to populate three levels of categories. In the hybrid system described above, the CascadingDropDown control is throwing Method Error 404. I would appreciate if some body can guide on how to resolve this issue. The sample of code snap shot is mentioned below. ********************************************************************* Aspx file. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ <asp:DropDownList ID="ddlMajorLevelCategory" runat="server" Width="250px" ToolTip="Select Major Level Category" TabIndex="1"                            SkinID="h6BlueArial"> </asp:DropDownList>   <ajaxToolkit:CascadingDropDown ID="ccMajorCategory" runat="server" TargetControlID="ddlMajorLevelCategory" Category="M" PromptText=&qu

after restoring content database getting error (HTTP/1.1 200 OK Server: Microsoft-IIS/7.5 Date: Tue,

Hi All, Problem i have taken backup of Old site content database procedure see below 1) first i changed the database to read only mode (Opened SQL Server2005-->selected DB--> properties--> Option-->Database Read-Only=True) 2) taken backup of database from the task--Backup(new.bak) 3) Copied the taken backup to new server and restored (Opened SQL Server2005 --> Right Click on Database Folder--> Restore Dataase) In To database: ihave given DB name From Device: i have selected database from the location where i have saved. click ok.  It has restored successfully 4) I have created a new webapplication and removed its content database from central admin. 5) with the help of stsadm command i restored the above db to this webapplication. then iam getting below error: HTTP/1.1 404 Connection: close Date: Tue, 14 Sep 2010 06:20:08 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET MicrosoftSharePointTeamServices: i have refered the below url for restoring http://metahat.blogspot.com/2008/11/backup-restoring-sharepoint-2007-site.html Please help. Thanks in advance.

SQL Server 2008 R2 management studio throws an error when opening SQL Server Logs node

Hi all, I've installed SQL Server 2008 SP1 CU9 developer edition and SQL Server 2008 R2 Express side by side on my machine. When I try to open/expand SQL server logs node under Management on developer edition instance, I get the following error message: ********************************************************************************** TITLE: Microsoft SQL Server Management Studio ------------------------------ Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ A severe error occurred on the current command.  The results, if any, should be discarded. (Microsoft SQL Server, Error: 0) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.2789&EvtSrc=MSSQLServer&EvtID=0&LinkId=20476 ********************************************************************************** The SQL Server Management Studio version is 10.50.1600.1 SQL Server 2008 SP1 CU9 version: 10.0.2789.0 SQL Server 2008 R2 express edition version: 10.50.1600.1 RTM   I don't get that error when expanding SQL Server Lo

Excel Services no refresh data & no error logs

Hi! I'm trying to publish an Excel workbook which loads data from SQL Server. The result is: no data loaded in the workbook and no error logged on Sharepoint logs. Notice that if I try to refresh the workbook in Office Excel all works fine! I try to set up Windows Authentication, None (to use unattended account) and with .odc file but with no result! The procedure I follow is: 1) create a new Excel file and create new data connection to the database (SQL Server 2008) 2) upload the file in the trusted file location 3) open the file in a web part and click on the "refresh all" button I used the same unattended account which I setup for this purpose with BCS and it works fine! I also try to set with PowerShell the Application ID created ("ES"): "set-spexcelserviceapplication -identity 6d871d92-19dd-4421-b33b-0012f9a5ea18 -unattendedaccountapplicationid ES" with no result. I noticed that the identity of the Excel Service application shown in the Central Administration isn't in the IIS Application Pool list: could it be the problem? I also tried to delete / re-create the application but the two IDs remains disequal! Have someone of you already worked with Excel Services and could give me any help? Thanx in advance, Elena

Log Shipping Error

hello there, I set up log shipping on a database server few months ago and it all worked fine, now I want to add another secondary server but I get the error below: *** Error: Could not retrieve copy settings for secondary ID '5c28a1a2-63f5-41c7-9c06-d179fd6ed753'.(Microsoft.SqlServer.Management.LogShipping) ***<nl/>2010-09-14 18:29:41.08 *** Error: The specified agent_id 5C28A1A2-63F5-41C7-9C06-D179FD6ED753 or agent_type 1 do not form a valid pair for log shipping monitoring processing.(.Net SqlClient Data Provider) ***<nl/>2010-09-14 18:29:41.09 *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***<nl/>2010-09-14 18:29:41.09 *** Error: The specified agent_id 5C28A1A2-63F5-41C7-9C06-D179FD6ED753 or agent_type 1 do not form a valid pair for log shipping monitoring processing.(.Net SqlClient Data Provider) ***,00:00:01,0,0,,,,0 I have read that the problem might be because I have to configure all the secondaries in one go , is this true? Regards Ana

Microsoft .NET Framework NGEN v4.0.30319_X86 not started error in server logs.

Not sure what the correct etiquit is for this. The thread I asked my question in last Friday was previously closed by a moderator, and I suspect that is why it's not getting answered.  Since I posted, there have been enough other people with the same issue posting to push it into the popular thread list. So I'm starting a new thread.  (Not sure what would be a better procedure.) Original thread is here: http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/thread/4cb39c00-b038-45b2-bf38-2016a906570e Here was my question: This service was installed in a recent auto update on my SBS 2003 server and it was installed with automatic startup.  But it just starts up and shuts right back down.  The same occurs on my XP dev machines. Because of that my daily server report is showing: Auto-started Services Not Running Service Name Microsoft .NET Framework NGEN v4.0.30319_X86 Total auto-started services not running: 1 In normal conditions, these services should be running. For details, it is recommended that you review errors in the Event log related to the service.   It's a annoyance to have that in the daily server reports.  (I want to see all green items) Since starting up and immediately shutting down, appears to be the normal behavior for this service. (That's also what it does on XP. And the .net 4 full installation verifies as being

Database Mail Error Logs


I am New To Work With C#.I need To Retrieve The All Error Log In SQL Server.I Had Done All The Logs Except Database Mail Error Log. I need an An Help for How To Retrieving The Database Mail Error Log through C# Coding.



Catastrophic failure Error - Correlation ID not found in ULS logs


Hi all

I'm having a problem in sharepoint when trying to create a new site from a custom template - I am getting the below error:

Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))


Troubleshoot issues with Microsoft SharePoint Foundation.

Correlation ID: [long hex code]


However when I look in the ULS logs there is no mention of this correlation ID. I have turned the logs up to Verbose on everything, then reproduced the error, and still I can't find the error. Is it possible that this error is coming from another subsystem like ASP or IIS? I have looked in the IIS logs and can find the HTTP requests but nothing to do with why the error occurs.

Any help would be appreciated - I feel like if I could find the correlation ID I could at least start to work out what the error is!

Many thanks


Error Restoring sql 2000 backup on SQL 2008 Error: 928


I'm restoring several sql 2000 user databases on a sql 2008 r2 box, but sometimes I receive the following error

Error: 928, Severity: 20, State: 1

During upgrade, database raised exception 156, severity 25, state 1, address 0000000001C05A9F. Use the exception number to determine the cause.

So the error occured after the restore and while upgrading the database schema from version: 539 to 661.

However I notice that if I try to restore it again with the same statement, sometimes it goes sometimes it doesn't.

I'm not finding any 823,824 or 825 errors on SQL log.

The database compatibility level is 80.

While running Upgrade Adivsor on the database I saw 27 objects that use the older outer join sintax *=. However being that just a warning I don't think that's the cause, moreover because if I retry sometimes the restore completes succesfully.

Does anybody knows what is this?

Is this the I/O subsystem failing?

Why is this intermitent?

How do I fix it?


Thanks in advance.


Unknown error - Site usage reports not displaying - 2007 environment


Please can you help out in this issue as this is something critical.  Thanks much in advance.


when user clicks site usage reports (site actions > site settings) displays error as unknown error, and user is admin for the site.


This is on particular site. This problem is only for one user and rest of the users able to get the reports when hits on site usage reports.


I have checked with user . he is getting same problem on other browsers as well.


as pat of investigation we have migrated this site to other environment and asked user to che

Error while restoring database,

Im trying to restore a database, when i try to restore by selecting the file groups option it gives me an error Microsoft SQL DMO The backup set holds a backup of a database other than the existing database. RESTORE DATABASE terminated abnormally.
I tried deleting all the tables and the stored procedures that are there, but it still gives the same error.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend