May 24, 2011, 07:54 AM
Allison WoodSQL SQLMSS SET DATETIME OFF
Hi, within the edasprof.prf I want to be able to set 'SQL SQLMSS SET DATETIME OFF' but to apply to just
one application directory, e.g HR. So that when synonyms are created in this application they are date format only. Is this possible please ?
Thanks
Alli
May 24, 2011, 08:25 AM
dhagenLow tech solution: I would suggest that you put the command in a user profile for an alternate user id. When you want to create synonyms with the timestamp off, then log on with the alternate user id to do it.
May 24, 2011, 08:36 AM
Allison WoodThanks, hadn't thought of that, that is a work around.
Cheers
June 03, 2011, 09:25 AM
Michael BeeWe actually use a create_synonym.fex ... that way we can turn it off/on per table. Also, we can add custom 'tweaks' to the generation...
-* File:
-*
-* create_synonym.fex
-*-
-* Short Name:
-*
-* CREATE~1.FEX
-*-
-* Description:
-*
-* This procedure can delete ~ create a synonym programmatically
-* It's meant to be used by another calling fex -- use the -SET
-* command to preset the global variables documented below -- then
-* call with the SYNONYM variable
-*
-*-
-* LOCAL VARIABLES & DEFAULTED PRIOR TO ENTERING FEX...
-*
-* ....|....10...|....20...|....30...|....40...|....50
-DEFAULT &APPNAME = 'MSSQL';
-DEFAULT &CONNECTION = 'SQL10';
-DEFAULT &DATETIME = 'OFF';
-DEFAULT &DBMS = 'SQLMSS';
-DEFAULT &DBNAME = '.';
-DEFAULT &MY_IBIAPPS = 'C:\IBI\APPS\';
-DEFAULT &SYNONYM = '.';
-DEFAULT &WFSERV_ENV = '?';
-RUN
ENGINE SQLMSS SET DATETIME &DATETIME.EVAL
-RUN
-IF &SYNONYM EQ '.' THEN GOTO HELP
-TYPE /*
-TYPE || ...APPNAME[&APPNAME.EVAL]
-TYPE || CONNECTION[&CONNECTION.EVAL]
-TYPE || ......DBMS[&DBMS.EVAL]
-TYPE || ....DBNAME[&DBNAME.EVAL]
-TYPE || ...SYNONYM[&SYNONYM.EVAL]
-TYPE || ..DATETIME[&DATETIME.EVAL]
-TYPE */
-RUN
-TYPE /*
-TYPE || Remove existing &SYNONYM
-TYPE */
-RUN
-SET &SYSTEM= 'IF EXIST "&MY_IBIAPPS.EVAL&APPNAME.EVAL\&SYNONYM.EVAL.*" DEL "&MY_IBIAPPS.EVAL&APPNAME.EVAL\&SYNONYM.EVAL.*"';
-SET &SYSTEM_LENGTH=ARGLEN(150,'&SYSTEM.EVAL','D4');
-TYPE /*
-TYPE || &SYSTEM.EVAL
-TYPE */
-SET &SYSTEM_RESP=SYSTEM(&SYSTEM_LENGTH,'&SYSTEM.EVAL','D4');
-RUN
-TYPE /*
-TYPE || Create new &SYNONYM
-TYPE */
-RUN
CREATE SYNONYM &APPNAME.EVAL/&SYNONYM.EVAL FOR &DBNAME.EVAL.dbo.&SYNONYM.EVAL DBMS &DBMS.EVAL AT &CONNECTION.EVAL
END
-RUN
-GOTO XIT
-HELP
-TYPE /*
-TYPE ||
-TYPE || SYNTAX
-TYPE ||
-TYPE || CREATE_SYNONYM SYNONYM=name
-TYPE ||
-TYPE || LOCAL VARIABLES
-TYPE ||
-TYPE || SYNONYM 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 || CONNECTION defined adaptor CONNECTION-typically SQL10
-TYPE ||
-TYPE */
-RUN
-XIT