Attached is a full demo on how to do it. (For some reasons, the forum did not agree when I included the code directly in the post.) You will have to change the file paths.
And, no, there is no issue with the date columns or the computed columns.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a SQL 2019 SQL server and due to a lot of reasons we want to move all our tables to a new File group and file. The regular tables are easy to move but I couldn't figure a way out to move system-versioned tables with a computed fields and a couple of fields with a datatype that is set to be GENERATED ALWAYS AS ROW START/END.
is there a way to move these tables?
Thanks in advance
Attached is a full demo on how to do it. (For some reasons, the forum did not agree when I included the code directly in the post.) You will have to change the file paths.
And, no, there is no issue with the date columns or the computed columns.
The normal way to move a table is
CREATE CLUSTERED INDEX ix ON tbl(col1, col2) WITH (DROP_EXISTING = ON) ON NewFileGroup
I don't have the time to run a test myself right now, but I can't see why this would not work for a temporal table? Just keep in mind that you have two tables.