Groups | Blog | Home
all groups > sql server connect > june 2006 >

sql server connect : need assistance on connecting to sql server


MrRAO
6/1/2006 11:41:01 AM
Connect to Sql Server
[quoted text, click to view]

Connect using:
[ ] Window authentication
[ ] Sql Server authentication
Login Name : [____________]
Password : [____________]

------------------------------------------------------------------------------------------------
I want to get the above senario for sql server name and connect using
different authentication from dos mode using Visual dialog script or winbatch
program.

Is there any way to get the following from dos prompt or using sql command
or using registry key -----
* server name
* connect using >>>
*--- Window authentication
*--- Sql Server authentication
if Sql Server authentication
then check for user and password
--
MrRAO
6/1/2006 12:16:02 PM
Hey i got it guys .,.,take it easy .,i found the way in osql

in command prompt type the following steps

if you want the connection in window authentication
c:\>osql -E -i *.txt -o *.txt -n -dmaster

if you want the connection in sql authentication
c:\>osql -U username
password :
[quoted text, click to view]

Or

c:\>osql -Uusername -Ppassword -i *.txt -o *.txt -n -h-1 -dmaster





--
Makes Yor Life Easy,Microsoft


[quoted text, click to view]
AddThis Social Bookmark Button