Sheritlw
asked on
Command Line Args for SQL Express
I need to create a command line argument for my distributed setup that will tell SQL Express, to make the db single user mode only, as quite install ( /qb parameter), add the user name and password.
I have looked at Microsoft's site, but no real structure there. What I need is a sample of what the command line would look like.
I have looked at Microsoft's site, but no real structure there. What I need is a sample of what the command line would look like.
ASKER
That is the same link I looked at. I need something like
"Setup.exe server:.\SQLEXPRESS /database:Name /username:UserName /password:Password /qb"
but for sqlexpress command line
"Setup.exe server:.\SQLEXPRESS /database:Name /username:UserName /password:Password /qb"
but for sqlexpress command line
you cannot tell the setup.exe instead you can create a customaction that will have a script or batch file that calls the cmdline utility to tell sqlexpress to do what you want
ASKER
I can send command lines from my setup program, I just need to format to send
ASKER
I read that one to. Before I posted this questions I looked all through the web and found a lot of information. Unforntunetley I am not familiar enough with command line arguments and there format. Above, I provided a command line arg example of another type of install. What I need is the actual argument line that I would use to do what I specified in my question for SQL Express.
Please no more links, but thank you for trying.
Please no more links, but thank you for trying.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Does this make it so that it is a single user and what is instance name.... what you want to name server?
Instance name Specifies the instance of SQL Server to which to connect
To make it single user, install SQLExpress, create your database, then connect using SQLCMD (a command line tool) and submit this SQL:
ALTER DATABASE <yourdbname> SET SINGLE_USER WITH ROLLBACK IMMEDIATE
You can't make the entire SQL Server single user, only particular databases.
ALTER DATABASE <yourdbname> SET SINGLE_USER WITH ROLLBACK IMMEDIATE
You can't make the entire SQL Server single user, only particular databases.
ASKER
That would be great, but this is a distributed application that people will be downloading from many different software sites.
I'm not sure I understand what the issue is. That will do exactly what you want, just put it in your install script.
ASKER
Hi,
I just can't use another tool to install sql server. I would have to operate that tool from the command line also, so I am trying to find another way to do everything from my setup. I currently have the setup downloading, unpacking and installing sql server express. I am looking into a template.ini (microsoft site) file to set parameters, like single user, instead of download, installing and activing another tool using the command line.
Any other information that doesn't require me to use another tool would be great.
Thanks.
I just can't use another tool to install sql server. I would have to operate that tool from the command line also, so I am trying to find another way to do everything from my setup. I currently have the setup downloading, unpacking and installing sql server express. I am looking into a template.ini (microsoft site) file to set parameters, like single user, instead of download, installing and activing another tool using the command line.
Any other information that doesn't require me to use another tool would be great.
Thanks.
ASKER
http://msdn2.microsoft.com/en-us/library/ms144259.aspx the site I am looking at
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have figured it out using the template.ini sample from microsoft. I can now download, unpack, install and then install sql server using the following command line.
start /wait setup.exe /qb /settings".._TempFolder.." \\SQLXNew. ini
You have been a great help so I am awarding you all the points.
Thanks for all your help
start /wait setup.exe /qb /settings".._TempFolder.."
You have been a great help so I am awarding you all the points.
Thanks for all your help
http://msdn2.microsoft.com/en-us/library/ms165702.aspx