DESCRIPTION | ORACLE / SQL-SERVER SQL |
Current system date | SELECT SYSDATE FROM DUAL |
SELECT GETDATE() | |
Current date as char | SELECT TO_CHAR(SYSDATE, 'MMDDYYYY') FROM DUAL**Change format mask as you want |
SELECT CONVERT(VARCHAR, GETDATE(), 112)**Use format mask as per below table1 or 101 - US Foramt - Displays as MM/DD/YY or MM/DD/YYYY2 or 102 - ANSI Foramt - Displays as YY.MM.DD or YYYY.MM.DD3 or 103 - UK Format - Displays as DD/MM/YY or DD/MM/YYYY10 or 110 - US Format - Displays as MM-DD-YY or MM-DD-YYYY11 or 111 - Japan Format - Displays as YY/MM/DD or YYYY/MM/DD12 or 112 - ISO Format - Displays as YYMMDD or YYYYMMDD | |
Current time as char | SELECT TO_CHAR(SYSDATE, 'HH24:MI:SS') FROM DUAL**Change format mask as you want |
SELECT CONVERT(VARCHAR, GETDATE(), 108)**Use format mask as per below table8 or 108 - Displays as hh:mi:ss(24h)14 or 114 - Displays as hh:mi:ss:mmm(24h) | |
Current date-time as char | SELECT TO_CHAR(SYSDATE, 'MMDDYYYY HH24:MI:SS') FROM DUAL**Change format mask as you want |
SELECT CONVERT(VARCHAR, GETDATE(), 113)**Use format mask as per below table13 or 113 - Displays as dd mon yyyy hh:mi:ss:mmm(24h)20 or 120 - Displays as yyyy-mm-dd hh:mi:ss(24h)21 or 121 - Displays as yyyy-mm-dd hh:mi:ss.mmm(24h) | |
Convert char to date | SELECT TO_DATE('03232011','MMDDYYYY') FROM DUAL |
SELECT CONVERT(DATE, '20110323', 112) --Use mask as per format | |
Last day of current month | SELECT LAST_DAY(SYSDATE) FROM DUAL |
SELECT DATEADD(S,-1,DATEADD(M, DATEDIFF(M,0,GETDATE())+1,0)) | |
Last day of next month | SELECT LAST_DAY(ADD_MONTHS(SYSDATE, 1)) FROM DUAL |
SELECT DATEADD(S,-1,DATEADD(M, DATEDIFF(M,0,GETDATE())+2,0)) | |
Last day of previous month | SELECT LAST_DAY(ADD_MONTHS(SYSDATE, -1)) FROM DUAL |
SELECT DATEADD(S,-1,DATEADD(M, DATEDIFF(M,0,GETDATE()),0)) | |
Add a day | SELECT SYSDATE + 1 FROM DUAL |
SELECT DATEADD(D, 1, GETDATE()) | |
Subtract a day | SELECT SYSDATE - 1 FROM DUAL |
SELECT DATEADD(D, -1, GETDATE()) | |
Add a year | SELECT ADD_MONTHS(SYSDATE, 12) FROM DUAL |
SELECT DATEADD(YY, 1, GETDATE()) | |
Subtract a year | SELECT ADD_MONTHS(SYSDATE, -12) FROM DUAL |
SELECT DATEADD(YY, -1, GETDATE()) |
Monday, March 28, 2011
Oracle vs SQL Server SQLs for date formats
Wednesday, March 23, 2011
Starting/Stoping Oracle 11g Identity management stack.
Starting/Stoping Oracle 11g Identity management stack.:
Starting IDM Admin server:
MW_HOME/user_projects/domains/domain_name/startWebLogic.sh
Starting IDM wls_ods1 managed server:
MW_HOME/user_projects/domains/domain_name/startWebLogic.sh wls_ods1
Starting Oracle Internet Directory and Oracle Virtual Directory:
ORACLE_INSTANCE/bin/opmnctl startall
You can verify that the system components have started by:
ORACLE_INSTANCE/bin/opmnctl status -l
Starting IAM Admin server:
MW_HOME/user_projects/domains/domain_name/startWebLogic.sh
Starting OAM, SOA and OIM managed servers:
MW_HOME/user_projects/domains/domain_name/bin/startManagedWebLogic.sh oam_server1
MW_HOME/user_projects/domains/domain_name/bin/startManagedWebLogic.sh soa_server1
Always start SOA managed server, before OIM. Although both independent, but OIM needs some of SOA workflow functionality.
MW_HOME/user_projects/domains/domain_name/bin/startManagedWebLogic.sh oim_server1
Stoping Oracle 11g Identity management stack:
StoppingWebLogic managed component wls_ods1:
MW_HOME/user_projects/domains/DOMAIN_NAME/bin/stopManagedWebLogic.sh wls_ods1
Stopping Oracle Internet Directory and Oracle Virtual Directory:
ORACLE_INSTANCE/bin/opmnctl stopall
Stopping the Oracle WebLogic IDM Admin Server:
MW_HOME/user_projects/domains/DOMAIN_NAME/bin/stopWebLogic.sh
Stopping WebLogic managed component oim_server1,soa_server1 and oam_server1
MW_HOME/user_projects/domains/DOMAIN_NAME/bin/stopManagedWebLogic.sh oim_server1
MW_HOME/user_projects/domains/DOMAIN_NAME/bin/stopManagedWebLogic.sh soa_server1
MW_HOME/user_projects/domains/DOMAIN_NAME/bin/stopManagedWebLogic.sh oam_server1
Stopping Oracle Internet Directory and Oracle Virtual Directory:
ORACLE_INSTANCE/bin/opmnctl stopall
Stopping the Oracle WebLogic IAM Admin Server:
MW_HOME/user_projects/domains/DOMAIN_NAME/bin/stopWebLogic.sh
Starting IDM Admin server:
MW_HOME/user_projects/domains/domain_name/startWebLogic.sh
Starting IDM wls_ods1 managed server:
MW_HOME/user_projects/domains/domain_name/startWebLogic.sh wls_ods1
Starting Oracle Internet Directory and Oracle Virtual Directory:
ORACLE_INSTANCE/bin/opmnctl startall
You can verify that the system components have started by:
ORACLE_INSTANCE/bin/opmnctl status -l
Starting IAM Admin server:
MW_HOME/user_projects/domains/domain_name/startWebLogic.sh
Starting OAM, SOA and OIM managed servers:
MW_HOME/user_projects/domains/domain_name/bin/startManagedWebLogic.sh oam_server1
MW_HOME/user_projects/domains/domain_name/bin/startManagedWebLogic.sh soa_server1
Always start SOA managed server, before OIM. Although both independent, but OIM needs some of SOA workflow functionality.
MW_HOME/user_projects/domains/domain_name/bin/startManagedWebLogic.sh oim_server1
Stoping Oracle 11g Identity management stack:
StoppingWebLogic managed component wls_ods1:
MW_HOME/user_projects/domains/DOMAIN_NAME/bin/stopManagedWebLogic.sh wls_ods1
Stopping Oracle Internet Directory and Oracle Virtual Directory:
ORACLE_INSTANCE/bin/opmnctl stopall
Stopping the Oracle WebLogic IDM Admin Server:
MW_HOME/user_projects/domains/DOMAIN_NAME/bin/stopWebLogic.sh
Stopping WebLogic managed component oim_server1,soa_server1 and oam_server1
MW_HOME/user_projects/domains/DOMAIN_NAME/bin/stopManagedWebLogic.sh oim_server1
MW_HOME/user_projects/domains/DOMAIN_NAME/bin/stopManagedWebLogic.sh soa_server1
MW_HOME/user_projects/domains/DOMAIN_NAME/bin/stopManagedWebLogic.sh oam_server1
Stopping Oracle Internet Directory and Oracle Virtual Directory:
ORACLE_INSTANCE/bin/opmnctl stopall
Stopping the Oracle WebLogic IAM Admin Server:
MW_HOME/user_projects/domains/DOMAIN_NAME/bin/stopWebLogic.sh
Can we install Oracle IDM 11g (OID,OVD,ODSM,ODIP) and IAM (OAM,OIM,OAAM, OAPM and OIN) in signle weblogic domain?
Can we install Oracle IDM 11g (OID,OVD,ODSM,ODIP) and IAM (OAM,OIM,OAAM, OAPM and OIN) in signle weblogic domain?
Yes, we can install IDM and IAM in single weblogic domain, but I usually prefred two seprate weblogic domains. why???
Because these are two seprate product with different binaries and libraries. Those could currupt after applying one of latest patchset (IDM or IAM), you could endup whole domain stop working.
Yes, we can install IDM and IAM in single weblogic domain, but I usually prefred two seprate weblogic domains. why???
Because these are two seprate product with different binaries and libraries. Those could currupt after applying one of latest patchset (IDM or IAM), you could endup whole domain stop working.
Configuring 11g OIM Server
Configuring 11g OIM Server:
After creating IDM managed servers (oam_server1,soa_server1 and oim_server1), we need to configure OIM server before start using it.
After creating IDM managed servers (oam_server1,soa_server1 and oim_server1), we need to configure OIM server before start using it.
Monday, March 21, 2011
Sunday, March 20, 2011
Saturday, March 19, 2011
Install 11g IDM
Create IDM repository using latest RCU.
Install SOA 11.1.1.2
Install SOA patchset 11.1.1.3
Install IAM 11.1.1.3(OAM and OIM components etc)
Install IDM 11.1.1.2 (OVD,OID and ODSM components)
Install IDM 11.1.1.3 patchset (OVD,OID and ODSM components)
Install SOA 11.1.1.2
Install SOA patchset 11.1.1.3
Install IAM 11.1.1.3(OAM and OIM components etc)
Install IDM 11.1.1.2 (OVD,OID and ODSM components)
Install IDM 11.1.1.3 patchset (OVD,OID and ODSM components)
Subscribe to:
Posts (Atom)