Does SQL Sever support inmemory database?How do I perform an IF…THEN in an SQL SELECT?Add a column with a default value to an existing table in SQL ServerHow to return only the Date from a SQL Server DateTime datatypeHow to check if a column exists in a SQL Server table?How to concatenate text from multiple rows into a single text string in SQL server?Parameterize an SQL IN clauseLEFT JOIN vs. LEFT OUTER JOIN in SQL ServerInserting multiple rows in a single SQL query?How do I UPDATE from a SELECT in SQL Server?Get size of all tables in database

How can I raise concerns with a new DM about XP splitting?

Is a naturally all "male" species possible?

Can I use my Chinese passport to enter China after I acquired another citizenship?

Bob has never been a M before

Can a Gentile theist be saved?

Could solar power be utilized and substitute coal in the 19th century?

Superhero words!

Installing PowerShell on 32-bit Kali OS fails

Calculating the number of days between 2 dates in Excel

Why does this part of the Space Shuttle launch pad seem to be floating in air?

What was required to accept "troll"?

Visiting the UK as unmarried couple

My boss asked me to take a one-day class, then signs it up as a day off

Was the picture area of a CRT a parallelogram (instead of a true rectangle)?

Is there enough fresh water in the world to eradicate the drinking water crisis?

A workplace installs custom certificates on personal devices, can this be used to decrypt HTTPS traffic?

Can I rely on these GitHub repository files?

How will losing mobility of one hand affect my career as a programmer?

Indicating multiple different modes of speech (fantasy language or telepathy)

What (else) happened July 1st 1858 in London?

The most efficient algorithm to find all possible integer pairs which sum to a given integer

Teaching indefinite integrals that require special-casing

Simulating a probability of 1 of 2^N with less than N random bits

Simple recursive Sudoku solver



Does SQL Sever support inmemory database?


How do I perform an IF…THEN in an SQL SELECT?Add a column with a default value to an existing table in SQL ServerHow to return only the Date from a SQL Server DateTime datatypeHow to check if a column exists in a SQL Server table?How to concatenate text from multiple rows into a single text string in SQL server?Parameterize an SQL IN clauseLEFT JOIN vs. LEFT OUTER JOIN in SQL ServerInserting multiple rows in a single SQL query?How do I UPDATE from a SELECT in SQL Server?Get size of all tables in database













0















I have basically a testing scenario, where I



  1. Create database

  2. Fill it with some data

  3. Execute the business logic to be tested, which modifies the data. I don't own the business logic implementation, not the DB schema. I must test what is already there.

  4. Assert the data are changed as expected

  5. Delete the database

Does SQL Server support something like that in memory only, so that I can seed it up? Obviously I don't need persistence










share|improve this question
























  • I don't know if SQL Server has an in-memory only version. But, you may look into using a cache layer on top of SQL Server. Or, for a pure in memory database, read about things like H2.

    – Tim Biegeleisen
    Mar 8 at 8:26











  • H2 does not help, because I don't own the existing implementation of the business logic

    – Liero
    Mar 8 at 8:28











  • That's the wrong question. SQL Server has in-memory tables since SQL Server 2014. All versions have temporary tables and table variables. All of those things would cover the bullet points. None of these are relevant for testing though (except perhaps for temporary tables)

    – Panagiotis Kanavos
    Mar 8 at 8:28












  • @PanagiotisKanavos I recant my earlier comment, but for integration testing, an actual SQL Server instance is precisely against what the OP should be running those tests. For unit testing, the database can be mocked.

    – Tim Biegeleisen
    Mar 8 at 8:31






  • 1





    @Liero another possibility would be to create the test database, detach it and use the files as a template. Each time you want a new test database, copy them to a new location followed by an ATTACH DATABASE. This will be faster than RESTORE because it won't have a recovery phase

    – Panagiotis Kanavos
    Mar 8 at 8:46















0















I have basically a testing scenario, where I



  1. Create database

  2. Fill it with some data

  3. Execute the business logic to be tested, which modifies the data. I don't own the business logic implementation, not the DB schema. I must test what is already there.

  4. Assert the data are changed as expected

  5. Delete the database

Does SQL Server support something like that in memory only, so that I can seed it up? Obviously I don't need persistence










