Skip to content

Commit

Permalink
Add sqlserverlocaldb
Browse files Browse the repository at this point in the history
  • Loading branch information
flcdrg committed Jun 8, 2021
1 parent 9d5dc56 commit 05c29a1
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
39 changes: 39 additions & 0 deletions sqlserverlocaldb/sqlserverlocaldb.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>sqlserverlocaldb</id>
<version>11.0.6020.0</version>
<packageSourceUrl>https://github.com/flcdrg/au-packages/tree/master/sqlserverlocaldb</packageSourceUrl>
<owners>flcdrg</owners>
<title>Microsoft® SQL Server® 2012 Service Pack 3 Express LocalDB</title>
<authors>Microsoft</authors>
<projectUrl>https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb</projectUrl>
<iconUrl>https://rawcdn.githack.com/ferventcoder/chocolatey-packages/59ad5e2e32c52fd2a45a9735f95a81368f9e5e85/icons/microsoft-sql-server.svg</iconUrl>
<copyright>Microsoft</copyright>
<licenseUrl>https://www.microsoft.com/en-us/download/details.aspx?id=29693</licenseUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<docsUrl>https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb</docsUrl>
<tags>SqlServer Sql Express LocalDb admin</tags>
<summary>LocalDB is a lightweight deployment option for SQL Server Express Edition.</summary>
<description>### SQL Server Express LocalDB

LocalDB is a lightweight deployment option for SQL Server Express Edition with fewer prerequisites that installs very quickly. This makes it ideal for developers who need an embedded SQL Server database for desktop applications or tools. LocalDB has all of the same programmability features as SQL Server Express, but runs in-process with applications and not as a service.

#### Integrated

LocalDB is designed to be bundled with and function as an integrated part of tools or desktop applications that need a lightweight local database runtime. This includes tools like SQL Server Data Tools, or custom developed desktop applications, or tools that need a lightweight single-user database runtime that supports full Transact-SQL functionality.

#### Simple

Apps that use LocalDB simply open a file. Once a file is opened, you get SQL Server functionality when working with that file, including things like ACID transaction support. The app that opens the file has exclusive use. It’s not intended for multi-user scenarios or to be used as a server. (If you need that, you should install SQL Server Express.)

#### Easy Acquisition

LocalDB is easy to download, install, and manage. It installs as a small shared component instead of a service.</description>

</metadata>
<files>
<file src="tools\**" target="tools" />
</files>
</package>
5 changes: 5 additions & 0 deletions sqlserverlocaldb/tools/chocolateybeforemodify.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$sqlLocalDb = 'C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SqlLocalDB.exe'

if (Test-Path $sqlLocalDb) {
& $sqlLocalDb stop
}
27 changes: 27 additions & 0 deletions sqlserverlocaldb/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

$ErrorActionPreference = 'Stop';
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url = 'https://download.microsoft.com/download/F/6/7/F673709C-D371-4A64-8BF9-C1DD73F60990/ENU/x86/SqlLocalDB.msi'
$url64 = 'https://download.microsoft.com/download/F/6/7/F673709C-D371-4A64-8BF9-C1DD73F60990/ENU/x64/SqlLocalDB.msi'

$packageArgs = @{
packageName = $env:ChocolateyPackageName
unzipLocation = $toolsDir
fileType = 'MSI'
url = $url
url64bit = $url64

softwareName = 'sqlserverlocaldb*'

checksum = '1E33A390A58EFC4923A91EFE1A44312E0EE38DAFE2D6DAC8C7367363A9987CA8'
checksumType = 'sha256'
checksum64 = '5E077F16C4F325F45A13EF4BAFC9D088F6E5EAD53AF5399977ACB1D3BB3404ED'
checksumType64= 'sha256'

# MSI
silentArgs = "/qn IACCEPTSQLLOCALDBLICENSETERMS=YES /l*v `"$($env:TEMP)\$($packageName).$($env:chocolateyPackageVersion).MsiInstall.log`""
validExitCodes= @(0, 3010)

}

Install-ChocolateyPackage @packageArgs

0 comments on commit 05c29a1

Please sign in to comment.