Pergunta

I have a database on sql server 2017 standard edition with in memory OLTP feature enabled, I have to move it on another disk, which is the best way to do it? are there any possible problems?

Can I manage to get rid of this OLTP feature? Somebody said to drop an re- create the db ? but how ... preserving the data ?

I have this script :

   SELECT type_desc, name, physical_name from sys.database_files  
   USE master  
   EXEC sp_detach_db mydb
   CREATE DATABASE mydb ON  
   PRIMARY ( NAME = mydbdata,  
       FILENAME = 'Y:\Database\SQLServer\DATA\mydbdata.mdf'),
   ( NAME = mydbdata2,  
       FILENAME = 'Y:\Database\SQLServer\DATA\mydbdata2.mdf'),  
   FILEGROUP FileStreamGroup1 CONTAINS FILESTREAM( NAME = mydbdata_mod1,  
       FILENAME = 'Y:\Database\SQLServer\DATA\mydbdata_mod1')  
   LOG ON  ( NAME = mydbdata_log,  
       FILENAME = 'Z:\Database\SQLServer\DATA\mydbdata_log.ldf')  
   ,  ( NAME = mydbdata_log2,  
       FILENAME = 'Z:\Database\SQLServer\DATA\mydbdata_log2.ldf')  
   FOR ATTACH  
   GO  

update: this dba.stackexchange.com/questions/52007/… replies to the question how to move , and it's ok but there are a lot of methods ... although I am confident with all methods. My fear it's all about the OLTP feature and the OLTP files

Foi útil?

Solução

Once a memory-optimized filegroup is added to a database, it's not possible to remove it. You would need to migrate your "traditional" data to a new database, then drop the original database, and rename the new to the old.

Why do you want to remove the memory-optimized filegroup?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a dba.stackexchange
scroll top