This page was last edited on July 17, 2020, at 15:52.
Comments or questions about this documentation? Contact us for support!
Purpose: This page presents the SQL queries used for set-based maintenance of the UCS database on an MS SQL RDBMS.
See Archiving and Pruning the DB for prerequisites. In particular, before using these queries you must first run archiving from UCS Manager.
EXEC sp_addlinkedserver @server = N'bsgenucsdbarch', @srvproduct=N'SQL Server'
select count(*) from bsgenucsdbarch.UCSARCH.dbo.interaction;
In this example,
EXEC sp_dropserver 'bsgenucsdbarch', null;
The link can be kept permanently and will not affect UCS operations. But when the link is no longer used, you may wish to drop it for security concerns.
insert into bsgenucsdb.UCSArch.dbo.interaction select * from interaction_arch; insert into bsgenucsdb.UCSArch.dbo.emailin select * from emailin_arch; insert into bsgenucsdb.UCSArch.dbo.emailout select * from emailout_arch; insert into bsgenucsdb.UCSArch.dbo.phonecall select * from phonecall_arch; insert into bsgenucsdb.UCSArch.dbo.callback select * from callback_arch; insert into bsgenucsdb.UCSArch.dbo.chat select * from chat_arch; insert into bsgenucsdb.UCSArch.dbo.ixncontent select * from ixncontent_arch; insert into bsgenucsdb.UCSArch.dbo.ixnContentSentReceived select * from ixnContentSentReceived_arch; insert into bsgenucsdb.UCSArch.dbo.document select * from document_arch; insert into bsgenucsdb.UCSArch.dbo.cobrowseurl select * from cobrowseurl_arch; insert into bsgenucsdb.UCSArch.dbo.attachment select * from attachment_arch;
drop table interaction_arch; drop table emailin_arch; drop table emailout_arch; drop table phonecall_arch; drop table callback_arch; drop table cobrowseurl_arch; drop table chat_arch; drop table attachment_arch; drop table ixncontent_arch; drop table ixnContentSentReceived_arch; drop table document_arch;
Archiving is now complete. Return to Archiving and Pruning the DB for descriptions of limitations and failure recovery methods.