to view AECI sample scripts.

advertisement
View: AECI_CUSTOMS_INVENTORY
CREATE view [dbo].[AECI_CUSTOMS_INVENTORY]
as
-- AECI CUSTOM -- Use this view to identify customizations to PDS base system in order
-- to update the exclude list in VistaFresh and avoid overwriting
-- customizations during PTF installation. Files that have been customized
-- for AECI purposes must contain the string 'AECI' somewhere in them to work.
-- VF Files:
-DEVHRMS - \\XXXXX-DEV\E$\PDS\VistaFresh\definitions\DEVHRMSAllVista.xml
-PRODHRMS - \\XXXXX-PRD\E$\PDS\VistaFresh\definitions\PRODHRMSAllVista.xml
-- Look for the <LEAVEFILES> section ||
SELECT Name, 'Trigger' type
FROM sys.triggers
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%aeci%'
and name not LIKE '%aeci%' -- exclude AECI-specific custom tables
union
SELECT Name, 'Stored Procedure'
FROM sys.procedures
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%aeci%'
and name not LIKE '%aeci%' -- exclude AECI-specific custom procedures
union
SELECT Name, 'View'
FROM sys.views
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%aeci%'
and name not LIKE '%aeci%' -- exclude AECI-specific custom views
View: AECI_CUSTOMS_INVENTORY_XA
CREATE view [dbo].[AECI_CUSTOMS_INVENTORY_XA]
as
----------
AECI CUSTOM Use this view to identify customizations to PDS XA base system in order
to update the exclude list in VistaFresh and avoid overwriting
customizations during PTF installation. Files that have been customized
for AECI purposes must contain the string 'AECI' somewhere in them to work.
VF Files:
DEVHRMS - \\XXXXX-DEV\E$\PDS\VistaFresh\definitions\DEVHRMSAllVista.xml
PRODHRMS - \\XXXXX-PRD\E$\PDS\VistaFresh\definitions\PRODHRMSAllVista.xml
Look for the <LEAVEFILES> section ||
-- EXTERNAL APPLICANTS DB CUSTOMS
SELECT a.Name, 'Trigger' type
FROM [<external database IP>].ProdXA.sys.triggers a
INNER JOIN [<external database IP>].ProdXA.sys.sql_modules b ON a.object_id =
b.object_id
WHERE b.definition LIKE '%aeci%'
and a.name not LIKE '%aeci%' -- exclude AECI-specific custom tables
union
SELECT a.name,'Stored Procedure'
FROM [<external database IP>].ProdXA.sys.procedures a
INNER JOIN [<external database IP>].ProdXA.sys.sql_modules b ON a.object_id =
b.object_id
WHERE b.definition LIKE '%aeci%'
and a.name not LIKE '%aeci%' -- exclude AECI-specific custom procedures
union
SELECT a.Name, 'View'
FROM [<external database IP>].ProdXA.sys.views a
INNER JOIN [<external database IP>].ProdXA.sys.sql_modules b ON a.object_id =
b.object_id
WHERE b.definition LIKE '%aeci%'
and a.name not LIKE '%aeci%' -- exclude AECI-specific custom views
union
select name, 'Table' from [<external database IP>].ProdXA.sys.tables where object_id
in (
select object_id from [<external database IP>].ProdXA.sys.columns where name like
'AECI%')
Batch File: AECI_CUSTOMS_INVENTORY.bat (located at Server/data on Enterprise Server)
echo Searching web tree
findstr /S /M "AECI" \\XXXXXX-prd\e$\PDS\Vista41\PRODHRMS\Web\* >>
AECI_CUSTOMS_INVENTORY_TEMP.TXT
aeci_batch_substitute.bat "\\XXXXX-prd\e$" "<FILE>E:"
> AECI_CUSTOMS_INVENTORY.txt
del AECI_CUSTOMS_INVENTORY_TEMP.txt
AECI_CUSTOMS_INVENTORY_TEMP.txt
Batch File: AECI_BATCH_SUBSTITUTE.bat (located at Server/data on Enterprise Server)
@echo off
REM -- Prepare the Command Processor -SETLOCAL ENABLEEXTENSIONS
SETLOCAL DISABLEDELAYEDEXPANSION
::BatchSubstitude - parses a File line by line and replaces a substring"
::syntax: BatchSubstitude.bat OldStr NewStr File
::
OldStr [in] - string to be replaced
::
NewStr [in] - string to replace with
::
File
[in] - file to be parsed
:$changed 20100115
:$source http://www.dostips.com
if "%~1"=="" findstr "^::" "%~f0"&GOTO:EOF
for /f "tokens=1,* delims=]" %%A in ('"type %3|find /n /v """') do (
set "line=%%B"
if defined line (
call set "line=echo.%%line:%~1=%~2%%"
for /f "delims=" %%X in ('"echo."%%line%%""') do %%~X
) ELSE echo.
)
ES Program: AECI – Customs Inventory
<COMMAND JobMail="YES">
<SQL RowSeparator="CRLF" ColumnSeparator="COMMA"
OutputFile="[ROOTDIR]\[WORKSUBDIR]\AECI_CUSTOMS_INVENTORY_TEMP.txt" OverWrite="YES"
EsRpt="YES">
select '<FILE>' + name + '</FILE>' name from AECI_CUSTOMS_INVENTORY
union
select '<FILE>' + name + '</FILE>' name from AECI_CUSTOMS_INVENTORY_XA order by
1
</SQL>
<PROGRAM>
[ROOTDIR]\[WORKSUBDIR]\AECI_CUSTOMS_INVENTORY.BAT
</PROGRAM>
</COMMAND>
Download