SQL 2000 Fails To Delete Old Backup Files From The Network Share

Jul 21, 2006

Hello,

I am experiencing an issue with SQL Server 2000 Maintenance Plan.
DB Backup job fails to delete old backup files from the file server (I am backing up to the network share - actually, a DFS).
Backup part of the maintenance plan/job succeeds, but then cleanup part fails.

I made sure that service account under which SQL Server Agent is running, has sufficient privileges over the network share by logging in and successfully deleting files in question.

I was not able to locate any log entries either on the SQL Server machine or on the file server machine that would indicate the root of the problem. Even though I turned on auditing for Delete operations for the destination folder, its subfolders and files, I could not find anything in the Security event log.

I would appreciate any ideas on how to troubleshoot and correct this problem.

Thanks in advance,

View 3 Replies


ADVERTISEMENT

Backup To Network Share

Nov 27, 2005

I would like to backup my databases to a network share (NAS) instead of local disk using Maintenance Plans created by Enterprise Manager. I have successfully used a UNC path to target the destination network share but have not been to figure out how to submit a logon to the network share before the backup is executed.

The SQL Server instance is running in the context of the local system account.

Can I insert a step in the SQL SQL job that is created by the Maintenance Plans that changes the Windows account that the backup runs under? If yes what command syntax would I use in the inserted step or is there another way to accomplish that I'm attempting to do?

thanks
HP

View 1 Replies View Related

Backup On A Network Share

May 6, 2008

Hello,

I am trying to backup a database with a command like:

BACKUP DATABASE my DataBase TO DISK = '\bkSystemkDiskBackup1.bak'

but I get the error 'Cannot open backup device '\bkSystemkDiskBackup1.bak'. Device error or device off-line.
The bkDisk folder is shared, with Everyone full-control access (it's a test environment)

MS SQL 2000.

View 10 Replies View Related

Backup SQL 2K5 To A Network Share

Apr 5, 2007

I attempted to backup my database to a shared drive using the UNC path and it gave me access denied. Any thoughts?

View 2 Replies View Related

Backup Fails On Network Drive???

Nov 14, 2000

I have creted a backup device on network drive and getting the following error when I run the backup command as a job.SQL server and the agent are running on a domain account which has full permission on the network drive.Any help is greatly appreciated.
Thanks!


"Cannot open backup device 'mccdiffbkpond2build'.
Device error or device off-line. See the SQL Server error
log for more details. [SQLSTATE 42000] (Error 3201) Backup or
restore operation terminating abnormally. [SQLSTATE 42000]
(Error 3013). The step failed"

View 1 Replies View Related

SQL 2012 :: FOR FILES Command To Delete Old Backup Files On Remote Server?

Feb 24, 2015

I have the need to delete old backup files via TSQL job. Found this solution online:

PushD "
emoteservershareDIFF" &&(
forfiles -m *DIFF*.sqb -d -1 -c "cmd /c del /q @path"
) & PopD

It works remotely if I run it via command prompt. But when I add this to a TSQL job on my remote SQL instance, it runs without deleting anything. What I'm missing?

View 6 Replies View Related

Integration Services :: SSIS Fails To Load Files From Network When Executed Via Agent (2008 R2 SP2)

Aug 5, 2014

I have a simple SSIS package that reads a flat file and copies it into a SQL Server table.

When the flat fiel is on the C drive I have no problem runnign this package from SQL Server Agent, but as soon as I update the path to a network location the package only works when I run it manually, but fails when is executed via the SQL Server agent job.

The error says "cannot open the datafile", while the datafile location is valid.

Is this a kind of limitation of a SQL Server Agent that only local files are allowed to be processed?

View 4 Replies View Related

FTP Task - Delete Remote Files Always Fails

Mar 11, 2006



Hello,