share|improve this question
























  • I don't know if SQL Server has an in-memory only version. But, you may look into using a cache layer on top of SQL Server. Or, for a pure in memory database, read about things like H2.

    – Tim Biegeleisen
    Mar 8 at 8:26











  • H2 does not help, because I don't own the existing implementation of the business logic

    – Liero
    Mar 8 at 8:28











  • That's the wrong question. SQL Server has in-memory tables since SQL Server 2014. All versions have temporary tables and table variables. All of those things would cover the bullet points. None of these are relevant for testing though (except perhaps for temporary tables)

    – Panagiotis Kanavos
    Mar 8 at 8:28












  • @PanagiotisKanavos I recant my earlier comment, but for integration testing, an actual SQL Server instance is precisely against what the OP should be running those tests. For unit testing, the database can be mocked.

    – Tim Biegeleisen
    Mar 8 at 8:31






  • 1





    @Liero another possibility would be to create the test database, detach it and use the files as a template. Each time you want a new test database, copy them to a new location followed by an ATTACH DATABASE. This will be faster than RESTORE because it won't have a recovery phase

    – Panagiotis Kanavos
    Mar 8 at 8:46













0












0








0








I have basically a testing scenario, where I



  1. Create database

  2. Fill it with some data

  3. Execute the business logic to be tested, which modifies the data. I don't own the business logic implementation, not the DB schema. I must test what is already there.

  4. Assert the data are changed as expected

  5. Delete the database

Does SQL Server support something like that in memory only, so that I can seed it up? Obviously I don't need persistence










share|improve this question
















I have basically a testing scenario, where I



  1. Create database

  2. Fill it with some data

  3. Execute the business logic to be tested, which modifies the data. I don't own the business logic implementation, not the DB schema. I must test what is already there.

  4. Assert the data are changed as expected

  5. Delete the database

Does SQL Server support something like that in memory only, so that I can seed it up? Obviously I don't need persistence







sql-server integration-testing in-memory-database database-testing






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 at 9:07









jarlh

29.8k52138




29.8k52138










asked Mar 8 at 8:21









LieroLiero

9,807745116




9,807745116












  • I don't know if SQL Server has an in-memory only version. But, you may look into using a cache layer on top of SQL Server. Or, for a pure in memory database, read about things like H2.

    – Tim Biegeleisen
    Mar 8 at 8:26











  • H2 does not help, because I don't own the existing implementation of the business logic

    – Liero
    Mar 8 at 8:28











  • That's the wrong question. SQL Server has in-memory tables since SQL Server 2014. All versions have temporary tables and table variables. All of those things would cover the bullet points. None of these are relevant for testing though (except perhaps for temporary tables)

    – Panagiotis Kanavos
    Mar 8 at 8:28












  • @PanagiotisKanavos I recant my earlier comment, but for integration testing, an actual SQL Server instance is precisely against what the OP should be running those tests. For unit testing, the database can be mocked.

    – Tim Biegeleisen
    Mar 8 at 8:31






  • 1





    @Liero another possibility would be to create the test database, detach it and use the files as a template. Each time you want a new test database, copy them to a new location followed by an ATTACH DATABASE. This will be faster than RESTORE because it won't have a recovery phase

    – Panagiotis Kanavos
    Mar 8 at 8:46

















  • I don't know if SQL Server has an in-memory only version. But, you may look into using a cache layer on top of SQL Server. Or, for a pure in memory database, read about things like H2.

    – Tim Biegeleisen
    Mar 8 at 8:26











  • H2 does not help, because I don't own the existing implementation of the business logic

    – Liero
    Mar 8 at 8:28











  • That's the wrong question. SQL Server has in-memory tables since SQL Server 2014. All versions have temporary tables and table variables. All of those things would cover the bullet points. None of these are relevant for testing though (except perhaps for temporary tables)

    – Panagiotis Kanavos
    Mar 8 at 8:28












  • @PanagiotisKanavos I recant my earlier comment, but for integration testing, an actual SQL Server instance is precisely against what the OP should be running those tests. For unit testing, the database can be mocked.

    – Tim Biegeleisen
    Mar 8 at 8:31






  • 1





    @Liero another possibility would be to create the test database, detach it and use the files as a template. Each time you want a new test database, copy them to a new location followed by an ATTACH DATABASE. This will be faster than RESTORE because it won't have a recovery phase

    – Panagiotis Kanavos
    Mar 8 at 8:46
















