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


ADVERTISEMENT

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

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 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

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

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







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