Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Urgent:Remote Database link and stored procedures
Why are you using the "@" in the database link name? I'm not POSITIVE, but I'm
sure
it doesn't help clarify things to whatever parses your SQL.
Try
>> create database link OracleDB2 connect to dc identified by dc using 'db2';
Then your SQL becomes
|create or replace procedure sp_test |as | declare row_count number; |begin | select count(*) into row_count from test_at_OracleDB2 |end;
Ramesh Subbyian wrote:
> Hi,
>
> I am trying to access a remote database using oracle 8.0.4. I have 2
> databases running on servers db1 and
> db2. I created a database link to db2 from db1 by using command,
>
> Create database link Oracle.world_at_db2 connect to dc identified by dc
> using 'db2';
>
> dc is a user name with password dc. I am able to see tables in db2. For
> example,
>
> select count(*) from test_at_oracle.world_at_db2
>
> This provides the number of rows in the test table on db2 server.
>
> If I use this table in a stored procedure on db1 like,
>
> create or replace procedure sp_test
> as
> begin
> declare row_count number;
> begin
> select count(*) into row_count from test_at_oracle.world_at_db2;
> end;
> end;
>
> I get internal error.
>
> ORA-00600: internal error code, arguments: [17069], [168877280], [], [],
>
> [], [], [], []
>
> I appreciate your help.
> Thanks
> Ramesh
>
> --
> Ramesh Subbyian Work : 650-413-1217
> http://www.inventa.com Pager : 888-709-3153
Hope that helps.
--
------------------ Thought of the Decade -------------------windows98 = n. 64 patches to 32 bit extensions and a graphical shell for a 16 bit patch to an 8 bit operating system originally coded for a 4 bit microprocessor, written by a 2 bit company that can't stand 1 bit of competition. Received on Thu Aug 12 1999 - 17:56:34 CDT