I don't know if SQL Server has an in-memory only version. But, you may look into using a cache layer on top of SQL Server. Or, for a pure in memory database, read about things like H2.

– Tim Biegeleisen
Mar 8 at 8:26





I don't know if SQL Server has an in-memory only version. But, you may look into using a cache layer on top of SQL Server. Or, for a pure in memory database, read about things like H2.

– Tim Biegeleisen
Mar 8 at 8:26













H2 does not help, because I don't own the existing implementation of the business logic

– Liero
Mar 8 at 8:28





H2 does not help, because I don't own the existing implementation of the business logic

– Liero
Mar 8 at 8:28













That's the wrong question. SQL Server has in-memory tables since SQL Server 2014. All versions have temporary tables and table variables. All of those things would cover the bullet points. None of these are relevant for testing though (except perhaps for temporary tables)

– Panagiotis Kanavos
Mar 8 at 8:28






That's the wrong question. SQL Server has in-memory tables since SQL Server 2014. All versions have temporary tables and table variables. All of those things would cover the bullet points. None of these are relevant for testing though (except perhaps for temporary tables)

– Panagiotis Kanavos
Mar 8 at 8:28














@PanagiotisKanavos I recant my earlier comment, but for integration testing, an actual SQL Server instance is precisely against what the OP should be running those tests. For unit testing, the database can be mocked.

– Tim Biegeleisen
Mar 8 at 8:31





@PanagiotisKanavos I recant my earlier comment, but for integration testing, an actual SQL Server instance is precisely against what the OP should be running those tests. For unit testing, the database can be mocked.

– Tim Biegeleisen
Mar 8 at 8:31




1




1





@Liero another possibility would be to create the test database, detach it and use the files as a template. Each time you want a new test database, copy them to a new location followed by an ATTACH DATABASE. This will be faster than RESTORE because it won't have a recovery phase

– Panagiotis Kanavos
Mar 8 at 8:46





@Liero another possibility would be to create the test database, detach it and use the files as a template. Each time you want a new test database, copy them to a new location followed by an ATTACH DATABASE. This will be faster than RESTORE because it won't have a recovery phase

– Panagiotis Kanavos
Mar 8 at 8:46












1 Answer
1






active

oldest

votes


















1














SQL Server has in-memory OLTP. This feature is quite close to what you are looking into. Starting SQL Server 2016 SP1 it is possible in all editions, including sql express.




Obviously I don't need persistence




The option DURABILITY=SCHEMA_ONLY preserves only the metadata. Such a scenario can be optimal for staging tables because it results in a lock/latch/log free way of data load. Obviously, the table will not survive instance/service restart.



CREATE DATABASE [Test]
GO
-- Memory Optimized FG
ALTER DATABASE [Test] ADD FILEGROUP [MemoryOptimizedFG] CONTAINS MEMORY_OPTIMIZED_DATA
ALTER DATABASE [Test] ADD FILE (name='Test1', filename='D:SQLDataTestInMemory') TO FILEGROUP [MemoryOptimizedFG]
GO

CREATE TABLE dbo.[TestTable] (
ID int NOT NULL IDENTITY (1, 1) PRIMARY KEY NONCLUSTERED,
ColumnID int NOT NULL,
Description varchar(100) NOT NULL,
dateAndTime datetime NOT NULL
) WITH (MEMORY_OPTIMIZED=ON, DURABILITY=SCHEMA_ONLY)
GO


References:



  • https://www.red-gate.com/simple-talk/sql/database-administration/in-memory-oltp-understanding-memory-optimized-tables/

  • https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/in-memory-oltp-in-memory-optimization?view=sql-server-2017





share|improve this answer























  • This is almost what I'm looking for, but It doesn't help me with cleaning data after the test is finished, so I need to delete and recreate the DB anyway

    – Liero
    Mar 8 at 8:44











  • @Liero, for deletion and recreation you have steps 1 and 5 in your original testing scenario ;)

    – Alexander Volok
    Mar 8 at 8:47







  • 1





    @Liero what's the problem with that? What are you trying to avoid? DROP & CREATE don't take that long. Why would you need a transient database for this?

    – Panagiotis Kanavos
    Mar 8 at 8:48











  • Perhaps, you will want to keep an empty database, but delete/recreate in-memory objects in it

    – Alexander Volok
    Mar 8 at 8:48












  • @PanagiotisKanavos: Not really a problem, but if there was real inmemory db, it would make it much simpler and faster (there is a lot of tests) Since there isn't I will go with these approach probably. However, the DB scripts are given and I don't want to modify them. Let me check if I can ALTER TABLE WITH MEMORY_OPTIMIZED=ON

    – Liero
    Mar 8 at 8:59










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55059223%2fdoes-sql-sever-support-inmemory-database%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














