.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

Operating system error 53(error not found).

Posted By:      Posted Date: September 13, 2010    Points: 0   Category :Sql Server
Hi, I am sabhari. I am trying to take DB backup and restore in web server using Backup Class (Microsoft.Sqlserver.SMO) namespace. Its working fine in local machine, but it not working in web server. I am getting following error in live Cannot open backup device '\\n5200-2\iis7_www\c\o\web site name\www\Folder1\DBBackup\DB_PRA_19042010.bak'. Operating system error 53(error not found). BACKUP DATABASE is terminating abnormally. Please find the code for DB Backup //code for taking backup. public string BackupDatabase(String databaseName, String userName, String password, String serverName, String destinationPath) { Backup sqlBackup = new Backup(); try { sqlBackup.Action = BackupActionType.Database; sqlBackup.BackupSetDescription = "ArchiveDataBase:" + DateTime.Now.ToShortDateString(); sqlBackup.BackupSetName = "Archive"; sqlBackup.Database = databaseName; BackupDeviceItem deviceItem = new BackupDeviceItem(destinationPath, DeviceType.File); ServerConnection connection = new ServerConnection(serverName, userName, password); Server sqlServer = new Server(connection); Database db = sqlServer.Databases[databaseName]; sqlBackup.Initialize = true; sqlBackup.Checksum = true; sqlBackup.ContinueAfterError = true; sqlBackup.Devices.Add(deviceItem); sqlBackup.Incremental = false; sqlBackup.ExpirationDate = DateTime.Now.AddDays(3); sqlBackup.LogTrun

View Complete Post

More Related Resource Links

Unable to open physical file - Operating system error 5: 5(error not found) Microsoft SQL Server: Er

I am trying to attach a database to SQL 2005. This database has not previously been attached. I have only just installed SQL.   I get the following message: Unable to open physical file "C:\ArrowSQL\Arr@Data\Arrow_data.mdf" Operating system error 5: "5(error not found)" (Microsoft SQL Server: Error 5120)".   I have loaded SQL and the database fiel and directory with the same user acccount which is a local adminstrator ont hsi machine. I have checked that I have read/write access to the file.   The machine runs Windows Vista Business. SQL has SP 2 loaded.   What causes this?

Compiler Error Message : CS0006: Metadata file 'System.EnterpriseServices.dll' could not be found


I get this error when i Debug my web application....


