Looking for a way to automate recreation of meta data -- this works for me:
-* File CREATE_SYNONYM.fex
-*-
-* GLOBAL VARIABLES SET PRIOR TO ENTERING FEX...
-*
-DEFAULT &SYNONYM = '.';
-DEFAULT &&APPNAME = 'MSSQL';
-DEFAULT &&DBNAME = '.';
-DEFAULT &&DBMS = 'SQLMSS';
-DEFAULT &&ADAPTOR = 'SQL10';
-RUN
-IF &SYNONYM EQ '.' GOTO HELP
-TYPE /*
-TYPE || Remove existing &SYNONYM
-TYPE */
-RUN
-DOS IF EXIST E:\IBI\64BIT\APPS\&&APPNAME.EVAL\&SYNONYM.EVAL.* DEL E:\IBI\64BIT\APPS\&&APPNAME.EVAL\&SYNONYM.EVAL.*
-RUN
-TYPE /*
-TYPE || Create new &SYNONYM
-TYPE */
-RUN
CREATE SYNONYM &&APPNAME.EVAL/&SYNONYM.EVAL FOR &&DBNAME.EVAL.dbo.&SYNONYM.EVAL DBMS &&DBMS.EVAL AT &&ADAPTOR.EVAL
END
-RUN
-TYPE /*
-TYPE || Test new &SYNONYM.EVAL
-TYPE */
-RUN
TABLE FILE &SYNONYM.EVAL
PRINT *
WHERE RECORDLIMIT EQ 10
ON TABLE HOLD AS SYNTEST
END
-RUN
-*-
-DOS IF EXIST SYNTEST.* DEL SYNTEST.*
-GOTO XIT
-HELP
-TYPE /*
-TYPE || SYNTAX
-TYPE ||
-TYPE || CREATE_SYNONYM SYNONYM=name
-TYPE ||
-TYPE || PARMS
-TYPE ||
-TYPE || SYNONYM name of the table or view for which to create an associated .mas and .acx
-TYPE ||
-TYPE || GLOBAL VARIABLES
-TYPE ||
-TYPE || APPNAME application folder typically MSSQL
-TYPE || DBNAME name of database for example: EDM
-TYPE || DBMS database engine typically SQLMSS
-TYPE || ADAPTOR defined adaptor-connection typically SQL10
-TYPE */
-RUN
-XIT
EXAMPLE USE:
EX CREATE_SYNONYM
-RUN
-*-
-* GLOBAL VARIABLES SET PRIOR TO ENTERING FEX...
-*
-DEFAULT &SYNONYM = '.';
-DEFAULT &&APPNAME = 'MSSQL';
-DEFAULT &&DBNAME = 'YOURDBNAME';
-DEFAULT &&DBMS = 'SQLMSS';
-DEFAULT &&ADAPTOR = 'YOURADAPTOR';
-RUN
-SET &&DBNAME = 'YOURDBNAME';
-TYPE /*
-TYPE || CREATE &&DBNAME.EVAL VIEWS...
-TYPE */
-RUN
EX CREATE_SYNONYM SYNONYM=WORKINGTITLEAPPLICATION_VIEW
EX CREATE_SYNONYM SYNONYM=WORKINGTITLEAPPBUDGETLINEITEM_VIEW
EX CREATE_SYNONYM SYNONYM=WORKINGTITLEAPPPARTICIPATION_VIEW
EX CREATE_SYNONYM SYNONYM=WORKINGTITLEAPPPARTICIPANT_VIEW
EX CREATE_SYNONYM SYNONYM=TITLEAWARDCARRYOVER_VIEW
No comments:
Post a Comment