0

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

| improve this question | | | | |
1

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?

| improve this answer | | | | |
  • what is the best script to migrate my "traditional" data to a new database? – Gabriele D'Onufrio Jan 16 '19 at 15:52
  • 1
    There is no "best script" to do that - I'm afraid you'll have to write it yourself. Or perhaps use SSIS. – NedOtter Jan 16 '19 at 17:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.