|
|
Archives of the TeradataForum
Message Posted: Thu, 04 Feb 2010 @ 10:24:11 GMT
Subj: | | Re: Profile DDL in TD |
|
From: | | Vinay Bagare |
You could probably use this.
SEL
'CREATE PROFILE ' || TRIM(ProfileName) AS '|| X'0D' ||
'SPOOL= ' || COALESCE(CAST(CAST(SpoolSpace AS FLOAT FORMAT
'--------------9')
AS VARCHAR(20)), 'NULL') || ' ' || X'0D' ||
'TEMPORARY= ' || COALESCE(CAST(CAST(TempSpace AS FLOAT FORMAT
'--------------9')
AS VARCHAR(20)), 'NULL') || ' ' || X'0D' ||
'ACCOUNT=(' || '''' || '$M1$ETL2&S&D&H' || '''' || ')' || X'0D' ||
'DEFAULT DATABASE=' || COALESCE(DefaultDB,' NULL') || X'0D' ||
'PASSWORD = (EXPIRE= ' || COALESCE(CAST(ExpirePassword AS VARCHAR(10)),' NULL') || X'0D' ||
',MINCHAR = ' || COALESCE(CAST(PasswordMinChar AS VARCHAR(10)),' NULL') || X'0D' ||
',MAXCHAR = ' || COALESCE(CAST(PasswordMaxChar AS VARCHAR(10)),' NULL') || X'0D' ||
',MAXLOGONATTEMPTS = ' || COALESCE(CAST(MaxLogonAttempts AS VARCHAR(10)),' NULL') || X'0D' ||
',LOCKEDUSEREXPIRE = ' || COALESCE(CAST(LockedUserExpire AS VARCHAR(10)),' NULL') || X'0D' ||
',REUSE = ' || COALESCE(CAST(PasswordReuse AS VARCHAR(10)),' NULL') || X'0D' ||
',DIGITS = ' || COALESCE(CAST(PasswordDigits AS VARCHAR(10)),' NULL') || X'0D' ||
',SPECCHAR = ' || COALESCE(CAST(PasswordSpecChar AS VARCHAR(10)),' NULL') || ');' (TITLE '')
FROM DBC.PROFILEINFO T
WHERE ProfileName = 'ETL_BATCH_M1_02';
Thanks,
Vinay Bagare
| |