SQL Server has in-memory OLTP. This feature is quite close to what you are looking into. Starting SQL Server 2016 SP1 it is possible in all editions, including sql express.




Obviously I don't need persistence




The option DURABILITY=SCHEMA_ONLY preserves only the metadata. Such a scenario can be optimal for staging tables because it results in a lock/latch/log free way of data load. Obviously, the table will not survive instance/service restart.



CREATE DATABASE [Test]
GO
-- Memory Optimized FG
ALTER DATABASE [Test] ADD FILEGROUP [MemoryOptimizedFG] CONTAINS MEMORY_OPTIMIZED_DATA
ALTER DATABASE [Test] ADD FILE (name='Test1', filename='D:SQLDataTestInMemory') TO FILEGROUP [MemoryOptimizedFG]
GO

CREATE TABLE dbo.[TestTable] (
ID int NOT NULL IDENTITY (1, 1) PRIMARY KEY NONCLUSTERED,
ColumnID int NOT NULL,
Description varchar(100) NOT NULL,
dateAndTime datetime NOT NULL
) WITH (MEMORY_OPTIMIZED=ON, DURABILITY=SCHEMA_ONLY)
GO


References:



  • https://www.red-gate.com/simple-talk/sql/database-administration/in-memory-oltp-understanding-memory-optimized-tables/

  • https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/in-memory-oltp-in-memory-optimization?view=sql-server-2017





share|improve this answer























  • This is almost what I'm looking for, but It doesn't help me with cleaning data after the test is finished, so I need to delete and recreate the DB anyway

    – Liero
    Mar 8 at 8:44











  • @Liero, for deletion and recreation you have steps 1 and 5 in your original testing scenario ;)

    – Alexander Volok
    Mar 8 at 8:47







  • 1





    @Liero what's the problem with that? What are you trying to avoid? DROP & CREATE don't take that long. Why would you need a transient database for this?

    – Panagiotis Kanavos
    Mar 8 at 8:48











  • Perhaps, you will want to keep an empty database, but delete/recreate in-memory objects in it

    – Alexander Volok
    Mar 8 at 8:48












  • @PanagiotisKanavos: Not really a problem, but if there was real inmemory db, it would make it much simpler and faster (there is a lot of tests) Since there isn't I will go with these approach probably. However, the DB scripts are given and I don't want to modify them. Let me check if I can ALTER TABLE WITH MEMORY_OPTIMIZED=ON

    – Liero
    Mar 8 at 8:59















1














SQL Server has in-memory OLTP. This feature is quite close to what you are looking into. Starting SQL Server 2016 SP1 it is possible in all editions, including sql express.




Obviously I don't need persistence




The option DURABILITY=SCHEMA_ONLY preserves only the metadata. Such a scenario can be optimal for staging tables because it results in a lock/latch/log free way of data load. Obviously, the table will not survive instance/service restart.



CREATE DATABASE [Test]
GO
-- Memory Optimized FG
ALTER DATABASE [Test] ADD FILEGROUP [MemoryOptimizedFG] CONTAINS MEMORY_OPTIMIZED_DATA
ALTER DATABASE [Test] ADD FILE (name='Test1', filename='D:SQLDataTestInMemory') TO FILEGROUP [MemoryOptimizedFG]
GO

CREATE TABLE dbo.[TestTable] (
ID int NOT NULL IDENTITY (1, 1) PRIMARY KEY NONCLUSTERED,
ColumnID int NOT NULL,
Description varchar(100) NOT NULL,
dateAndTime datetime NOT NULL
) WITH (MEMORY_OPTIMIZED=ON, DURABILITY=SCHEMA_ONLY)
GO


References:



  • https://www.red-gate.com/simple-talk/sql/database-administration/in-memory-oltp-understanding-memory-optimized-tables/

  • https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/in-memory-oltp-in-memory-optimization?view=sql-server-2017





