Sunday, March 11, 2012
Connection from command prompt
Though sound silly, but I require it by any chance...
I need to connect to the sql server 2000 from command prompt and then I
need to run query and see the resultset.
Any suggestion...'osql.exe in SQL 2000 (in SQL 2005 this command line utility is replace
by sqlcmd.exe). You can use the -q or -Q switches to specify a batch to
run rather than use it in interactive mode. Or even use the -i switch
to specify an input file that contains the SQL batch you wish to run.
*mike hodgson*
http://sqlnerd.blogspot.com
MUKUT wrote:
>All,
> Though sound silly, but I require it by any chance...
>I need to connect to the sql server 2000 from command prompt and then I
>need to run query and see the resultset.
>Any suggestion...'
>
>|||Mukut, Just do this,
1. Start >> Run >> cmd
2. osql /?
THis would list out the possible options for this osql utility.
I am sure this is what you are looking for :)
Best Regards
Vadivel
http://vadivel.blogspot.com
"MUKUT" wrote:
> All,
> Though sound silly, but I require it by any chance...
> I need to connect to the sql server 2000 from command prompt and then I
> need to run query and see the resultset.
> Any suggestion...'
>|||Thanks all for your kind suggestion.
Saturday, February 25, 2012
connection error
Source: Connection manager "connection_name"
Description: Failed to decrypt protected connection string for server "server_name" with error 0x8009000B "Key not valid for use in specified state.
". You may not be authorized to access this information. [[Occurs when there is a cryptographic error, most often when the right key is not available]]
i have 2 types of connections: one to oracle database and another to sql database. how do i solve this problem? the package is failing because of them.
Thanks
ChristinaIt sounds like you're moving the package to a new machine? Have you changed the default sensitive encryption option of the package? If it's still encrypt sensitive with user key, and then you copy the package to another machine, this will happen.|||Ok..then should i set it to "don't save sensitive"?
i set the maximum error count to 3 so that the package doesn't fail everytime this happens..but i don't like this solution and it is appearing in the log.
Thanks|||It sort of depends on what you're trying to do. If possible, use integrated auth. then you won't need to worry about passwords. Otherwise, you should encrypt with password and then pass the password in on the command line with dtexec like this: DTExec /F c:\PackageName.dtsx /P FoobarPassword#)%