Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
emilysdada
Starting Member
1 Post |
Posted - 2002-06-05 : 15:36:33
|
| I need to add a Windows group to a database, grant them access and give them dbowner access rights, and i need to do it in a batch file. ( 200 machines ).The script below appears to work in query analyzer but how do I run it in a dos batch file.USE idesEXEC sp_grantlogin 'camisd010a\crmusers'GOEXEC sp_grantdbaccess 'crmusers', 'crmusers'GOEXEC sp_addrolemember 'db_owner', 'crmusers'Any help you could be would be greatly appreciated.Thank you in advance.Ian DuncanSql 7 and Windows 2000 Pro |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-06-05 : 16:13:49
|
use the isql command line utility . . . quote: Syntaxisql -U login_id [-e] [-E] [-p] [-n] [-d db_name] [-Q "query"] [-q "query"][-c cmd_end] [-h headers] [-w column_width] [-s col_separator] [-t time_out] [-m error_level] [-L] [-?] [-r {0 | 1}][-H wksta_name] [-P password] [-S server_name] [-i input_file] [-o output_file] [-a packet_size][-b] [-O] [-l time_out] [-x max_text_size]- SQL Server 7, Book Online
<O> |
 |
|
|
|
|
|