Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Install SQL Server 2008 Express via command line

Posted on 2013-06-05
6
Medium Priority
?
1,476 Views
Last Modified: 2013-06-11
I am trying to figure out the code to install SQL Server 2008 Express Engine from the command line as part of my installation package.  We previously used SQL Server 2005 Express Engine (upgrading the tool set), but SQL Server 2008 Express Engine installer has more required options (or, so it appears to).  The following does not work.  However, it processes for a while before it abruptly stops.  the screen disappears, and I have no idea what the problem is.  How do I create a log, and what is wrong with the below command line entry?  Thanks for any help.

SQLEXPR_x86_ENU.exe /qs /ACTION=Install /BROWSERSVCSTARTUPTYPE=Automatic /SQLSVCSTARTUPTYPE=Automatic /FEATURES=SQL /INSTANCENAME=MYDB /SAPWD="SQL2008UpgradePassword" /SQLSYSADMINACCOUNTS="sa" /SECURITYMODE="SQL" /AGTSVCACCOUNT="NT AUTHORITY\Network Service" /ISSVCACCOUNT="NT AUTHORITY\Local Service"  /RSSVCACCOUNT="NT AUTHORITY\Local Service"

The below previous version for SQL Server 2005 Express worked just fine, but I'm not sure how to get it working for 2008.

sqlexpr.exe /qb INSTANCENAME=TPSDB ASACCOUNT="sa" SAPWD="SQL2005UpgradePassword" ADDLOCAL=SQL_Engine,SQL_Data_Files SQLAUTOSTART=1 SECURITYMODE=SQL
0
Comment
Question by:spazjr01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
6 Comments
 
LVL 8

Expert Comment

by:didnthaveaname
ID: 39223686
You don't need the /sqlsysadminaccounts="sa".  

I did notice that in the BOL, it specifies issvcaccount and rssvcaccount as required, but I'm pretty sure that's only if those features are installed.

Additionally, for verbose progress, you can use /indicateprogress and just pipe it to a file, but i'm pretty sure the logging should be in: program files (x86)\Microsoft SQL Server\100\Setup Bootstrap\LOG
0
 

Author Comment

by:spazjr01
ID: 39224423
No matter what I do I cannot get either any basic command line installation of SQL Server Express 2008 to work, nor can I see log files in the mentioned directory.  At this point, after trying all day, I'd like someone to just give me the bare basic syntax for installing any SQL Server Express 2008 Engine instance.  Then, I could work toward what I need from there.  I've been all over the web using various examples and none have worked for me.  What gives?
0
 

Author Comment

by:spazjr01
ID: 39224426
And, what is the syntax for using /indicateprogress to "just pipe it to a file"? Can't find that example any where.
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 

Author Comment

by:spazjr01
ID: 39224454
Okay.  I finally found the log files.  Now, if I understand the error, it is failing because SQL Server 2008 is already installed.  I get this message in the log:  "No features were installed during the setup execution.  The requested features may have already been installed."  Now, I do have a default local instance of SQL Server 2008 installed.  But, I am now trying to install the TPSDB instance with the SQL Server 2008 Express installer.  I was able to do this all day long with 2005.  How do I solve this dilemma?
0
 

Accepted Solution

by:
spazjr01 earned 0 total points
ID: 39227287
Solved my own problem.  For 64-bit machines:

SQLEXPR_x86_ENU.exe /INSTANCEID=TPSDB /ACTION=INSTALL /FEATURES=SQLENGINE /INDICATEPROGRESS=False /QS /ERRORREPORTING=False /INSTANCEDIR="C:\Program Files (x86)\Microsoft SQL Server" /SQMREPORTING=False /INSTANCENAME=TPSDB /AGTSVCSTARTUPTYPE=Manual /ISSVCSTARTUPTYPE=Automatic /ISSVCACCOUNT="NT AUTHORITY\NetworkService" /ASSVCSTARTUPTYPE=Automatic /ASCOLLATION=Latin1_General_CI_AS /ASDATADIR=Data /ASBACKUPDIR=Backup /ASTEMPDIR=Temp /ASCONFIGDIR=Config /ASPROVIDERMSOLAP=1 /SQLSVCSTARTUPTYPE=Automatic /FILESTREAMLEVEL=0 /ENABLERANU=True /SQLCOLLATION=SQL_Latin1_General_CP1_CI_AS /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /SECURITYMODE=SQL /ADDCURRENTUSERASSQLADMIN=True /TCPENABLED=0 /NPENABLED=0 /BROWSERSVCSTARTUPTYPE=Disabled /RSSVCSTARTUPTYPE=Automatic /RSINSTALLMODE=FilesOnlyMode /INSTALLSHAREDDIR="c:\Program Files (x86)\Microsoft SQL Server" /X86=True /SAPWD=SQL2008UpgradePassword

For 32-bit machines:
SQLEXPR_x86_ENU.exe /INSTANCEID=TPSDB /ACTION=INSTALL /FEATURES=SQLENGINE /INDICATEPROGRESS=False /QS /ERRORREPORTING=False /INSTANCEDIR="C:\Program Files\Microsoft SQL Server" /SQMREPORTING=False /INSTANCENAME=TPSDB /AGTSVCSTARTUPTYPE=Manual /ISSVCSTARTUPTYPE=Automatic /ISSVCACCOUNT="NT AUTHORITY\NetworkService" /ASSVCSTARTUPTYPE=Automatic /ASCOLLATION=Latin1_General_CI_AS /ASDATADIR=Data /ASBACKUPDIR=Backup /ASTEMPDIR=Temp /ASCONFIGDIR=Config /ASPROVIDERMSOLAP=1 /SQLSVCSTARTUPTYPE=Automatic /FILESTREAMLEVEL=0 /ENABLERANU=True /SQLCOLLATION=SQL_Latin1_General_CP1_CI_AS /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /SECURITYMODE=SQL /ADDCURRENTUSERASSQLADMIN=True /TCPENABLED=0 /NPENABLED=0 /BROWSERSVCSTARTUPTYPE=Disabled /RSSVCSTARTUPTYPE=Automatic /RSINSTALLMODE=FilesOnlyMode /INSTALLSHAREDDIR="c:\Program Files\Microsoft SQL Server" /SAPWD=SQL2008UpgradePassword
0
 

Author Closing Comment

by:spazjr01
ID: 39237155
No one else provided a solution.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Audit has been really one of the more interesting, most useful, yet difficult to maintain topics in the history of SQL Server. In earlier versions of SQL people had very few options for auditing in SQL Server. It typically meant using SQL Trace …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question