Month: June 2013

ODBC 32bits for Windows 64bits

Windows-On-Windows 64-bit (WOW64) enables you to run 32bits applications in 64bits OS. You will see there is another powershell, another registry, another ODBC tool, another Oracle client. %SYSTEMROOT%\syswow64\WindowsPowerShell\v1.0\powershell.exe First, we run powershell(x86) Get-itemproperty HKLM:\SOFTWARE\ORACLE\*| Select-Object ORACLE_HOME,ORACLE_HOME_NAME ORACLE_HOME ORACLE_HOME_NAME ———– —————- C:\oracle\product\11.2.0\client_32 client32bit_11203 Only the Oracle 32bit client is displayed cmd /c “%SYSTEMROOT%\syswow64\odbcconf.exe /a {configdsn “”Oracle […]

Oracle ODBC hello world with powershell

Demo : cmd /c “odbcconf.exe /a {configdsn “”Oracle in OraClient11g_home1″” “”DSN=helloworld|SERVER=DB01″”}” Create a helloworld data source connecting to your DB01 tns alias in your OraClient11g_home1 Oracle Home. It is easy to get the Oracle Home name with Get-itemproperty HKLM:\SOFTWARE\ORACLE\*| Select-Object ORACLE_HOME,ORACLE_HOME_NAME ORACLE_HOME ORACLE_HOME_KEY ———– ————— C:\oracle\product\11.1.0\client_1 OraClient11g_home1 C:\oracle\product\11.2.0\client_1 OraClient11g_home2 Then we create the connection (as […]

how to rename datafiles on standby

If you rename a file with alter database on primary, it will not occur on standby. If you want to rename it on standby to, you need to do it manually cancel the recovery (set dg_broker_start to false and restart db in mount status if you use dataguard) set the standby file management to manual […]

Best practice : use double quotes, even in DBMS_STATS

Whenever you create a table, it is better to use double quotes to avoid invalid identified. SQL> CREATE TABLE /XXX(x number); CREATE TABLE /XXX(x number) * ERROR at line 1: ORA-00903: invalid table name SQL> CREATE TABLE “/XXX”(x number); Table created. Even in DBMS_STATS you should use double quotes SQL> exec dbms_stats.gather_table_stats(user,’/XXX’) BEGIN dbms_stats.gather_table_stats(user,’/XXX’); END; […]