| Author |
Message |
philcart
Joined: 14 Aug 2006 Posts: 30
|
Posted: Mon Oct 15, 2012 1:16 am Post subject: include parameter doesn't handle spaces |
|
|
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 |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 710 Location: Red Gate Software Ltd.
|
Posted: Wed Oct 17, 2012 12:34 pm Post subject: |
|
|
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 |
|
 |
|
|
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