How do I create a connection string on the command line without referencing a pre-formed connection in the GUI?

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
mango333
Posts: 40
Joined: Thu 14 May 2015 19:23

How do I create a connection string on the command line without referencing a pre-formed connection in the GUI?

Post by mango333 » Tue 08 Mar 2016 14:43

I'm using SchemaCompare Pro 4.0.32, due to issues we're having with 4.1.32.

I want to create a snapshot on the command line using something like the following, but it's not working.

SchemaCompare.com /snapshot /compress:True /connection:"host:ServerAlias;database:MyDB;Integrated Security=True" /file:"I:\Build_TargetSnapshots\MyDB_snapshot.snap"

mango333
Posts: 40
Joined: Thu 14 May 2015 19:23

Re: How do I create a connection string on the command line without referencing a pre-formed connection in the GUI?

Post by mango333 » Tue 08 Mar 2016 15:13

I figured it out...

It seems the /connection switch does some things behind the scenes based on the way your format it.

This worked. /snapshot wants a /database parameter, so including it in the connection string is useless.
SchemaCompare.com /snapshot /compress:True /connection:"server:ServerAlias;Integrated Security=True" /database:MyDatabase /file:"I:\Build_TargetSnapshots\MyDB_snapshot.snap"

This also works, but requires a pre-formatted connection with the name "ServerAlias" in the GUI to get a security context.
SchemaCompare.com /snapshot /compress:True /connection:"server:ServerAlias" /database:MyDatabase /file:"I:\Build_TargetSnapshots\MyDB_snapshot.snap"

alexa

Re: How do I create a connection string on the command line without referencing a pre-formed connection in the GUI?

Post by alexa » Wed 09 Mar 2016 09:56

Thank you for updating us on this issue. Please let us know if any questions arise.

Post Reply