Red Gate forums :: View topic - Command Line unable to read script folder XML
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

Command Line unable to read script folder XML

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
Xaphan



Joined: 20 Apr 2012
Posts: 12

PostPosted: Thu Mar 14, 2013 1:26 am    Post subject: Command Line unable to read script folder XML Reply with quote

I'm calling the SQL Compare command line in my CI build process to deploy a database. My database source is a database located on Team Foundation Server source control and my destination is to a SQL server. To provide SQL compare with the connection to Team Foundation Serveris I'm providing an XML file to the command line using the "scriptsfolderxml" switch. The problem is that I get the following error back...

Error: The file 'Automated.sfx' containing the script folder location XML
fragment could not be parsed. Check that the file exists and that its contents
are well-formed.


As far as I can tell my XML (which I named Automated.xml) is well formatted. It is also in the location of the working folder that I use to call the SQL Compare command line. Here is what my XML looks like (I changed the folder names for the sake of this post)...

Code:
<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<ISOCCompareLocation version="1" type="TfsLocation">
  <ServerUrl>http://MyServer/MyRespository</ServerUrl>   
  <SourceControlFolder>$/MySourceControlFolder</SourceControlFolder>
</ISOCCompareLocation>


My command line arguments look like this...

Code:
/sourcecontrol1 /revision1:HEAD /sfx:Automated.xml /s2:MyDestinationServer /db2 MyDatabaseName + " /o:Default /Include:identical /sf:MigrationScript.sql /sync"


From what I can tell this should just work. What am I missing here?[/code]
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6581

PostPosted: Mon Mar 18, 2013 4:15 pm    Post subject: Reply with quote

Hello,

The file format looks okay, so I think it's either the file name being incorrect or a relative path issue.

The error message you quoted mentions a file with an .sfx extension and the command-line shows an .xml file extension.

If that was a typo, can you spacify the full path to the XML file in the SQL Compare command? Every build system I've been exposed to expose some variables that you can use to get to the various working directories of the build system, for instance ($ProjectDir) in MSBUILD.
Back to top
View user's profile Send private message
Xaphan



Joined: 20 Apr 2012
Posts: 12

PostPosted: Fri Apr 05, 2013 12:47 am    Post subject: Reply with quote

Thanks for the reply. I looked in to this issue further and here is what I found... I was able to get SQL Compare to work with the following command line on my personal workstation:

Code:
"C:\Program Files (x86)\Red Gate\SQL Compare 10\sqlcompare.exe" /sourcecontrol1 /revision1:HEAD /s2:MyDatabaseServer /db2:MyDatabaseName /o:Default /Include:identical /sfx:Automated.xml /sync


Automated.xml was located in the directory that I ran the command line from. I tried this again on my build server using the exact same command and got the following error:

Error: The file 'Automated.xml' containing the script folder location XML fragment could not be parsed. Check that the file exists and that its contents are well-formed.

My build server has both SQL Compare and SQL Source Control installed and they are both the same version as on my workstation. They also are located in the same directory. The Automated.xml is also located in the directory where I am calling the the command line from on the build server.

Why is my workstation running the command prompt without errors, but the exact same command is giving me error on my build machine? Does my build machine need something installed or setup in order to make it work?
Back to top
View user's profile Send private message
Xaphan



Joined: 20 Apr 2012
Posts: 12

PostPosted: Tue Apr 09, 2013 7:58 pm    Post subject: Reply with quote

I realized that this ticket was closed before I posted my last response. I have re-posted the response as a new issue to...

http://www.red-gate.com/MessageBoard/viewtopic.php?p=61215#61215
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group