I have two FTP Tasks configured in my SSIS package. One is for "Receive files" and the other is set for "Delete remote files." Both use variables for the source/destination paths. My remote path variable contains a wild card in the name field such as /usr/this/is/my/path/*.ext and it is working to FTP all the .ext files to my working directory. I then rename the files and want to remove the original files from the FTP server. I use the same variable as the remote path variable in the delete as I do in the receive.

Using the same FTP connection manager for both tasks I am always getting a failure on the delete. The FTP connection manger is setup to use the root user. Using a terminal I am able to open an FTP connection to the server and remove the files manually. There doesn't seem to be any detailed documentation on the FTP Task configured for Delete remote files so I'm hoping someone might have some insight to the problem.

I receive the same message for each of the files that was downloaded:
Error: 0xC001602A at MyPackage, Connection manager "FTP Connection Manager": An error occurred in the requested FTP operation. Detailed error description: 550 usr hisismypathdatafile1.ext: No such file or directory.
The attempt to delete file "usr hisismypathdatafile1.ext" failed. This may occur when the file does not exist, the file name was spelled incorrectly, or you do not have permissions to delete the file.

With the root user/working manually I'm not understanding the permission reason, the file does exist and is spelled correctly.

Dan

View 21 Replies View Related

Delete Old Backup Files

Jun 5, 2001

hi,

i want to delete the backup files older than 15 days. how can i do this?
Actually i backup the db and log using the TSQL, and the backup files are in d:ackup folder. I tried sqlmaint,xp_sqlmaint but its not running .

Any idea? thanks in adv.

kumar

View 2 Replies View Related

Delete Backup Files Older Then...

Mar 5, 2007

Ok in SQL 2000 this is within the maintaince plan, where as i have to create a seprate one for sql 2005 being i assume the 'clean up history' I choose the backup andrestore option choose 2 weeks and then run the job once created it runs sucssessfully but yet it dosnt delete a thing. I have backups going back almost 2 months now.
What on earth am i not doing?

Thanks in advanced

View 6 Replies View Related

T-SQL To Delete Files From Backup Device

Nov 3, 2006

I created a backup device and a job to backup a full dbs and transaction logs. When I first created the backup statement it was created with RETAIN DAYS = 10

Its been 15 days and the ones created after 10 days appear to be marked for deletiong but I am obviously missing a statement in my backup statement or in another job I need to schedule to come through and delete the old files from the backup device. Please help me figure out what this statement needs to be.

All the backups and T-log backups are written to one device which is one file.



Thanks

Scott

View 6 Replies View Related

Maintenance Plan Fails Trying To Delete Files Older Thean One Day. Running SQL Server 2005

Oct 1, 2007

I get the following message when I execute a mantenance plan to delete files older than 1 day.

Error # -1073548784

Executing the query "EXECUTE master.dbo.xp_delete_file 0,N'',N'',N'2007-09-30T07:56:09'
" failed with the following error: "Error executing extended stored procedure: Invalid Parameter". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Any help would be appreciated!!

View 3 Replies View Related

SQL Server 2000 Standard Edition - Distribution Agent Dieing When Network Connection Fails

May 21, 2007

Hi,


We have replication setup on a sql server 2000. We encountered issue that the distribution agent goes down (distrib.exe stop running) in the event of network connection broken. We would like to know:

is this the expected result that the distribution agent will go down in the event of communication failure between the distribution server and subscriber server?
if not, is there a way to programmatically control and restart the agent?
Is there any sp in SQL server which can monitor the replication communication error message?
is there any sp in SQL server which can be run to restart the agent?
For the best practice, what do you think we can do to achieve an €˜event-driven€™ kind of mechanism so when an communication breaks, the agent can be restarted by the triggered event (or at least a simple way to automatically restart)?



Thanks

Bill

View 3 Replies View Related

MSSQL 2000- Backup Activity On A Network Machine

Dec 20, 2006

Hi,
I am using an Enterprise Manager and i have created a Database Maintainance Plan, can anybody guide me as to how to create backup on a remote machine.

I also mapped that device(say M/c B) onto my server box(M/c A) but i am not able to see that particular location in my backup activity screen.

Can this be done in the first place ?

Regards,
Tahir

View 7 Replies View Related

Maintenance Plans (2000), Remove Files Older Than, And Network Shares

Sep 21, 2007

We have some to-disk backups scheduled on our 2000 Enterprise machine - nightly fulls, hourly logs - that go to a network share located on another machine. They were originally stored directly on the same machine as SQL Server, but we changed them to a remote destination within the past few weeks. This works okay, but despite having the maintenance plan set to remove files older than 2 days, old files don't seem to be removed. Understandably, this gets to be a problem when the backup disk becomes filled.

Is there any obvious reason why this option wouldn't work against a network share? I've checked the directory permissions, and the SQL Agent domain account should have no trouble deleting the files.

View 1 Replies View Related

OPENROWSET And Network Share

Dec 15, 2006

Hi,I am not able to execute following command from computers other than the SQLserver itself.select * from openrowset(bulk N'\ImageServerModelCam_05.dwg',SINGLE_BLOB) as docI get following error message:Msg 4861, Level 16, State 1, Line 1Cannot bulk load because the file "\ImageServerModelCam_05.dwg " couldnot be opened. Operating system error code 5(Access is denied.).If I use local file path and keep the file on the SQL server then it worksfine from any computer.select * from openrowset(bulk N'D:ModelCam_05.dwg', SINGLE_BLOB) as docThe network share has read access for everyone.What should I do to make it work? I am not allowed to move the files and theapplication which loads them to the SQL server.ThanksSachin G

View 2 Replies View Related

SQL Server 2000 Backup Fails

Nov 1, 2007

Hi all,

I am using SQL Server 2000 for one of our web application system called eRoom. eRoom uses SQL Server 2000 as a database. Now I have used SQL Server 2000 Database backup features to run the 4 database backup every night at 10pm. The backup runs fine. But recently I have found that for some reason when Our server machine which is hosting eRoom and SQL Server (Windows Server 2003 Standard Edition) is restarted, the database backup does not run anymore.

Now I have checked SQL Server settings and the settings allow SQL Server and SQL Server agent to restart both the services when the operating system starts. But still the database backup does not run when the server machine is restarted. It happened twice last week. Can anyone please help me?

Here are some information to help you understand the problem.

Backup Process Followed:

I went to SQL Server 2000 Enterprise Manager, then went to the appropriate server and then right click the Database>All Tasks> Backup Database> and then selected the backup file which is a (.BAK) file and then scheduled the database to be backed up at 10:00pm every night. I followed the same procedure for all 4 databases.

I am running SQL Server 2000 Standard Edition on Windows Server 2003 Standard Edition R2

Thanks

View 9 Replies View Related

Moved Asp.net App To Network Share, Can't Access SQL

Jan 19, 2007

I've recently moved an asp.net website from my PC to a network share because another tech it going to be working on it.  I finally got the correct permissions on the network share and the correct .NET Framework settings on my PC to be able to run the app.  Now I can't access the SQL server which is on a different server.  Getting the following error:
Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
How to I setup access to my SQL server for the app from any given PC on my LAN?
 

View 1 Replies View Related

Share May Sqlexpress 2005 On Network

Apr 1, 2008

how can Share may sqlexpress 2005 on network   that other can access my databasess on their pc and edit update and insert recored into my table
please tell me how can do this ?

View 2 Replies View Related

Problem Attaching DB From Network Share

Aug 31, 2007

Hello All,
I 'm trying to attach a database to my sql server 2005 using the following syntax:





Code Snippet

DBCC TRACEON(1807, -1)
GO
EXEC sp_attach_single_file_db 'MyNetworkDB', '\leaf7dbsMyNetworkDB.mdf'
GO

Also, the folder dbs and the mdf file MyNetworkDB.mdf has full permission for Everyone.And when executing the above statement, i get the following error:





Code Snippet

DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file "\leaf7dbsMyNetworkDB.mdf" failed with the operating system error 5(Access is denied.).

View 9 Replies View Related

SQL Server 2008 :: Query To Delete All Backup Files Older Than A Specific Date?

Jul 29, 2015

I want to delete all backup files from a folder older than a specific date. But if I use the beklow query, I need to pass how many days of older backup files I need to delete whereas in my case, I dont know how many days/month/syears of old backup files are there in the backup folder.

EXEC xp_cmdshell 'FORFILES /p c:BACKUP /s /m *.sql /d -30 /c "CMD /C del /Q /F @FILE"'

View 2 Replies View Related

Using SSIS To Access Network Share From Different Domain

Feb 12, 2008

Hey All,

This is my first time using the forums here nor am I a SQL programmer. I'm trying to help a coworker figure out how to access files from a network share (using a UNC path) from a different domain. Right now we have three domains - Production, Development, and the Local. There is a one-way trust setup with the development and local domains, so using cross domain accounts is easy. Unfortunately, we cannot setup one right now with our production domain to any of the other two domains. Is there a way to pass production credentials from our local or development domain servers to a production server share? Am I even approaching this in the right way? Maybe there is a different method, any help would be GREATLY appreciated!
-Andrew
Network Administrator

View 1 Replies View Related

SSIS Package Storage In A UNC Network Share?

Aug 13, 2007

Somehow I have an impression this can be done.
Somehow I tried myself by modifying MsDtsSrvr.ini.xml to point it to network UNC share, but it didn't work for me. It gave me an error

"Failed to retrieve data for this request (Microsoft.SqlServer.SmoEnum)
Additional Information: The storage localtion for the folder 'File System' cannot be accessed. (MsDtsSrvr)"

I checked my UNC permission, and I even allow full access from "everyone", but it still does not work.

I paste my MsDtsSrvr.ini.xml here too, and any help is greatly appreciated!



<?xml version="1.0" encoding="utf-8"?>
<DtsServiceConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<StopExecutingPackagesOnShutdown>true</StopExecutingPackagesOnShutdown>
<TopLevelFolders>
<Folder xsi:type="SqlServerFolder">
<Name>MSDB</Name>
<ServerName>.</ServerName>
</Folder>
<Folder xsi:type="FileSystemFolder">
<Name>File System</Name>
<StorePath>\test01mytest</StorePath>
</Folder>
</TopLevelFolders>
</DtsServiceConfiguration>

View 1 Replies View Related

Network Share/Multi User Deployment

Dec 12, 2006



Can a SQL Server 2005 Compact Edition database file be deployed on a file share and be accessed by multiple (5-10) concurrent users? This is a current scenario being implemented at several sites using MS Access databases.

Each client would have the SQLce engine installed on it and would only access the database via a managed C# application.

View 3 Replies View Related

SQL Server Admin 2014 :: BCP Cannot Access Network Share

Jan 5, 2015

I have SQL Server 2014 (Enterprise) on Server A. The service runs under DomainAAdmin.

The Client machine is B, User credentials DomainBUser.

DomainBUser has a share on B that contains a BCP data file. DomainAAdmin has full access to this file.

If I log onto A (the server machine) with either DomainAAdmin or DomainBUser credentials, and run SQL Server Management Studio with Windows Authentication I can run BCP sucessfully using the following:

BULK INSERT [MyTable] from 'Bsharedatafle.tsv' WITH ( KEEPNULLS , KEEPIDENTITY ) However, if I log onto B, (the client machine and the machine hosting the share) and try to run the same bcp command, I get "Access is Denied".

View 5 Replies View Related

How Do You Connect To SQL 2005 Express Database On Network Share

Mar 30, 2006

Hello,

Ho do I allow multiple users to share a database?

Background

I have developed a Windows App in VS.NET 2005 which connects to a SQL 2005 Express database.

Now I want to install the app and database on the network and I am getting an error "File 'file_name' is on a network device not supported for database files"

What is the best way to get this working

Thanks in advance,

Phil

View 1 Replies View Related

Flat File Connection - Network Share - SQL Agent - HELP!

Jun 19, 2007

SQL Agent will not successfully execute my package as a job. Bids executes the package correctly as well as when I run the package manually (right click, run package) through SQL Server Management Studio. This is a permissions issue with the flat file any help will be much appreciated.Background Information:OS: SQL 2005 on Windows Server 2003Flat File Connection: \servernamefolderfile.txt (If I change the flat file location to a local file the package will run as a job successfully)Domain: The package is running on a Windows machine that is not on any domain. The network location is a Windows machine on a domain.Security: The network location folder (\servernamefolderfile.txt) has no security, namely anyone can access any file to read/write/delete/etc. I can manually add and delete files as well as add and delete files when the package runs through BIDS or when I manually run it through management studio.Permissions: I have created a login, security credential, and proxy which I am using to run the package. The security credential is tied to the Administrator account on the local machine.
Error Message: Executed as user: COMPUTER-NAMEAdministrator. Microsoft (R) SQL Server Execute Package Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 12:05:37 PM Error: 2007-06-19 12:05:39.25 Code: 0xC001401E Source: DataTransfer Connection manager "FILECONNECTION.FileConnection" Description: The file name "\servernamefolderflatfile.txt" specified in the connection was not valid. End Error Error: 2007-06-19 12:05:39.25 Code: 0xC001401D Source: DataTransfer Description: Connection "FILECONNECTION.FileConnection" failed validation. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 12:05:37 PM Finished: 12:05:40 PM Elapsed: 2.297 seconds. The package execution failed. The step failed.
(note: I replaced the fileconnection strings with FILECONNECTION and the serverpath with "servernamefolder" for privacy reasons.
Any help would be greatly appreciated. This is some sort of security issue with SQL Agent. But, the error claims that the user is running as localmachineAdministrator. Isn't this how the package would run if I manually execute it?

View 3 Replies View Related

Multi Connection To .sdf File Store On Network Share

Feb 22, 2007

Hi

In the "Choosing Between SQL Server 2005 Compact Edition and SQL Server 2005 Express Edition" white paper, i can read that: "SQL Server 2005 Compact Edition support data file storage on a network share" and "Number of concurrent connections = 256"

But when i try to connect with two different PC at the same time to a .sdf file store on a network share, i have an error message : "File is locked by an other processus"

The firsth PC is connected but the secondth can't

";Mode=Read Write" in the connection string don't change anything.

anybody have an idea ?

View 3 Replies View Related

Transact SQL :: Bulk Insert When Data File Is On Network Share

Dec 3, 2015

I am running Microsoft SQL Server 2012 SP on a Windows Server 2008 R2 Standard SP1 box. The SQL Server service is running as a simple windows domain user (nothing special, no admin rights, etc.) I am having some issues with using Bulk Insert when the data file is on a network share when using Windows Authentication. What is known is that the SQL Server service account has access to the network resource, which is shown by logging into SQL Server with a SQL account and doing the Bulk Insert. I also have rights to the files on the share, as shown by the fact that I put the files there. My SQL is in the form of:

Bulk Insert [table name] From '[server][share][filename]' With (FirstRow = 2, FormatFile='FormatFile.xml')

Now, when connecting to SQL Server with Windows Authentication and running the Bulk Insert I get the following error:

Msg 4861, Level 16, State 1, Line 2 Cannot bulk load because the file "[server][share][filename]" could not be opened. Operating system error code 5(Access is denied.).

I found this snip at

BULK INSERT (Transact-SQL)Security Account Delegation (Impersonation), which says, in part (emphasis mine):

To resolve this error [4861], use SQL Server Authentication and specify a SQL Server login that uses the security profile of the SQL Server process account, or configure Windows to enable security account delegation. For information about how to enable a user account to be trusted for delegation.

How to Configure the Server to be Trusted for Delegation, and we tried the unconstrained delegation and I rebooted the SQL server, but it still does not work. Later we tried constrained delegation and it still does not work.

I have verified the SPNs:

C:>setspn adsvc_sqlRegistered ServicePrincipalNames for CN=SVC_SQL,OU=Service Accounts,OU=Users,OU=ad domain,DC=ad,DC=local:        MSSQLSvc/SQLQA.ad.local:1433        MSSQLSvc/SQLDev.ad.local:1433        MSSQLSvc/SQLQA.ad.local        MSSQLSvc/SQLDev.ad.local
I have verified that my SQL connection is TCP and I am getting/using a Kerberos security token.
C:>sqlcmd -S tcp:SQLQA.ad.local,1433 -E1> Select dec.net_transport, dec.auth_scheme From sys.dm_exec_connections As dec Where session_id = @@Spid;2>
gonet_transport auth_scheme------------- -----------TCP KERBEROS(1 rows affected)1>

If I move the source file to a local drive (on the SQL server), all works fine, but I must be able to read from a file share?

View 8 Replies View Related

How To Get A Microsoft SQL Server Compact 3.5 Database Multiuser Work On A Network Share

May 21, 2008

Hello All,

I need some advise/help how to deploy a small sql server compact 3.5 database on networkshare where about 8 people have access to it(install de client ) and can modify the database with aprox 3000 records.
I'm using visual basic 2008 and created a compact database and filled it with one table of an export of an access database done with data port console.
And created a new windows forms application and saved the project.
Publish is not the problem but how too set it up......
There is not much info to find on how to get a sql server 3.5 database running on a network share.
Who can help ???


Thanks


View 2 Replies View Related

RESTORE DATABASE Timeout In SQL 2000 With Large Backup Files

Sep 11, 2007



Hello,

I am attempting to restore the database from within VB.NET application I am making the following 3 calls:

RESTORE FileListOnly FROM DISK = 'C:MyDatabase.dat'

USE Master RESTORE DATABASE MyDatabase FROM DISK = 'C:MyDatabase.dat' WITH NORECOVERY, MOVE 'MyDatabase' TO 'C:Program FilesMicrosoft SQL ServerMSSQLDataMyDatabase.mdf', MOVE 'MyDatabase_log' TO 'C:Program FilesMicrosoft SQL ServerMSSQLDataLDFMyDatabase.ldf', REPLACE

RESTORE DATABASE MyDatabase FROM DISK = 'C:MyDatabase.dat'


using SMO. This logic works fine with small *.dat files, however when using *.dat file of about 4Gb I get an error on the 3d restore database call:



ExecuteNonQuery failed for Database 'master'.

An exception occurred while executing a Transact-SQL statement or batch.

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Operator aborted backup or restore. See the error messages returned to the console for more details.

ExecuteNonQuery failed for Database 'master'.

An exception occurred while executing a Transact-SQL statement or batch.

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Operator aborted backup or restore. See the error messages returned to the console for more details.



The same program/logic also works fine when I use MS SQL 2005 and it runs fine from MS SQL 2005 Query Analyzer for both 2005 and 2000 databases. There seem to be only problem with MS SQL 2000 from within VB.NET. Anybody has any idea? I'd appreciate any response. Thanks

Eugene

View 6 Replies View Related

Backup To UNC Or Share?

May 24, 2004

Hi All,

Hopefully a painless and quick question to answer:

Am backing up the SQL2000 database(s) using the maintenance plan's under management in the Enterprise Manager.
All is fine however, we are running out of diskspace as the database grows, which is causing the backup to fail if I don't manually remove the nights before.

I have selected to delete old backup files however these files are deleted after the new file is generated and due to the lack of space the new one is not being generated....so in effect the older ones never get a chance to be deleted.

So I was wanting to know if it is at all possible to backup to a UNC path or share . I have tried however it raises an error saying it is not a valid path.

Any assistance here is hugly appreciated (asides from getting new disk - as this isn't a short term option at the moment)...

Cheers all
Troy

View 3 Replies View Related

To Post Files To Share Point Site

Feb 13, 2008

Hi Experts,
I am looking for sql code/approach to export a text file and 2 excel works sheets(from an excel workbook) in a folder, to 3 different tables in sql server, perform data scrubbing and then export the data from all 3 tables to 3 different excel sheets and post them in 3 different web parts in a share point site.

Mainly sql code(or any code that i can integrate with SQL Server) to post files to different web parts in a share point site is what i am looking for.

Any sort of pointers/suggestions would be really helpful.

Thanks & Regards,

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved