Comments
3 comments
-
Is SQL Compare installed on the server? The context for xp_cmdshell is a folder on the server. If you can run SQL Compare from the command line on the server, with the service account context, this should work.
-
Hi way0utwest,
Yes, SQL Compare 12 Pro is installed on the server.
As mentioned earlier, If I run the SQL Compare command manually through command prompt then it is running successfully. But if the same command is added to xp_cmdshell in a stored procedure then it is throwing error. At this time, SQL Compare command is not able to read version and license information.
Thanks,
PraPaDBA -
Have you logged into the server as the service account to check this? The service account is the context under which xp_cmdshell runs by default. alternatively, if you are on a later version of SQL, you can set a proxy for the xp_cmdshell, which might give you the context for licensing.
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-xp-cmdshell-proxy-account-transact-sql
It's possible that the install of Compare on the server is only for one account.
are you using the full path to the SQL Compare executable? can you post the commands?
Add comment
Please sign in to leave a comment.
I have licensed PRO version of SQL Compare 12 and SQL Data Compare 12.
When I'm using these tools command line manually then it is working fine. But when the same code is called through XP_CMDSHELL in a stored procedure then it is throwing following error:
SQL Compare Command Line V12.4.12.5042
==============================================================================
Copyright c 1999 - 2017 Redgate Software Ltd
SQL Compare: expired, edition standard
Exiting since no valid license was found
It seems that new version is not able to read the version and licensing information.
Can someone help me. I'll appreciate the help as it's a little bit urgent