Produced by Araxis Merge on 10/26/2017 10:43:16 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | OSCIF_BMS_v2_iter 2_September_2017.zip\BMS_Cand\BMS_Build_C72898\BMS_Source-BuildC72898.zip\C72898\Source\Sources\Database\CreationScripts\BMS_DS\4.StoredProcedures | dbo.sp_infoworld_report_meta.StoredProcedure.sql | Wed Oct 23 12:51:14 2013 UTC |
| 2 | OSCIF_BMS_v2_iter 2_September_2017.zip\BMS_Cand\BMS_Build_C72898\BMS_Source-BuildC72898.zip\C72898\Source\Sources\Database\CreationScripts\BMS_DS\4.StoredProcedures | dbo.sp_infoworld_report_meta.StoredProcedure.sql | Thu Oct 26 15:55:41 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 154 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | /****** Ob ject: Sto redProcedu re [dbo].[ sp_infowor ld_report_ meta] S cript Date : 03/21/20 12 15:21:3 8 ******/ | |
| 2 | IF EXISTS (SELECT * FROM sys. objects WH ERE object _id = OBJE CT_ID(N'[d bo].[sp_in foworld_re port_meta] ') AND typ e in (N'P' , N'PC')) | |
| 3 | DROP PROCE DURE [dbo] .[sp_infow orld_repor t_meta] | |
| 4 | GO | |
| 5 | ||
| 6 | SET ANSI_N ULLS ON | |
| 7 | GO | |
| 8 | SET QUOTED _IDENTIFIE R ON | |
| 9 | GO | |
| 10 | ||
| 11 | CREATE PRO CEDURE [db o].[sp_inf oworld_rep ort_meta] | |
| 12 | @S ERVER_PREF IX VARCHAR (100), | |
| 13 | @L INKED_SERV ER_NAME VA RCHAR(100) , | |
| 14 | @S OURCE_DB V ARCHAR(100 ), | |
| 15 | @T ABLE_NAME VARCHAR(10 0), | |
| 16 | @P K_COLUMNS VARCHAR(10 00), | |
| 17 | @D ESTINATION _SCHEMA VA RCHAR(100) , | |
| 18 | @O N_LOCAL_SE RVER BIT, | |
| 19 | @S OURCE_SCHE MA VARCHAR (100)=null | |
| 20 | AS | |
| 21 | BEGIN | |
| 22 | ||
| 23 | SE T NOCOUNT ON; | |
| 24 | ||
| 25 | DE CLARE @SQL
|
|
| 26 | DE CLARE @CRL F char(2) | |
| 27 | SE T @CRLF = char(10) | |
| 28 | ||
| 29 | DE CLARE @aMo difyColumn varchar(2 56), @aFla gDelete va rchar(256) | |
| 30 | SE LECT @aMod ifyColumn = '_ssis_t imestamp', @aFlagDel ete = '_is Deleted'; | |
| 31 | ||
| 32 | de clare @sho wComments_ log VARCHA R(MAX) | |
| 33 | SE LECT @show Comments_l og = '0' - -dbo.fn_CF G_GetCSVSf orCurrentD omainByCod e('showCom ments_log' ) | |
| 34 | ||
| 35 | if @source_s chema is n ull | |
| 36 | set @source_sc hema='dbo' | |
| 37 | --call sp sp_inf oworld_ssi s_meta | |
| 38 | SE T @SQL = ' EXEC ' | |
| 39 | IF @ON_LOCA L_SERVER = 0 | |
| 40 | BE GIN | |
| 41 | SET @SQL = @SQ L + '[' + @LINKED_SE RVER_NAME + '].' | |
| 42 | EN D | |
| 43 | SE T @SQL = @ SQL + '[' + + @SOURC E_DB + ']. dbo.[sp_in foworld_ss is_meta] ' '' + | |
| 44 | @TABLE _NAME + '' ', ''' + @ PK_COLUMNS +''', ''' + @aModif yColumn + ''', ''_ss isdel'', ' '_tgg_ssis _insert'', ''_tgg_ss is_delete' ', ''_tgg_ ssis_modif y'', 0,' | |
| 45 | +@show Comments_l og+', '''+ @source_sc hema+''''; | |
| 46 | EX EC (@SQL); | |
| 47 | ||
| 48 | IF NOT EXIST S ( | |
| 49 | SELE CT 1 | |
| 50 | FROM sysobject s a JOIN s yscolumns b | |
| 51 | on a.id = b.id an d | |
| 52 | a.ty pe = 'U' a nd | |
| 53 | a.na me = @SERV ER_PREFIX + @TABLE_N AME and | |
| 54 | b.na me = @aMod ifyColumn | |
| 55 | ) | |
| 56 | BE GIN | |
| 57 | set @S QL = 'alte r table [' + @DESTIN ATION_SCHE MA + '].[' + @SERVER _PREFIX + @TABLE_NAM E + '] add [' + @aMo difyColumn + '] date time defau lt current _timestamp '; | |
| 58 | exec s p_executes ql @SQL; | |
| 59 | ||
| 60 | set @S QL = 'crea te index i dx_ssis_mo dify on [' + @DESTIN ATION_SCHE MA + '].[' + @SERVER _PREFIX + @TABLE_NAM E + '] ([' + @aModif yColumn + '])'; | |
| 61 | exec s p_executes ql @SQL; | |
| 62 | EN D | |
| 63 | ||
| 64 | IF NOT EXIST S ( | |
| 65 | SELE CT 1 | |
| 66 | FROM sysobject s a JOIN s yscolumns b | |
| 67 | on a.id = b.id an d | |
| 68 | a.ty pe = 'U' a nd | |
| 69 | a.na me = @SERV ER_PREFIX + @TABLE_N AME and | |
| 70 | b.na me = @aFla gDelete | |
| 71 | ) | |
| 72 | BE GIN | |
| 73 | set @S QL = 'alte r table [' + @DESTIN ATION_SCHE MA + '].[' + @SERVER _PREFIX + @TABLE_NAM E + '] add [' + @aFl agDelete + '] bit de fault 0'; | |
| 74 | exec s p_executes ql @SQL; | |
| 75 | EN D | |
| 76 | ||
| 77 | END | |
| 78 | GO |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.