include parameter doesn't handle spaces
philcart
Posts: 45
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,
However, this results in the following error,
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
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,
/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,
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
Comments
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: