Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create a new Login in ms sql server 2000

 
Rajesh Kumar77
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
How to create a new login in ms sql server 2000
i am not able to create using enterprise manager
thatswhy i am not able to pass the user and password arguments like in following way
String user="sa";
String password="secret";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc dbc:sqldsn",user,password);

pl help me how to create a new login in sql server
server is installed in the same machine
waiting for your replies
thankyou very much
yours
raj
 
Daniel Dunleavy
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there are system stored procedures which come with sql server
try sp_addlogin
sp_addlogin [ @loginame = ] 'login'
[ , [ @passwd = ] 'password' ]
[ , [ @defdb = ] 'database' ]
[ , [ @deflanguage = ] 'language' ]
[ , [ @sid = ] sid ]
[ , [ @encryptopt = ] 'encryption_option' ]

Dan
 
Rajesh Kumar77
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou Very Much
I will implement this and get back to u
Thankyou once again
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic