I'm creating an install package using InnoSetup and installing SQL Server 2005 Express. Here's the code below that appears in my RUN section:
Filename: "{app}\SQL Server 2005 Express\SQLEXPR.exe" ; Parameters: "-q /norebootchk /qn reboot=ReallySuppress addlocal=all INSTANCENAME=(LOCAL) SCCCHECKLEVEL=IncompatibleComponents:1;MDAC25Version:0 ERRORREPORTING=2 SQLAUTOSTART=1 SAPWD=passwordhere SECURITYMODE=SQL"; WorkingDir: {app}\SQL Server 2005 Express; StatusMsg: Installing Microsoft SQL Server 2005 Express... Please Wait...;Check:SQLVerifyInstall
What I'm trying to accomplish is have the SQL Server package install but only have the instance name itself reference the name of the machine name and nothing more. What I'm receiving instead is a named instance instead of local such as MachineName\SQLEXPRESS which is not what I want to receive.
I need a local instance instead of a named instance due to the way my code is written to be able to install and talk with the databases in question. I would change it, trust me, were it not the fact that this install package is a replacement to a previous package that used the MSDE installer. I have to be able to support both through code. Any suggestions are welcome but a clear and concise method to get the installer to quietly install using only the machine name is my main goal. Thanks for the help and support!
Here's a sample for setting the InstanceName in code:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{4D044938-6185-4729-8EB9-33CFA5D51993}
AppName=My Program
AppVerName=My Program 1.5
AppPublisher=My Company, Inc.
AppPublisherURL=http://www.example.com/
AppSupportURL=http://www.example.com/
AppUpdatesURL=http://www.example.com/
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
OutputBaseFilename = setup
Compression = lzma
SolidCompression = yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "SQLEXPR.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Run]
Filename: "{app}\SQLEXPR.exe" ; Parameters: "INSTANCENAME={code:MyInstanceName|'SQLEXPRESS'}";
[Code]
function MyInstanceName(Param: String): String;
begin
//This sets the value to \MSSQLSERVER.
Result := ExpandConstant('{computername}') + '\MSSQLSERVER';
end;
However, from what I've seen on the net the instance name should be MSSQLSERVER if you want it to be the default instance on the machine.
Related
I need to install SQL Server Express with a Silent Installation, using a configuration file. I created a configuration file, but when I execute the setup.exe and pass the file as parameter, I get the following error:
TITLE: SQL Server Setup failure.
SQL Server Setup has encountered the following error:
The specified value for setting 'MEDIALAYOUT' is invalid. The expected values are:
None
Core
Advanced
Full
Error code 0x84B40001.
My command to start the installation is:
setup.exe /configurationfile = C:\Users\desenv01\Desktop\SQL Server 2014\Configuration\ConfigurationFile.ini.
Could anyone help me?
I've got a Chef cookbook from GitHub. It installs SQL Server 2012 Standard Edition. Our DBA has upgraded our database code to utilize features that can only be found on SQL Server 2012 Enterprise Edition. Since this cookbook is used to generate our test environments, we must now alter this cookbook to deploy SQL Server 2012 Enterprise.
Looking at the helper.rb file in the cookbook,
require 'chef/mixin/shell_out'
module SqlServer
class Helper
extend Chef::Mixin::ShellOut
def self.firewall_rule_enabled?(rule_name=nil)
cmd = shell_out("netsh advfirewall firewall show rule \"#{rule_name}\"")
cmd.stderr.empty? && (cmd.stdout =~ /Enabled:\s*Yes/i)
end
def self.sql_server_url(version, x86_64)
if x86_64
case version
when '2008R2'
'http://download.microsoft.com/download/D/1/8/D1869DEC-2638-4854-81B7-0F37455F35EA/SQLEXPR_x64_ENU.exe'
when '2012'
'http://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x64/SQLEXPR_x64_ENU.exe'
end
else
case version
when '2008R2'
'http://download.microsoft.com/download/D/1/8/D1869DEC-2638-4854-81B7-0F37455F35EA/SQLEXPR32_x86_ENU.exe'
when '2012'
'http://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x86/SQLEXPR_x86_ENU.exe'
end
end
end
it seems that it gets the install media from
http://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x64/SQLEXPR_x64_ENU.exe
When I look on MSDN (which we have access to) I don't see that the Enterprise Edition is available to download as a .EXE, only as an .ISO.
How can I alter this cookbook to deploy from an ISO instead of a EXE, assuming that I have full access to the ISO?
Re-write second half of the server.rb
Download the ISO from repo
remote_file 'C:\LocalPath' do
source
end
Mount the ISO (you can also use Chef built-in mount resource)
powershell_script 'mount_it' do
code <<-EOH
Mount-DiskImage -ImagePath "C:\PATH\TO\ISO\FILE"
EOH
end
Use MixLib::ShellOut and get the Drive name (if you don't have it hardcoded mount with a drive letter), replace the part ##### with the volume name.
output = Mixlib::ShellOut.new('(gwmi -Class Win32_LogicalDisk | Where-Object {$_.VolumeName -eq "#####"}).DeviceID')
drive_name = output.run_command.stdout
Once you know the drive the ISO mounts on, then you will be able to find the local path to the installation .EXE file.
Install using windows_package or powershell_script block
Quoting the attributes file from your link
# Set these to specify the URL, checksum, and package name. Otherwise, the cookbook will
# use default values based on the value of node['sql_server']['version'] and the
# server architecture (x86 or x64).
default['sql_server']['server']['url'] = nil
default['sql_server']['server']['checksum'] = nil
default['sql_server']['server']['package_name'] = nil
So you just have to set those values to a local package (on a internal http server for example) in a wrapper cookbook for this cookbook to install the enterprise version.
I have a Play! Web-app that I am developing and I'm currently using an eBean YAML database. I have a 2008 SQL server that was set-up for me by a coworker that I'd like to connect to. I tried following another tutorial on this site
PlayFramework MSSQL Database error
and downloaded the jtds jar file and placed into the proper directories but I'd get an error that the driver is not found. This is my current configuration file:
db.default.url="jdbc:jtds:sqlserver://LSA5A:1433/DatabaseName=hr_site;instance=SQL2008"
db.default.driver=net.sourceforge.jtds.jdbc.Driver
db.default.user=HUser
db.default.password="RaeSusdaRasdh!123"
I have never set-up a database like this before so I'm having difficulty understanding how to set it up and how it will all works together. I didn't understand the solution from the Play! Docs for this and I'm not using MySQL so I couldn't find the help I needed online. I'm not sure what other information I need to provide but I'm running SQL server 2008, db name is SVFSSQL5A with user HRTUser and password testPass12. Thanks for your help!!
Also I have the dependency in my build file:
val appDependencies = Seq(
"net.sourceforge.jtds" % "jtds" % "1.2"
)
I did this:
Download the SQL-Driver for JDBC from Microsoft http://www.microsoft.com/de-DE/download/details.aspx?id=11774, install it and put the sqljdbc4.jar file in the lib folder ( \YourProject\lib).
application.conf file:
db.default.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
db.default.url="jdbc:sqlserver://localhost\\instancename:1433;databaseName=MyDBName"
db.default.user="sa"
db.default.password="MyPassword"
db.default.logStatements=true
Enable the TCP\IP protocoll and the port 1433 in the SQL Server Configuration Tool.
That should do the job!
Manfred
I use Wix to create 2 installers for my application, one for x86 and one for x64. I want to use InnoSetup to create one setup.exe that will conditionally launch the appropriate .msi file. It's failry straightforward to get Inno to launch the appropriate .msi:
[Files]
Source: "App.x86.msi"; DestDir: "{tmp}"; Check: not Is64BitInstallMode
Source: "App.x64.msi"; DestDir: "{tmp}"; Check: Is64BitInstallMode
[Run]
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\App.x86.msi"""; Description: "MyApp"; Check: not Is64BitInstallMode
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\App.x64.msi"""; Description: "MyApp"; Check: Is64BitInstallMode
But my problem is with the Inno GUI wizard. Namely, I don't want it. I want Inno to silently start, choose the .msi, launch it, and go away. No Inno-generated wizard. Is this possible? Is there a better tool to use to accomplish my end goal?
The InnoSetup FAQ details that since it could be abused it's not planned as a feature This example will have one dialog shown with the install button.
[Setup]
AppName=example
AppVersion=1
DefaultDirName=example
DisableStartupPrompt=Yes
DisableDirPage=Yes
DisableProgramGroupPage=Yes
DisableReadyPage=Yes
DisableFinishedPage=Yes
DisableWelcomePage=Yes
[Files]
Source: test.txt; DestDir: C:\;
[Run]
Filename: notepad.exe; Parameters: "C:\test.txt"; Description: MyApp;
If you have the files already uncompressed you could have an install.cmd file that called InnoSetup with the /silent command line parameter.
Or you could create an install.cmd that picks the correct OS based on the environment variable PROCESSOR_ARCHITECTURE.
IF %PROCESSOR_ARCHITECTURE%==x86 then (
notepad test.txt
) else (
notepad test2.txt
)
I have a silent installation of SQL Server 2005 that works great when installing SQL Server on a machine that does not have it already installed. I use the following parameters when I perform the installation:
#define SQL_SILENT "/passive /qb"
#define SQL_USERNAME "username=MyUserName"
#define SQL_COMPANYNAME "companyname=MyCompanyName"
#define SQL_ADDLOCAL "ADDLOCAL=SQL_Engine"
#define SQL_UPGRADE ""
#define SQL_DISABLENETWORKPROTOCOLS "disablenetworkprotocols=0"
#define SQL_INSTANCENAME "instancename=MYSQLINSTANCE"
#define SQL_SQLAUTOSTART "SQLAUTOSTART=1"
#define SQL_SECURITYMODE "SECURITYMODE=SQL"
#define SQL_SAPWD "SAPWD=StrongPassword"
#define SQL_SQLACCOUNT "SQLACCOUNT="""""
#define SQL_SQLPASSWORD "SQLPASSWORD="""""
It installs the instance of SQL Server Express without a problem. However, when I attempt to install SQL Server on a machine that already has another instance with components I get the following error:
"A component that you have specified in the ADD_LOCAL property is already installed. To upgrade the existing component, refer to the template.ini and set the UPGRADE property to the name of the component."
I have also tried using the UPGRADE method as per the error message
#define SQL_UPGRADE "UPGRADE=SQL_Engine INSTANCENAME=MYSQLINSTANCE"
but get the following error:
"SQL Server Setup cannot perform the upgrade because the component is not installed on the computer. To proceed, verify the component to be upgraded in currently installed, and that the component to be upgraded is specified in the ADDLOCAL property."
Does anyone have any suggestions?
Are you sure the server name / instance name are correct?
What do you see in the registry, specifically
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL
and
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\Machines
I define the Instance Name in a single place and re-use it to avoid mis-typing it elsewhere.
You manually remove the workstation components from Add/Remove programs and install it
I had a similar issue when I tried to install Management Studio on top of an existing SQL 2005 installation. The cause of this problem for me was that I had the SQL Express tools installed. Since they did not show up under Add/Remomve Programs, I uninstalled them using a Microsoft tool I downloaded called "Windows Install Clean Up". After doing this, I was able to install the SQL 2005 client tools (Management Studio, etc.) by running SqlRun_Tools.msi directly from the CD.