Red Gate forums :: View topic - include parameter doesn't handle spaces
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

include parameter doesn't handle spaces

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



Joined: 14 Aug 2006
Posts: 32

PostPosted: Mon Oct 15, 2012 1:16 am    Post subject: include parameter doesn't handle spaces Reply with quote

Using SQL Compare command line 10.2.0.1337

I'm using a Powershell script to build up a SQL Compare command line that generates a deployment script for database changes.

One of our developers created an object with a space in the name which has now been changed. SQL Compare treats this as a drop and create.

The command line that is built has the following arguments,
Code:
/Scripts1:"C:\Local\Folder" /server2:mySVR1\SQLR2 /database2:myDB /username2:theUser /password2:thePwd /include:Different /Include:Missing /include:StoredProcedure:[myStored Procedure] /include:StoredProcedure:[MyStoredProcedure] /options:DecryptPost2KEncryptedObjects,IgnoreWhiteSpace,IncludeDependencies,IgnoreUserProperties,IgnoreWithElementOrder,IgnoreDatabaseAndServerName,IgnorePermissions,IgnoreUsersPermissionsAndRoleMemberships,ForceColumnOrder,IgnoreUserProperties,AddDatabaseUseStatement /scriptfile:"C:\Temp\theDeployScript.sql" /force /sync


However, this results in the following error,
Code:
Error: parsing "[myStored" - Unterminated [] set.


So it appears that even though the object name is enclosed in [] characters, SQL Compare isn't handling the spaces in the object name.


Cheers
Phil
Back to top
View user's profile Send private message
Chris Auckland



Joined: 24 Oct 2006
Posts: 755
Location: Red Gate Software Ltd.

PostPosted: Wed Oct 17, 2012 12:34 pm    Post subject: Reply with quote

Thanks for your post.

I've tested this out and can see what you mean. I think it happens because the square brackets are special characters and need escaping. I tried adding the escape characters, and that seemed to fix it for me. Can you try:

Code:
 /include:StoredProcedure:\[myStored Procedure\] /include:StoredProcedure:\[MyStoredProcedure\]

_________________
Chris
Back to top
View user's profile Send private message Send e-mail
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