﻿PRINT N'Altering Table [dbo].[T_FELHASZNALOBELEPES]...';

DROP INDEX IF EXISTS [NCI_FelhasznaloBelepes_TanevId] ON [dbo].[T_FELHASZNALOBELEPES]
GO

CREATE NONCLUSTERED INDEX [NCI_FelhasznaloBelepes_TanevId] ON [dbo].[T_FELHASZNALOBELEPES]
(
	[C_TANEVID] ASC
)
INCLUDE([C_FELHASZNALOID],[C_GONDVISELOID]) 
WHERE ([TOROLT]='F')
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO

GO
ALTER TABLE [dbo].[T_FELHASZNALOBELEPES] DROP COLUMN [C_GUID];

GO

EXECUTE dev.uspCreateSchemaViews 'T_FELHASZNALOBELEPES'
EXECUTE dev.sp_Global_GenerateAsyncAuditTriggerAll
GO

ALTER QUEUE auditLog.[AuditQueue]
WITH ACTIVATION 
(
  STATUS =  ON,
  PROCEDURE_NAME =  auditLog.usp_AuditProcessing,
  MAX_QUEUE_READERS =  2,
  EXECUTE AS 'Kreta_tech_user'
);
GO

PRINT N'Update complete.';

GO