History Alter And Add

[Solved] History Alter And Add | Shell - Code Explorer | yomemimo.com
Question : history alter and add

Answered by : famous-fish-czna08qpnwqs

{"tags":[{"tag":"textarea","content":"CREATE SCHEMA History; \nGO\n\nALTER TABLE dbo.ClientBeacon \n ADD \n SysStartTime datetime2(0) GENERATED ALWAYS AS ROW START HIDDEN CONSTRAINT DF_ClientBeacon_SysStartTime DEFAULT SYSUTCDATETIME(),\n SysEndTime datetime2(0) GENERATED ALWAYS AS ROW END HIDDEN CONSTRAINT DF_ClientBeacon_SysEndTime DEFAULT CONVERT(datetime2 (0), '9999-12-31 23:59:59'), \n PERIOD FOR SYSTEM_TIME (SysStartTime, SysEndTime); \nGO \n\nALTER TABLE dbo.ClientBeacon SET (SYSTEM_VERSIONING = ON (HISTORY_TABLE = History.ClientBeacon));\nGO","code_language":"whatever"}]}

Source : https://dba.stackexchange.com/questions/184601/error-13542-enabling-system-versioning-for-existing-tables | Last Update : Tue, 20 Jun 23

Answers related to history alter and add

Code Explorer Popular Question For Shell