Anyways, how do I throw the error in my code? Do I just write a throw 3829 statement?
Also maybe this is a very bad way to do this- any suggestions?
You can use dtsrun commandline utility Take a look at this link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/coprompt/cp_dtsrun_95kp.asp
BTW, SQL provides a extended stored procedure xp_cmdshell to perform commandline tasks, so you can also call dtsrun utility in T-SQL:
exec('master..xp_cmdshell ''dtsrun -S iori\Athena -E -N test ''')
|||I saw that command line solution a while ago, but I was told that it isnt the best thing to do security wise.I ended up finding DTS.Packages (DTS.Package dtsp = new DTS.Package();) which seems to work pretty well. The only problem is that the web account does not have the correct permissions. By enabling a trusted connection, and tweaking IIS, it now prompts the user for a username/pswd when they get to the site. If they enter in an account with the correct permissions, then they are able to run the DTS job.
Now I'm trying to get rid of this annoyance. Is it possible to somehow force a login to a specific trusted account? If not then I was thinking of trying to run a job that will just run the DTS package, but I don't know how to do that either. Any suggestions?
No comments:
Post a Comment