Issues With Moving Backups Via XCopy

Jun 9, 2006

When we take backups, we xcopy them from a folder (on a remote server) containing all of the backups for the databases on that server accross a network onto a central server, into a folder for that server/database. However, should one of the backups we have moved accross the network and onto the central server get deleted or moved, the XCopy does not attempt to move the copy from the remote server back onto the central server the next time we run the procedure...so is there a setting that essentially states, "sync up the source and destination, in order to make the destination match the host"? and what causes XCopy to ignore the files it previously moved into the destination? Is it a property on the file? Any advice?

thanks in advance!

SQL Server 2000

View 4 Replies


ADVERTISEMENT

SQL Server 2008 :: Moving Backups / Restoring Databases

Feb 23, 2015

I am working on a task. Currently we are taking a database backup and keeping that backups in a folder. The backups doesn't have time stamp on it. My task is need to get the latest backup and copy that backups into some other server and then restore the database from there.I am planning to create SSIS package.Do we need script task for this task.How to get the .bak with latest create or moidified date. For now we doesn't have timestamp so need to go based on modified date?

View 9 Replies View Related

Recovery :: Moving DB Backups From File Share Witness AlwaysOn

May 31, 2015

Is it alright to move the .bak and .trn backups which are automatically created in a File Share Witness when a DB is added to an Availability Group? I did that and there were error IDs 1069 occurring, and the AG was unable to be brought up whenever I run a load intensive batch job ...

View 5 Replies View Related

Xcopy

Mar 2, 2004

hi,
I have the following statement:
exec xp_cmdshell 'xcopy f:dataackup est1.bak \server2ackup /c'
it works in command prompt but not in QA. i tried dir on both the machines, it works fine.
harshal.

View 8 Replies View Related

Can I XCopy SQL CE 3.5? Yes And No, See Message.

Jan 31, 2008

I was hoping to upgrade my SQL CE from 3 to 3.5 for my PPC and desktop applications. However, when I went to XCopy to another desktop I got errors. First, error was that the System.Data.SqlServerCe.dll is not enough, so I copied the other dlls too. Then I got provider not installed error. I do not want to install, I just want to XCopy.
So I searched the newsgroups and online help. I tested using ClickOnce and that worked only because it installed SQL CE for me... but I want to just XCopy.
Next I commented out my code that uses LINQ and just used the old data adapter way to get data and it worked.
I use the same connection string:
"Data Source=C:=test.sdf;Password=sa2008;Persist Security Info=True;Encryption Mode=PPC2003 Compatibility;Max Database Size=4000"


1. Using old way to get data works with XCopy
2. Using LINQ way to get data DOES NOT work with XCopy

Seems that LINQ requires that SQL CE be installed on the desktop to work.
Is this true?


(I know LINQ is not support with SQL CE at this time, but it's sure nice to use)

One other problem I noticed is that I can compile and run my LINQ to SQL CE solution just fine in VS.Net 2008 express, but the same solution gives me a compile error without details as to why when compiled in VS.Net 2008 Pro.

,,,Bydia

View 11 Replies View Related

Xp_cmdshell With Xcopy Returns 2, Why?

Apr 8, 2008

According to the documentation, xp_cmdshell returns 0 if success or 1 if it fails, so I was curious as to why I was getting a return value of 2 when using it with xcopy. So in my t-sql code, if I have something like

@result = master..xp_cmdshell 'xcopy c: est.txt c:Program Files'

The result would return 2. Then if I check if @Result is not equal to 0, it would say their is an error when I am not sure if there was one. I did read on a faq that xcopy expects input from the user, which is normally provided at the command prompt through a return after the command and this behavior can me mimicked by adding "< NUL:" after the command text, which will effectively signal the XCOPY input stream, so the above command becomes:


@result = master..xp_cmdshell 'xcopy c: est.txt c:Program Files < NUL: '

I am still unsure why the @result would return a 2 though?
Also, if I am not going into any subdirectories, is their an advantage of copy over xcopy and vice versa?

If anyone has any info, please let me know, I am using Sql Server 2000.

Thanks in advance,
XaiSoft

View 4 Replies View Related

Xcopy Can Not Copy File From Another Computer

Oct 18, 2007

sql server 2000

when I run under SQL in sql analyser



exec master.dbo.xp_cmdshell 'c:mssqldata est_data_mdf \server1data /y'

return : invalid drive specification

but I can run 'c:mssqldata est_data_mdf \server1data /y' from CMD

any solution?

Thx

View 1 Replies View Related

SQL Express XCopy Deployment Under Vista

Nov 28, 2006

We are in the process of converting our MSDE-enabled products to using SQL Express for compatability with Vista. With help from the msdn article at http://msdn2.microsoft.com/en-us/library/ms165716.aspx I've been able to create a test install that works fine under XP, but fails under Vista. We have our application installing under the "Program Files" directory, and are copying the database's MDF file into the same directory. We are using AttachDbFileName to connect to the database and under XP the LDF file is created fine. Under Vista we receive an error that the database cannot be attached and I've noticed that the LDF file is not being created. I was receiving the exact same error under XP until I removed the LDF file from the install and allowed SQL Express to create it. I'm guessing that it is an issue in the permissions necessary to write the LDF file out to the applications directory, but that's just a guess. So, I was wondering what the Microsoft recommended method for doing a SQL Express XCopy deployment under Vista was?

View 2 Replies View Related

Xcopy Not Copying All Files In Stored Procedure

Apr 8, 2008

I am executing xcopy with xp_cmdshell in a stored procedure and it is not copying all the files. There are about 600 files in the source directory and only around 190 are copied to the destination.

The command in the stored procedure is this N'xcopy c:source*.* c:dest'

Help please!!!!

Thanks,
Saied

View 14 Replies View Related

CLR Integration And SQL Express XCOPY Deployment Hell!

Jul 1, 2006

I originally developed my application using SQL 2005 Developer Edition, but want to switch to using an XCOPY deployed DB on SQL Express for deployement.

I have successfully copied the database.mdf/ldf files over to me project, and can connect using Data Source=.SQLExpress and AttachDbFilename=|DataDirectory|[database].mdf attributes.

The question is, how do I enable CLR integration for my C# SP's?

I've tried executing the following in various places:

sp_configure 'clr enabled', 1
go
reconfigure
go

But I obviously haven't hit the spot because I'm getting the following error when VS deploys my SP library:

Error: starting database upload transaction failed.
Error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Any ideas?

View 1 Replies View Related

DB Engine :: Will Transaction Log Backups Not Free Up Log During Full Backups

Nov 15, 2015

The space allocated to the Log in question is 180 GB. During this time period I was running TLog backups every 5 minutes, yet the log continued to chew through to 80 GB used, even after the process was complete and a final TLog backup had been taken. It continued to stay very large until the Full backup was complete -- or something else that I'm unaware of completed. Like every other DBA I typically take a TLog backup to shrink the log, but what appeared to be the case here was the Full completed and it released the used log space. All said, will Transaction Log backups not free up the log during Full backups?

View 3 Replies View Related

Exec Master.dbo.xp_cmdshell N'Xcopy C:@folder1 C:@folder2 /i'

Mar 7, 2008



Hi All,

I am writing a stored procedure which accepts 2 parameters -
Current version(.....for example V53)
UpgradeTo version(.....for example V61)

Using these 2 inputs --I need to create a directory V61 by copying directory V53
for this specific example it would go like this-------------

exec master.dbo.xp_cmdshell N'Xcopy c:V53 c:V61 /i'

Now if i want to make a dynamic query for this ...
how do i go about it?


declare @folder1 varchar(255)

declare @folder2 varchar(255)

declare @xcopytext varchar(255)


SET @folder1 = 'V53'

set @folder2 = 'V61'


set @xcopytext = N'Xcopy "c:@folder1" "c:@folder2" /i'

exec master.dbo.xp_cmdshell @xcopytext

This gives the error :
File Not Foundfolder1

How do I integrate dynamic query with XCopy functionality ?

View 5 Replies View Related

Xcopy Command Failed In Sql Server 2000 As Scheduled Task

Jul 20, 2005

After setting up the linked server connection at the standby server, Itried to xcopy a file through the sql server 2000 schedule task to thestandby server's shared directory. But it keeps giving me the errormessage with'Invalid Drive Specification'.My whole process includes1) set up linked server connection on the standby server2) set up job to xcopy file as operating system commend in sql serverfrom the production box(xcopy c:directoryfile.bak\standby_servere$directory /c)3) test, but not successful - I am already running the whole scheduletask as a Windows user with Admin authority.)What did I do wrong or did I miss something?Thanks in advance

View 6 Replies View Related

Using Xcopy To Get The .mdf File Of Pubs Database To The App_Data Folder Of A Website Of VWD Express Project

Jan 9, 2007

Hi all,

I have a stand-alone Windows XP Pro PC that has SQL Server Express (SSE) and Visual Web Developer Express (VWDE) programs. The Microsoft "pubs" Database is installed in the SQL Server Management Studio Express (SSMSE). I created a website in my VWDE program. I need the .mdf file of the pubs Database in the App_Data folder of website of my VWDE project. I think that User Instance in my SSE is established. I have studied Xcopy Deployment (SQL Server Express) and User Instance for a quite a while and I still do not know where and how to use Xcopy to get the mdf file of the pubs database into the App_Data folder of the website of my VWDE project. Please help and give me the detailed key steps/instructions about where and how to get the .mdf file of the pubs database into the App_Data folder of the website of my VWDE project via Xcopy.

Thanks in advance,

Scott Chang

View 6 Replies View Related

Transact SQL :: How To Get Moving Total Like Moving Average

Nov 10, 2015

I trying to get the moving total (juts as moving average). It always sum up the current record plus previous two records as well and grouped by EmpId.For example, attaching a image of excel calculation.

View 3 Replies View Related

How To Use Xcopy && User Instance To Copy 3 Dbo Tables From The Database Of SQL Server Management Studio Express To The App_Data Folder Of Website Of VWD Express Project?

Jan 6, 2007

Hi all,
I have read/studied (i) Working with Databases in Visual Web Developer 2005 Express in http://quickstarts.asp.net/QuickStartv20/aspnet/doc/data/vwd.aspx, (ii) Xcopy Deployment (SQL Server Express) in http://msdn2.microsoft.com/en-us/library/ms165716.aspx, (iii) User Instances for Non-Administrators in http://msdn2.microsoft.com/en-us/library/ms143684.aspx, and (iv) Embedding SQL Server Server Express in Applications in http://msdn2.microsoft.com/en-us/library/ms165660.aspx.  I do not understand the concepts and procedures to do Xcopy and User Instances for non-administrators completely-I do not know how to connect to databases and create database diagrams or schemas using the Database Explorer.  I have a stand-alone Windows XP Pro PC. I have created a ChemDatabase with 3 dbo tables in the SQL Server Management Studio of my SQL Server Express and a website of my VWD Express application with an App_Data folder.  I am not able to proceed to use Xcopy and user instance to bring the 3 dbo tables of ChemDatabase to my App_Data folder. Please help and give me some detailed procedures/instructions to bring the 3 dbo tables of ChemDatabase (or ChemDatabase itself) from the SQL Server Management Studio Express to the App_Data folder of the website of my VWD Express project? 
Thanks in advance,
Scott Chang 
 

View 3 Replies View Related

Backups

Jan 14, 2007

 
Hi,
I'm trying to work out how to backup an ASP.NET 2.0 site which uses an SQL 2005 Express database located in the App_Data directory. It seems that the database file cannot be copied while in use so I guess that either leaves taking the site offline or maybe the database can be backed up to another location using a scheduled task?
Any suggestions?
Thanks,
Dale

View 9 Replies View Related

SQL 7 Backups

Mar 15, 2002

What backups options do you have if you do not have a tape drive connected to your SQL 7.0 Server ? Can you run a SQL Maintenance Plan and backup the databases to a remote server. If not, can ARCServe 2000 backup the SQL backups to another server with a tape drive ?

View 1 Replies View Related

Backups

Jun 27, 2001

I'm having trouble backing up two databases to tape. Should I be using a backup_device?

have a job defined with the following in it:

backup database test1
TO TAPE = '.Tape0'
with ...

go

backup database test2
TO TAPE = '.Tape0'
with ...

go

where should the init go?

View 1 Replies View Related

Backups

Aug 28, 2001

I've set up several backups in the past using the backup screen. I've also set up a Maintenance Plan to back up my database using MyDbName* where the * is the familiar suffix automatically generated by the system when the backup runs every night.

The trouble is that, even though I've deleted old maintenance plans and scheduled backups, they're not going away. Every morning, I see new nightly backups of old backups etc., in the backup folder. Furthermore, the maintenance plan I want to backup my database isn't creating a backup file.

How can I make the old backups stop running, and make sure the new backup runs? I've gone through everything and can't seem to find any residue of these old scheduled backups--yet they still run! Can anyone help?

View 2 Replies View Related

Backups

Nov 13, 2000

We are having problems with our tape drives so we are attempting to back up our databases to disk. I have a whole server on the network I could use for this. When I use the backup that comes with SQL 7.0 it won't allow me to choose a network drive. It looks like it must be a local drive. Is there a way around this so I could back it up to this other server. I jave 32 gig available on the server which would be plenty. We don't have enough disk space on the local drives to back it up. We have been having problems with our current tape drive company Exabyte. Does anyone have any recommendations. We are thinking of switching to another company.

View 3 Replies View Related

SQL 7.0 Backups ?

Dec 13, 2000

I currenntly backup several databases to thier own unique device. Each backup is executed as a full backup (databases are small)and they are set to expire after 7 days. I checked my devices after 7 days and they continue to grow in size - is this right? I expected the device size to hold constant once I had a rolling seven days of backup (The databases don't change in size from day to day) Any ideas?

View 2 Replies View Related

Backups

Oct 18, 2000

I'm using the database maintenance plans to backup my databases. We are backing them up to tape. Is there a way within the database maintenance plan to tell it to format the tape instead of appending it to the tape.

View 1 Replies View Related

Backups

Jan 4, 2000

I couldn't restore a SQL 6.5 Backup in my SQL 7.0, because it is generating an error in SQl 7.0 that shows an Incompatible types.(media)

How can I restore a SQl 6.5 Backup into my new SQL 7.0 ??? Please Help me, because I'm a Beginner in SQL 7.0.

Thanks in Advance.

View 2 Replies View Related

Backups

Nov 30, 2000

I am trying to make sure I have my backups scheduled correctly and in the correct spot. We have a tape drive on the server which is backing up the databases each night. The logs I have them currently being backp up once an hour to disk. My question is would it better to have the logs back up to the tape drive or to disk. The server where I'm backing up the logs to has 2 drive C and D. Where D contains the data and C contains the application/program files. I'm assuming I wouldn't want it on D since if there was a crash with that drive and we lost the data we wouldn't be able to get the logs for that day so it would be better to put it on C. What are most people doing to backup there logs. At the end of the day after a full backup I clear the device that contains the log backups. It this good practice?

Stacy

View 1 Replies View Related

Backups

Aug 10, 1999

How do you backup to a remote drive?
The book says that inorder to backup to a remote drive, you need to log on with a domain NT account with administrative privileges.
I am unable to log on with a domain account and backup to a mapped drive.

For example, S1 and S2 are two servers in the domain D1. The NT domain administrative account is A1. I need to backup a database D1 on S1 to a location on S2. For this I do the following.
On S1,
sp_addumpdevice 'disk','dump_dev','s2sharenamefilename.bak'
On executing, I get,

(1 row(s) affected)
'Disk' device added.

Then when run the command,
backup database D1to dump_dev
I get the following error,

Server: Msg 3201, Level 16, State 1, Line 1
Cannot open backup device 'dump_dev'. Device error or device off-line. See the SQL Server error log for more details.
Server: Msg 3013, Level 16, State 1, Line 1
Backup or restore operation terminating abnormally.

The event log shows the following error message:

BackupDiskFile::CreateMedia: Backup device 's2sharenamefilename.bak' failed to create. Operating system error = 1326(Logon failure: unknown user name or bad password.).

Please let me know how to back up to a mapped drive using TSQL and Enterprise Manager.

Thank you.
Praveena

View 1 Replies View Related

Old Backups

Dec 4, 2000

I have a dump device configured to append the backup file each time a backup is run. This file has grown extremely large. Im looking for a way to go into the file and delete all but the last 2 or 3 backups. Is there a way to do this?

Thanks

View 1 Replies View Related

7.0 Backups

Apr 5, 1999

Hello,
is there any backup software (archserve,ultraback) that has a sql agent for 7.0 ? I have not found one yet.
Charlie Principato
Dialamerica Marketing,Inc.

View 1 Replies View Related

Backups

Sep 11, 2003

I have a SQL2K/SP3 database with an MDF of 4GB and an LDF of .5GB. If I do a backup using Enterprise Manager, whether manually or via a DB Maintenance Plan, I get a .BAK of approx. 2GB. If I do a backup using:
USE master
EXEC sp_addumpdevice 'disk', 'RAMScopyBAK', 'F:MSSQLBACKUPRAMScopyRAMScopy.BAK'
GO

BACKUP DATABASE RAMScopy TO RAMScopyBAK
GO

I get a .BAK of 24GB !!!

In the end I want a T-SQL step to be part of a SQA job that will back up the database, thus the use of the dumpdevice command. I could create a maintenance plan, disable the jobs it creates, and then start them via sp_start_job, but this is just an example of a systemic problem; i.e. I'd have to do individual maintenance plans for more than one database.

Help?

Thanks,

Al

View 2 Replies View Related

Backups

Aug 22, 2001

For a lot of smaller/medium sized systems that I administer, I tend to use SQL Server to backup to a backup device and then let the normal system backups backup the dump files to tape.

However, I am taking on a new system with approx 900Gb of data. We dont want to buy another 900Gb of disk to secure the databases ! I have found the SQL Agents in Arcserve 2000 to be unreliable to say the least. (we dont want to stop the SQL Services either)

Would anyone recommend alternative software to backup large databases.

Thanks

Tom

View 1 Replies View Related

Backups

Aug 21, 2001

Hello,

Can anyone guide me which method is best to dump databases to a tape.
Using Sql server to dump database to tape or dumping of the file to tape.

Thanks

Sejal

View 2 Replies View Related

Sql Backups

Oct 9, 2001

Is there a way in SQL 2k running on win2k adv. server to map a scsi tape device from one sql server to another so database backups can run to the remote tape device??

View 3 Replies View Related

Backups

Feb 1, 2005

database backups and differential backups

i took database back up on 01-jan-2005 and from 2nd jan onwards im taking differential backups. if i want to restore the database to a new system, is it sufficient that i restore the back up which i took on 1st jan , and the most recent differential backup ? will the entire data till the last back up date be restored?

View 4 Replies View Related







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