I followed these steps.,

  • Ended the aspnet_wp.exe process in the Windows Task Manager
  • Then deleted the application`s folder in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\
  • Then started Visual Studio 2008 again

I also rebooted my system but no use....

Plz help !

The operating system returned error 21(The device is not ready.)

Dear DBAs, A database backup job has failed for the last couple of days with below error. I see that there is no P drive for PP1DATA. When I tried to bring drives online to find P drive and bring it up I couldn't bring them online. Is the absence of P drive related to this error? Thank you,   ." failed with the following error: "The operating system returned error 21(The device is not ready.) to SQL Server during a write at offset 0x0000005ec32000 in file 'P:\PP1DATA1\PP1DATA1.mdf'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.  BACKUP DATABASE is terminating abnormally."

Directory lookup for the file failed with the operating system error 5

Hi I have a Windows desktop application that uses a SQLServer Express database.  The database files are downloaded from my website, followed by the application download (written in VBE).  The first procedure is to attach the database to the SQLServer instance from within the application. I have two test machines one runs Windows XP x84, the other Windows 7 x64.  I never have issues on attaching the database files in my test envirnoment but twice now other people downloading have got the following error System.Data.Sqlclient.sqlexception (ox 80131904) Directory lookup for the file C:\Documtents and Settings\Administrator\Desktop\Tem1.mdf failed with the operating system error 5 (failed to retrieve text for this error. Reason 1815) changed database context to 'master'. I'm not sure what the problem is and therefore how to correct the issue.  I attach the database in code using the create statement e.g. cmd7.CommandText = "USE Master CREATE DATABASE Tem1 ON PRIMARY (FILENAME = '" & DBFullPath & "') LOG ON (FILENAME = '" & DbLogPath & "') FOR ATTACH" Any help or suggestions would be very much appreciated. Chris    

failed to create. Operating system error 5(failed to retrieve text for this error. Reason: 15105)

Hi, OS: Windows 2008 R Database: SQL Server 2008 We have SSIS package installed on the SQL Server 2008, one of the task in SSIS package backs up database to the "E:\M1G3Datastore" drive. This pacakage was working fine for the last 4 months, this morning the task that backs up the database fails, the error message is: BackupDiskFile::CreateMedia: Backup device 'E:\M1G3Datastore\M1Test.bak' failed to create. Operating system error 5(failed to retrieve text for this error. Reason: 15105). The following query work, this query backs up the database to C drive and it works: BACKUP   DATABASE [M1Test] TO DISK = N'C:\M1G3Datastore\M1Test.bak' WITH   NOFORMAT, INIT, NAME = N'M1Test-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO THE FOLLOWING QUERY DOES NOT WORK, PLEASE NOTE THE DRIVE IS CHANGED TO "E" IN THIS INSTANCE     BACKUP DATABASE [M1Test] TO DISK = N'E:\M1G3Datastore\M1Test.bak' WITH   NOFORMAT, INIT, NAME = N'M1Test-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO  Please help, and MANY thanks in advance   sword

FCB::Open: Operating system error 32(The process cannot access the file because it is being used by

Hello all,I am running into an interesting scenario on my desktop.  I'm running developer edition on Windows XP Professional (9.00.3042.00 SP2 Developer Edition).  OS is autopatched via corporate policy and I saw some patches go in last week.  This machine is also a hand-me-down so I don't have a clean install of the databases on the machine but I am local admin.So, starting last week after a forced remote reboot (also a policy) I noticed a few of the databases didn't start back up.  I chalked it up to the hard shutdown and went along my merry way.  Friday however I know I shut my machine down nicely and this morning when I booted up, I was in the same state I was last Wenesday.  7 of the 18 databases on my machine came up withFCB:pen: Operating system error 32(The process cannot access the file because it is being used by another process.) occurred while creating or opening file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Test.mdf'. Diagnose and correct the operating system error, and retry the operation.and it also logs  FCB:pen failed: Could not open file C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Test.mdf for file number 1. OS error: 32(The process cannot access the file because it is being used by another process.).I've caught references to the auto close feature being a possible culprit, no dice as the databases in question are set to Fal

Cannot open backup device 'F:\foldername'. Operating system error 5(Access is denied.).

SQL 2005 Enterprise Even if I logon as Administrator and try to backup any of my databases to local partitions, I get this error below. I have been operating fine up until this point and doing backups all the time.  As far as I know, and after checking, no permissions have changed and of course Administrator has ntfs permissions to my local C and other partitions on this server: TITLE: Microsoft SQL Server Management Studio------------------------------ Backup failed for Server 'servername'.  (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Backup+Server&LinkId=20476 ------------------------------ADDITIONAL INFORMATION: System.Data.SqlClient.SqlError: Cannot open backup device 'F:\foldername'. Operating system error 5(Access is denied.). (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&LinkId=20476 ------------------------------BUTTONS: OK------------------------------ In the Event log for Windows Server 2003 I see this:   Event Type: ErrorEvent Source: DCOMEvent Category: NoneEvent ID: 10016Date:  3/6/2006Time:  3:35:06 PMUser:  NT AUTHORITY\

Error message setting up System DSN: Setup routines not found. Please reinstall driver.



I'm running W2K3 SP1.  The MDAC Configuration Checker reports MDAC 2.8 SP2.  The only discrepancy is MSADCO.DLL, where the expected version is 2.82.1830.0 and my actual version is 2.82.2651.0 (svr03_sp1_gdr.060301-1546).

The error message I'm getting when I use the ODBC Administrator dialog to set up a new entry is: "The setup routines for the SQL Server ODBC driver could not be found.  Please reinstall the driver."

This is followed by a dialog titled: "Driver's ConfigDSN, ConfigDriver, or ConfigTranslator failed."  The body text of the dialog is "Component not found in the registry."

Does anyone have any idea how I can repair this?


Error: 5123 CREATE FILE encountered operating system error 5A(Access denied.)




 HI ,


 This is a problem I encountered when I had to detach a database file (type .mdf):


 1) I went to the MS SQL Management Server Studi and detached my database file successfully from a connection called Workhorse.


2) I needed to place the .mdf database file into a zip file in order to put it on a remote server. I did this using Shared Portal.  This was also successful


3) However when I tried reattaching the database file, I got this error:

CREATE FILE encountered operating system error 5A(Access denied.) while attempting to open or create the physical file "C\Program Files\MSSQL Server\MSSQL\Data\<databasename>.mdf'


Q) The database file and log file (ldf) exist in the correct directory so I don't know what happened. Can any one help?


 Thanks much




Event 18210 error - Operating system error 1130 (not enough server storage is available to process t


I tried for the last three days to do a restore over the network or copy the files from one server to another. I kept getting NOT Enough space but there is 500GB free for 49GB file.

OS: Windows Server 2008 64bits

SQL Server 2008 R2 Enterprise 64bits

Restoring using T-sql got the following error:

Msg 3203, Level 16, State 1, Line 1

Read on "\\servername\backup\xxxxx\xxxxx_backup.bak" failed: 1130(Not enough server storage is available to process this command.)

Msg 3013, Level 16, State 1, Line 1

RESTORE DATABASE is terminating abnormally.

Event log as the following:

BackupIoRequest::ReportIoError: read failure on backup device '\\servername\backup\xxxxx\xxxxx_backup.bak'. Operating system error 1130(Not enough server storage is available to process this command.).

I did some research and I found stuff for SQL 7 or windows XP or NT old s

I can't attach .mdf operating system error:5


Hi everyone,


I searched this error in form and internet but none of them solve my problem.

I have windows 7 ultimate edition and ms sql server 2005 management studio & sql server express 2005.

I have an mdf file when i try to attach it to sql server man. stu. it gives error shown below. when I try to attach that mdf file on diffrent computer (win xp pro OS, ms sql server 2005) there is no error it is easily attached to the system. I tried to install 64 bit ms sql server but it gives error about my processor type, situation is same when I run sql server as administrator. Please help me before I format ultimate to xp :)


Attach database failed for Server 'FALCON_ON_W7\AYSANDBSERVER'.  (Microsoft.SqlServer.Express.Smo)

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

Unable to open the physical file "C:\AysanKatalog-DB\AysanKatalog.mdf". Operating system error 5: "5(error not found)". (.Net SqlClient Data Provider

unable to open the physical file operating system error 32


I have installed Sql Server 2005 with an instance name.

I am able to login using SQL Management Studio.

When i try to connect using Visual Studio through database explorer (its a VSTA for infopath), I get the error unable to open the physical file operating system error 32.  I am struggling to slove this. 

Any help in this regard would be helpful.

Thanks and Regards,

Handling 404 page not found with Error page



      How do i handle 404 page not found?

urlrouting - page not found error


I have a dynamic data site setup and running locally fine from vs 2008.

When i deploy to a remote windows 2003 server (IIS6), all the pages also work ok apart from one page/table.  I can access it's list page,  but the edit and insert pages throw 404 errors.

I'm thinking it's a url routing/hosting issue as i've copied back the database from the remote server and it all works fine on my local machine.

Is there anything i can do to debug this behaviour?

Below is my register routes entry from the global.asax

Any suggestions greatly appreciated as, i've been stuck on this for days :(

public static void RegisterRoutes(RouteCollection routes)
    MetaModel model = new MetaModel();
    model.FieldTemplateFactory = new AdvancedFieldTemplateFactory();

    model.RegisterContext(typeof(Sponsorship.Data.Entities), new ContextConfiguration() { ScaffoldAllTables = false });
    model.DynamicDataFolderVirtualPath = "~/admin/DynamicData";

    routes.Add(new DynamicDataRoute("admin/{table}/{action}.aspx")
        Constraints = new RouteValueDictionary(new { action = "List|Details|Edit|Insert" }),

Business Data Error: System.OverFlowException


I have a Business Data Catalog file I've uploaded to connect to our back end Firebird DBMS through ODBC.

The SharePoint server is MOSS 2007 x64. The web front end server(s) all have an x64 Firebird Engine and ODBC driver with verified connectivity to Firebird.

When I use one of the methods, I can see connections being made to our Firebird server and the query being passed. I know the query returns results (it's a stored procedure with no parameters), but I get the following error "An error occurred while retrieving data from MROTest1. Administrators, see the server log for more information" in IE. If I look in the server logs, I see (12\Hive\Logs)

Exception handed to HandleRuntimeException.HandleException System.OverflowException: Arithmetic operation resulted in an overflow.     at System.Data.Odbc.OdbcDataReader.GetData(Int32 i, SQL_C sqlctype, Int32 cb, Int32& cbActualOut)

Got error on System.Ling.Queryable


I got the following error :

Error	1	The type arguments for method 'System.Linq.Queryable.OrderBy<TSource,TKey>(System.Linq.IQueryable<TSource>, System.Linq.Expressions.Expression<System.Func<TSource,TKey>>)' cannot be inferred from the usage. Try specifying the type arguments explicitly.	D:\EMMA\Mailer2\Mailer\Controllers\ReportsController.cs	50	46	Mailer


For the code :

var data = from mms in _DataContext.tb_Mailer_mailings
                       where mms.clientId == clientId
                       select new
                           Code = mms.Name + " (" + mms.DateCreated.ToString("yyyy-MM-dd hh:mm:ss") + ")"
                           Pk = mms.Id.ToString()

            /* Error here on orderBy*/
            SelectList list = new SelectList(data.OrderBy("Code"), "Pk", "Code");

 I have the same code for another type of select with also Code and Pk and I have no errors on that one.



System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a rec

Hello Guys,         I am getting following exception while web service (ASMX) is returning the response. <!-- [if gte mso 10]> <mce:style> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive.     <!-- [if gte mso 10]> <mce:style>                                                     InnterException (System.IO.Exception): "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."       I think either the Asp.net web server is closing the connection or the response is too long.   Following is my simple code.    1)   namespace JFA.IndiePay.BusinessAccess { public class VerTexProcessor { public DataSet ProcessVerTexForBatch(DataSet dsInputRequest) { DataSet dsResponse = new DataSet(); //Call vertex web service here. VertexService.Service texCalculator = new VertexService.Service(); texCalculator.Timeout = 500000;
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