share|improve this answer























  • This is almost what I'm looking for, but It doesn't help me with cleaning data after the test is finished, so I need to delete and recreate the DB anyway

    – Liero
    Mar 8 at 8:44











  • @Liero, for deletion and recreation you have steps 1 and 5 in your original testing scenario ;)

    – Alexander Volok
    Mar 8 at 8:47







  • 1





    @Liero what's the problem with that? What are you trying to avoid? DROP & CREATE don't take that long. Why would you need a transient database for this?

    – Panagiotis Kanavos
    Mar 8 at 8:48











  • Perhaps, you will want to keep an empty database, but delete/recreate in-memory objects in it

    – Alexander Volok
    Mar 8 at 8:48












  • @PanagiotisKanavos: Not really a problem, but if there was real inmemory db, it would make it much simpler and faster (there is a lot of tests) Since there isn't I will go with these approach probably. However, the DB scripts are given and I don't want to modify them. Let me check if I can ALTER TABLE WITH MEMORY_OPTIMIZED=ON

    – Liero
    Mar 8 at 8:59













1












1








1







SQL Server has in-memory OLTP. This feature is quite close to what you are looking into. Starting SQL Server 2016 SP1 it is possible in all editions, including sql express.




Obviously I don't need persistence




The option DURABILITY=SCHEMA_ONLY preserves only the metadata. Such a scenario can be optimal for staging tables because it results in a lock/latch/log free way of data load. Obviously, the table will not survive instance/service restart.



CREATE DATABASE [Test]
GO
-- Memory Optimized FG
ALTER DATABASE [Test] ADD FILEGROUP [MemoryOptimizedFG] CONTAINS MEMORY_OPTIMIZED_DATA
ALTER DATABASE [Test] ADD FILE (name='Test1', filename='D:SQLDataTestInMemory') TO FILEGROUP [MemoryOptimizedFG]
GO

CREATE TABLE dbo.[TestTable] (
ID int NOT NULL IDENTITY (1, 1) PRIMARY KEY NONCLUSTERED,
ColumnID int NOT NULL,
Description varchar(100) NOT NULL,
dateAndTime datetime NOT NULL
) WITH (MEMORY_OPTIMIZED=ON, DURABILITY=SCHEMA_ONLY)
GO


References:



  • https://www.red-gate.com/simple-talk/sql/database-administration/in-memory-oltp-understanding-memory-optimized-tables/

  • https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/in-memory-oltp-in-memory-optimization?view=sql-server-2017





share|improve this answer













SQL Server has in-memory OLTP. This feature is quite close to what you are looking into. Starting SQL Server 2016 SP1 it is possible in all editions, including sql express.




Obviously I don't need persistence




The option DURABILITY=SCHEMA_ONLY preserves only the metadata. Such a scenario can be optimal for staging tables because it results in a lock/latch/log free way of data load. Obviously, the table will not survive instance/service restart.



CREATE DATABASE [Test]
GO
-- Memory Optimized FG
ALTER DATABASE [Test] ADD FILEGROUP [MemoryOptimizedFG] CONTAINS MEMORY_OPTIMIZED_DATA
ALTER DATABASE [Test] ADD FILE (name='Test1', filename='D:SQLDataTestInMemory') TO FILEGROUP [MemoryOptimizedFG]
GO

CREATE TABLE dbo.[TestTable] (
ID int NOT NULL IDENTITY (1, 1) PRIMARY KEY NONCLUSTERED,
ColumnID int NOT NULL,
Description varchar(100) NOT NULL,
dateAndTime datetime NOT NULL
) WITH (MEMORY_OPTIMIZED=ON, DURABILITY=SCHEMA_ONLY)
GO


References:



  • https://www.red-gate.com/simple-talk/sql/database-administration/in-memory-oltp-understanding-memory-optimized-tables/

  • https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/in-memory-oltp-in-memory-optimization?view=sql-server-2017






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 8 at 8:40









Alexander VolokAlexander Volok

3,492925




