Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

[ci skip] Add SQL Server (on linux) as a database type - #3807

Closed
michaelhixson wants to merge 1 commit into
TechEmpower:masterfrom
michaelhixson:add-sql-server
Closed

michaelhixson wants to merge 1 commit into
TechEmpower:masterfrom
michaelhixson:add-sql-server

Conversation

@michaelhixson

Copy link
Copy Markdown
Contributor

I added [ci skip] because this requires a new techempower/tfb image, so
the travis build would fail I think.

I don't know whether this will work out because of licensing. See the
places where I put "ACCEPT_EULA=Y" in the dockerfiles. I don't know what
EULA that refers to and it's possible we won't be able to accept it.
I put this together anyway just to see if it's technically possible (it
is) and to get review feedback.

I added a variant of gemini that uses SQL Server and passes all tests.

I did not measure performance at all or do any performance tuning on the
database side.

Fixes #3786

I added [ci skip] because this requires a new techempower/tfb image, so
the travis build would fail I think.

I don't know whether this will work out because of licensing.  See the
places where I put "ACCEPT_EULA=Y" in the dockerfiles.  I don't know what
EULA that refers to and it's possible we won't be able to accept it.
I put this together anyway just to see if it's technically possible (it
is) and to get review feedback.

I added a variant of gemini that uses SQL Server and passes all tests.

I did not measure performance at all or do any performance tuning on the
database side.

Fixes TechEmpower#3786
@benaadams

Copy link
Copy Markdown
Contributor

Any reason for installing SqlServer via apt install verses using SqlServer docker container? https://hub.docker.com/r/microsoft/mssql-server-linux/

Just curious

I don't know whether this will work out because of licensing. See the places where I put "ACCEPT_EULA=Y" in the dockerfiles. I don't know what EULA that refers to and it's possible we won't be able to accept it.

Going from the SqlServer docker hub docs https://hub.docker.com/r/microsoft/mssql-server-linux/

By passing the value "Y" to the environment variable "ACCEPT_EULA", you are expressing that you have a valid and existing license for the edition and version of SQL Server that you intend to use. You also agree that your use of SQL Server software running in a Docker container image will be governed by the terms of your SQL Server license.

Is also a short EULA linked on the docker page (link at top)

If you don't specify a MSSQL_PID then you are installing Developer edition

MSSQL_PID=<your_product_id | edition_name> (default: Developer)

Info on developer edition from docker page

SQL Server Developer edition lets developers build any kind of application on top of SQL Server. It includes all the functionality of Enterprise edition, but is licensed for use as a development and test system, not as a production server.

Going from the SQL Server pricing page

Developer edition
Full-featured version of SQL Server software that allows developers to cost-effectively build, test, and demonstrate applications based on SQL Server software.

Open no level price (US$) - Free

Please note, this is not legal advice :)

use hello_world;
go
create table world (
id int not null identity(1,1) primary key,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memory optimised? (using instructions from https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/demonstration-performance-improvement-of-in-memory-oltp?view=sql-server-2017)

create database hello_world;
go
alter database hello_world add filegroup hello_world_mod contains memory_optimized_data;
alter database hello_world add file
 (name = hello_world_dir, filename= '/sqlserver/hello_world_dir')
 to filegroup hello_world_mod;
go
use hello_world;
go
create table world (
  id int not null identity(1,1) primary key nonclustered hash with (bucket_count = 70000),
  randomNumber int not null
) with (memory_optimized = on, durability = schema_and_data);
go

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could also be durability = schema_only; but then it doesn't persist changes to disk and they are lost across restarts - so that seems more niche than general purpose (e.g. cache/temp data)

@benaadams benaadams Jul 27, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should also be simple recovery mode, or the txn logs will get huge, so:

create database hello_world;
go
alter database hello_world set recovery simple; 
go
alter database hello_world add filegroup hello_world_mod contains memory_optimized_data;
alter database hello_world add file
 (name = hello_world_dir, filename= '/sqlserver/hello_world_dir')
 to filegroup hello_world_mod;
go
use hello_world;
go
create table world (
  id int not null identity(1,1) primary key nonclustered hash with (bucket_count = 70000),
  randomNumber int not null
) with (memory_optimized = on, durability = schema_and_data);
go

end;
go
create table fortune (
id int not null identity(1,1) primary key,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memory optimised?

create table fortune (
  id int not null identity(1,1) primary key nonclustered hash with (bucket_count = 100),
  message nvarchar(2048) not null
) with (memory_optimized = on, durability = schema_and_data);
go

@michaelhixson

Copy link
Copy Markdown
Contributor Author

@benaadams Thanks for the comments, by the way. I've been pulled onto another project so there might be some delay before I get back to this, but when I do I'll try out your suggestions.

@benaadams

Copy link
Copy Markdown
Contributor

@michaelhixson no probs; as its a new introduction, am sure authors would want a several iterations of CI before the figures showing up in an official round 😄 (and I assume will be a while before round17)

@michaelhixson

Copy link
Copy Markdown
Contributor Author

I'm closing this PR because of the licensing issues. I'm not confident those issues will ever resolve in our favor.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants