Creating new sql database from a different server than sql

G

gaurang.vora

Hi All, Can any one please help me on creating sql database on sql
server from a different application server, i could find lot of
examples where the code would create the database with "Create
Database" command on the server where SQL is installed, but my
application is on appserver1 and SQL is installed on SQL1, 2 different
servers. I am using C# and SQL2K. Any help would be highly
appreciated. Thanks.
 
M

Mary Chipman [MSFT]

You are still going to have to pass the T-SQL CREATE DATABASE command
to the second server even though you are using C3. The calling process
will need to have permissions configured on the second server in order
to execute the command.

--Mary
 
G

gaurang.vora

You are still going to have to pass the T-SQL CREATE DATABASE command
to the second server even though you are using C3. The calling process
will need to have permissions configured on the second server in order
to execute the command.

--Mary
Hi, I would pass the T-SQL of Create Database through a command object
from C#, but i am not aware about the permissions to be configured on
the SQL server, so can you please guide me through the same. Thanks.
 
M

Mary Chipman [MSFT]

The database administrator on the target server must configure the
necessary permissions for you -- it's not something you can do from
client code.

--Mary
 
G

gaurang.vora

The database administrator on the target server must configure the
necessary permissions for you -- it's not something you can do from
client code.

--Mary
Hi, Thank you very much for the help. But i am curious to know what
permission are you talking about, is it user level permission, means
the user who is going to run the app should be allowed to create the
database, if yes then can you please tell me how it could be done, i
would personally like to do this so i can learn more.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top