January 21, 2002 at 9:43 pm
Dear All,
I am writing a script for SQL6.5 for auto generating a database and a user for that database and few tables within the database.
I am struck at changing the user from 'sa' to the newly created user (say 'sharan') so that i can create a database and table under him.
In Oracle I can use a command in SQL script file for this as "connect sharan/abcd123" but how to do in SQL server?
Presently, I am changing the ownership from SA to sharan after creating the database and tables.But, still the owner would be DBA not sharan for database and tables.
Can you please help me? Thanks in advance.
Thanx n Rds
January 21, 2002 at 11:54 pm
try a
use sharan
statement.
Cursors never.
DTS - only when needed and never to control.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy