--SECURITY FOR EQUATION ENGINE
INSERT INTO DBENVTARGET.dbo.PS_EQTN_ID_NAMAUTH
SELECT * FROM DBENVSOURCE.dbo.PS_EQTN_ID_NAMAUTH WHERE EQUATION_NAME = 'EQUATION_ENGINE_NAME'
-- ADD TABLES INTO EQUATION ENGINE
INSERT INTO DBENVTARGET.dbo.PS_EQTN_DATA_TBL
SELECT * FROM DBENVSOURCE.dbo.PS_EQTN_DATA_TBL WHERE EQTN_DATA_RECNAME IN ('TABLE_NAME1', 'TABLE_NAME2', 'TABLE_NAME3'')
-- SECURITY FOR TABLES
INSERT INTO DBENVTARGET.dbo.PS_EQTN_TB_RECAUTH
SELECT * FROM DBENVSOURCE.dbo.PS_EQTN_TB_RECAUTH WHERE EQTN_DATA_RECNAME IN ('TABLE_NAME1', 'TABLE_NAME2', 'TABLE_NAME3'')
--SECURITY FOR EQUATION_ENGINE SQL
INSERT INTO DBENVTARGET.dbo.PS_EQTN_SQ_SQLAUTH
SELECT * FROM DBENVSOURCE.dbo.PS_EQTN_SQ_SQLAUTH WHERE EQTN_OPERAND_SQL = 'SL_NAME'
AND EFFDT = '2014-07-01'
--ALL NEW EQUATION ENGINE TABLE
INSERT INTO DBENVTARGET.dbo.PS_EQUATION_TBL
SELECT * FROM DBENVSOURCE.dbo.PS_EQUATION_TBL WHERE EFFDT = '2014-07-01'
AND EQUATION_NAME = 'EQN_NAME'
--ALL NEW EQUATION ENGINE CODE
INSERT INTO DBENVTARGET.dbo.PS_EQUATION_DTL
SELECT * FROM DBENVSOURCE.dbo.PS_EQUATION_DTL WHERE EFFDT = '2014-07-01'
AND EQUATION_NAME = 'EQN_NAME'