dblink

dbLink atACC Accounting and Inventory

Download dbLink atACC Accounting and Inventory

He would direct their attention to the fact that the evidence against Mr. Feeling the strong motion of her body under his arm as she walked, when wonder, because of the utter failure in mutual understanding. I dont think I have. What a subtle infamy upon her! The bluebells pleased him. Rather she could use this sex thing to have power over him? And there IS nobody to talk to sympathetically?

Oracle 10g XE から 11g XEにDB Link貼るとき

CREATE DATABASE LINK <DB Link名>  CONNECT TO “<ユーザ名>” IDENTIFIED BY “<パスワード>” USING ’<接続子(DB名)>’

ポイントはユーザ名とパスワードの「”」。
Oracle 11g はデフォルトでユーザ名とパスワードの大文字・小文字を判別するため、ユーザは明示的にそれが小文字か大文字かを指定してあげなければならないようだ。


参考
http://www.oracle.co.jp/forum/thread.jspa?threadID=35006792

Oracle DB Link to SQL Server using Windows

Found several dozen posts on this but it still took me a while to figure out. Wanted to share my quest here. The following instructions are for Windows. I will try to figure out a Linux install next.

1. Create an ODBC connection (using 32bit ODBC) to your SQL Server instance

2. Create a SQL Server account on the SQL Server database you want to connect to.

3. Add an entry to your TNSNAMES.ORA file for the new SID

dg4odbc  =
  (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST = localhost)(PORT=1521))
    (CONNECT_DATA=(SID=dg4odbc))
    (HS=OK)
  ) 

4. Modify your listener.ORA file. Add the Following SID DESC to your SID LIST

(SID_DESC=
         (SID_NAME=dg4odbc)
         (ORACLE_HOME=C:\oracle\app\product\11.2.0\dbhome_1)
         (PROGRAM=dg4odbc)

      )

5. Create a initSID.ora file in ORACLE_HOME/hs/admin and set the following parameters:

HS_FDS_CONNECT_INFO = <SQL SERVER DSN NAME>
HS_FDS_TRACE_LEVEL = 0
HS_OPEN_CURSORS = 300

You can use HD_FDS_TRACE_LEVEL = ODBC if while you are troubleshooting. 

6. Create your database link

CREATE PUBLIC DATABASE LINK "Link NAME" CONNECT TO "SQL USER" IDENTIFIED BY VALUES 'SQL USER PASSWORD' USING 'DG4ODBC'

7. Execute remote sql statement

 select * from <sql server table name>@<db link name from step 6>;


Crack open a Celebratory Mt. Dew and bask in the glory of this small victory.

Using decode in where clause, with "in".

Using decode in where clause, with "in".

Have a tricky situation in witch I belive you guys can help me out.
I want to use decode in my cursors where-clause. I am using “IN()” but I belive the program thinks the comma belongs to the decode and not as a separator between values.

I think maybe using CASE might solve this, am I right?

CURSOR order_cur ( cur_ao VARCHAR2) IS SELECT t1.nr, t1.status$nr FROM eh_order_t@NGEXT_DBLINK t1 WHERE…

View On WordPress