July 14, 2008 at 12:17 pm
We are using an application called filecryptsb to encrypt and decrypt some files we are obtaining from another system. There is a batch file which we call with xp_cmdshell. For interest sake, the command line is:
filecryptsb --decrypt "FILENAME.DAT.pgp" --user OurCompany@Someplace --batchmode on --wipe --passphrase rndchars +FORCE'
(I know, this has absolutely nothing to do with SQL Server, sorry.)
If we execute this batch file by itself, everything runs properly. However, with xp_cmdshell an error is returned saying it cannot find the key. This puzzling because the key is embedded in the file itself, and it's working fine at a command prompt.
I have a support request in with Veridis, but if anyone here can think of something we're missing or doing incorrectly, your help will be greatly appreciated.
Chris
July 15, 2008 at 1:39 am
Could it be permissions?
When you run it at the command prompt, you're running under your security credential. When you run it through xp_cmdshell, you're running it under the SQL Server Service account's credentials.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 16, 2008 at 2:10 am
If your encryption tool works like PGP, it may be trying to use or create temporary working folders. You may need to give permission on the folders to the account that the xp_cmdshell uses. I can't find the email that describes the issue right now. I'll post more if I find it.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply