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 |
|
yadhu_cse
Constraint Violating Yak Guru
252 Posts |
Posted - 2011-08-18 : 04:40:50
|
| Hi,i have written script file for creating database and user login and executin that using sqlcmd. but when i create database and user i use admin account, once the user created, i want to connect using login that i have created in same session. can one help in this summery: switching from admin to another user and execute some sql commandregard |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
|
|
yadhu_cse
Constraint Violating Yak Guru
252 Posts |
Posted - 2011-08-19 : 00:13:54
|
| i used execute as user nad execute as login ,when i execute this in ssms it works but when i use this in script file it dose not. it will give error .could not find stored procedure 'o' |
 |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2011-08-19 : 10:16:37
|
| ok...that has nothing to do with your original question. Post your "script file" and the code you use to launch it.Be One with the OptimizerTG |
 |
|
|
|
|
|