SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Can we Create sql server instance through script?


Can we Create sql server instance through script?

Author
Message
Jigneshal
Jigneshal
Valued Member
Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)

Group: General Forum Members
Points: 54 Visits: 84
Hi,

I am using SQL server 2008 standard edition. Is there a way to create a new server Instance by a script except the default instance.?

Thanks.

Regards,
Jigneshal
" Stretch Your Limit Little Beyond Your Limit....! "
Cool
e4d4
e4d4
SSC-Addicted
SSC-Addicted (449 reputation)SSC-Addicted (449 reputation)SSC-Addicted (449 reputation)SSC-Addicted (449 reputation)SSC-Addicted (449 reputation)SSC-Addicted (449 reputation)SSC-Addicted (449 reputation)SSC-Addicted (449 reputation)

Group: General Forum Members
Points: 449 Visits: 2399
Yes, run setup.exe from cmd
http://msdn.microsoft.com/en-us/library/ms144259%28v=sql.100%29.aspx
eg:
Setup.exe /qs /Action=Install /Features=SQLEngine /InstanceName=NewInstanceName /SQLSYSADMINACCOUNTS="domain\sysadmin" /IAcceptSQLServerLicenseTerms

Jigneshal
Jigneshal
Valued Member
Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)Valued Member (54 reputation)

Group: General Forum Members
Points: 54 Visits: 84
Still not clear that, is there any way to create it using scipt?

Regards,
Jigneshal
" Stretch Your Limit Little Beyond Your Limit....! "
Cool
e4d4
e4d4
SSC-Addicted
SSC-Addicted (449 reputation)SSC-Addicted (449 reputation)SSC-Addicted (449 reputation)SSC-Addicted (449 reputation)SSC-Addicted (449 reputation)SSC-Addicted (449 reputation)SSC-Addicted (449 reputation)SSC-Addicted (449 reputation)

Group: General Forum Members
Points: 449 Visits: 2399
Now I don't know what is not clear in adding the setup.exe with proper parameters in script. What kind of script do you mean? What do you want to achieve?
Lowell
Lowell
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27900 Visits: 39920
via TSQL, the best answer is no, you cannot install a new SQL instance via TSQL.
it has to be done from the operating system side, with the example parameters supplied above, as a .cmd or .bat file, or simply inline in a cmd window.

there are edge cases, where if you are running the right user for the SQL service, you could call xp_cmdshell and it might work, but it's not worth the trouble to track down all the errors and issues to make it work.

additionally, it is exceedingly rare you need to install additional instances if you already have an instance in place, so I'm wondering what the real issue is on this question.

Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search