3,492925












  • This is almost what I'm looking for, but It doesn't help me with cleaning data after the test is finished, so I need to delete and recreate the DB anyway

    – Liero
    Mar 8 at 8:44











  • @Liero, for deletion and recreation you have steps 1 and 5 in your original testing scenario ;)

    – Alexander Volok
    Mar 8 at 8:47







  • 1





    @Liero what's the problem with that? What are you trying to avoid? DROP & CREATE don't take that long. Why would you need a transient database for this?

    – Panagiotis Kanavos
    Mar 8 at 8:48











  • Perhaps, you will want to keep an empty database, but delete/recreate in-memory objects in it

    – Alexander Volok
    Mar 8 at 8:48












  • @PanagiotisKanavos: Not really a problem, but if there was real inmemory db, it would make it much simpler and faster (there is a lot of tests) Since there isn't I will go with these approach probably. However, the DB scripts are given and I don't want to modify them. Let me check if I can ALTER TABLE WITH MEMORY_OPTIMIZED=ON

    – Liero
    Mar 8 at 8:59

















  • This is almost what I'm looking for, but It doesn't help me with cleaning data after the test is finished, so I need to delete and recreate the DB anyway

    – Liero
    Mar 8 at 8:44











  • @Liero, for deletion and recreation you have steps 1 and 5 in your original testing scenario ;)

    – Alexander Volok
    Mar 8 at 8:47







  • 1





    @Liero what's the problem with that? What are you trying to avoid? DROP & CREATE don't take that long. Why would you need a transient database for this?

    – Panagiotis Kanavos
    Mar 8 at 8:48











  • Perhaps, you will want to keep an empty database, but delete/recreate in-memory objects in it

    – Alexander Volok
    Mar 8 at 8:48












  • @PanagiotisKanavos: Not really a problem, but if there was real inmemory db, it would make it much simpler and faster (there is a lot of tests) Since there isn't I will go with these approach probably. However, the DB scripts are given and I don't want to modify them. Let me check if I can ALTER TABLE WITH MEMORY_OPTIMIZED=ON

    – Liero
    Mar 8 at 8:59
















This is almost what I'm looking for, but It doesn't help me with cleaning data after the test is finished, so I need to delete and recreate the DB anyway

– Liero
Mar 8 at 8:44





This is almost what I'm looking for, but It doesn't help me with cleaning data after the test is finished, so I need to delete and recreate the DB anyway

– Liero
Mar 8 at 8:44













@Liero, for deletion and recreation you have steps 1 and 5 in your original testing scenario ;)

– Alexander Volok
Mar 8 at 8:47






@Liero, for deletion and recreation you have steps 1 and 5 in your original testing scenario ;)

– Alexander Volok
Mar 8 at 8:47





1




1





@Liero what's the problem with that? What are you trying to avoid? DROP & CREATE don't take that long. Why would you need a transient database for this?

– Panagiotis Kanavos
Mar 8 at 8:48





@Liero what's the problem with that? What are you trying to avoid? DROP & CREATE don't take that long. Why would you need a transient database for this?

– Panagiotis Kanavos
Mar 8 at 8:48













Perhaps, you will want to keep an empty database, but delete/recreate in-memory objects in it

– Alexander Volok
Mar 8 at 8:48






Perhaps, you will want to keep an empty database, but delete/recreate in-memory objects in it

– Alexander Volok
Mar 8 at 8:48














@PanagiotisKanavos: Not really a problem, but if there was real inmemory db, it would make it much simpler and faster (there is a lot of tests) Since there isn't I will go with these approach probably. However, the DB scripts are given and I don't want to modify them. Let me check if I can ALTER TABLE WITH MEMORY_OPTIMIZED=ON

– Liero
Mar 8 at 8:59





@PanagiotisKanavos: Not really a problem, but if there was real inmemory db, it would make it much simpler and faster (there is a lot of tests) Since there isn't I will go with these approach probably. However, the DB scripts are given and I don't want to modify them. Let me check if I can ALTER TABLE WITH MEMORY_OPTIMIZED=ON

– Liero
Mar 8 at 8:59



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55059223%2fdoes-sql-sever-support-inmemory-database%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

Understanding generators in Python2019 Community Moderator ElectionGenerator function not working pythonFor loop not executing two timesGenerators - Printing generated valuesWhy can a python generator only be used once?What exactly do generators do?What does the “yield” keyword do?What does “list comprehension” mean? How does it work and how can I use it?sklearn Kfold acces single fold instead of for loopIs a generator the callable? Which is the generator?Apply Border To Range Of Cells Using OpenpyxlCalling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Understanding slice notationUnderstanding Python super() with __init__() methodsDoes Python have a string 'contains' substring method?

How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page