Database link - How to synchronize codepages?
Hi everybody,
I've created a database link to another database, but when I do a "Select" - it shows me rubbish.
Both databases are Unicodes. One is on Windows 2003, another one is on Solaris 9.
Both databases - Oracle 9.2.
What is wrong?
Thank you.
Are you sure that my charset problem is related to Global_name value?
DB link is working fine with "English" data. Russian data is shown in the wrong way...
Similar Messages
-
How can i get data from another database SQL Server use database link from
I have a database link from Oracle connect to SQL Server database with user cdit connect default database NorthWind.How can I get data from another database(this database in this SQL Server use this database link)?
hi,
u should see following documentation:
Oracle9i Heterogeneous Connectivity Administrator's Guide
Release 1 (9.0.1)
Part Number A88789_01
in it u just go to chapter no. 4 (using the gateway),,u'll find ur answer there.
regards
umar -
How to Execute a Remote Procedure in Portal using Database Link
Hi,
I followed the instructions to create a Portal form for a remote procedure. But I am encountering the following error. Can someone advise what may be the cause?
Failed to execute - Missing string(create_package_body) language(us) domain (wwv) sub_domain (wwv_builder) (WWV-04300)
ORA-04020: deadlock detected while trying to lock object PUBLIC.PORTLET_SCHEMA (WWV-11230)
Failed to parse as PORTAL - (WWV-08300)
PURPOSE
How to execute a remote procedure in Portal using Database Link.
DESCRIPTION
This procedure assumes that you have two databases, one of which is remote, and Portal is configured in the other.
Remote Database A:
==================
1) Create a procedure as follows: Create or Replace PROCEDURE SCOTT.ADD_TWO_VALUES ( v_one IN NUMBER, v_two IN NUMBER, v_result OUT NUMBER) as begin v_result :=v_one+v_two; end; 2) Grant execute privileges to PUBLIC on the procedure.
Database B (where Portal is configured): ========================================
1) Create a public database link and choose to connect as a specific user (say SYSTEM). By default, in an Oracle 8i database, the "global_names" parameter in initSID.ora (or init.ora) file is set to "true". This Global Naming parameter enforces that a dblink has the same name as the database it connects to. Therefore, if the remote global database (A) name is "ora8.acme.com" then the database link should also be named as "ora8.acme.com".
2) Create a synonym for the procedure in Database A. Make sure you fully qualify the procedure name in the remote database (like SCOTT.ADD_TWO_VALUES).
3) Create a dynamic page to execute the procedure. The ORACLE tags in the dynamic page will look similar to the following: <ORACLE> DECLARE v_total NUMBER; BEGIN ADD_TWO_VALUES(:v_one,:v_two, v_total); htp.p('The total is => '); htp.p('<input type="TEXT" VALUE='||v_total||'>'); htp.para; htp.anchor('http://<machine.domain:port#>/pls/portal30/SCOTT.DYN_ADD_TWO_VALUES.show_parms', 'Re-Execute Procedure'); END; </ORACLE>
4) Portal does not have an option to create a form based on a synonym. Therefore, if you want to create a form instead of a dynamic page, create a wrapper procedure and then create a form based on this procedure. For example: Create or Replace PROCEDURE PORTAL30.ADD_TWO_VALUES_PR ( v_one IN NUMBER, v_two IN NUMBER, v_total OUT NUMBER) as begin add_two_values(v_one, v_two, v_total); end;
5) Grant execute privileges to PUBLIC on the procedure.hello...
any input will welcomed... Thanks.. -
How to synchronize two database in ur java program
Hi All
How to synchronize two data base of mysql using java programing language?
If somebody has any idea that will help me a lot.
Thanks and regards
SrikantOf corse I have an idea, but not good!
If you know the database stucture then copy data from one to another.
Open 2 connections: one to source and one to dest.
And:
String sql = "SELCET * from mytable1";// from source
string sql2;
Statement st1 = connSrc.createStatement();
Statement st2 = connDest.createStatement();
ResultSet rs = st1.executeQuerry(sql);
while(rs.next()){
sql2 = "INSERT INTO mytable1 ('field1', 'filed2') VALUES ("+
"'"+rs.get(filed1")+"',"+
"'"+rs.get(filed2')+"'"+
st2.executeUpdate(sql2);
// the destination was cleared before this: DELETE FROM mytable1 WHERE 1
This is a mysql sample without processing the errors.
Szabi -
How to create a database link on an ms acces data source
Hello every body
Is it possible to create a database link on an MS access data source under
oracle 10 g and Apex ?
If yes how to do it ?
Thanks in advaceI don't know what Apex is!!! But try to follow these instructions.
It works for Oracle 9i.
As far as I know, you are supposed to have installed other than ORACLE Client to complete these instructions.
1. Control Panel / Administrative Tools / Data Sources (ODBC)
Folder: System DSN /
click add
Choose : Microsoft Access Driver
Data Source Name : my_test
Description : any_description_you_want
click Database/Select... : full pathname for <your_file.mdb>
click OK
Click OK
2. Goto OH\hs\admin:
2.1) Create a copy of "inithsodbc.ora" file giving it this name:
initmy_test.ora
2.2) Edit "initmy_test.ora" and change as below.
# HS init parameters
HS_FDS_CONNECT_INFO = my_test
HS_FDS_TRACE_LEVEL = OFF
3. Add this entry to listener ( Don't forget to stop/start the listener )
(SID_DESC =
(SID_NAME = my_teste)
(ORACLE_HOME = <Path to OH> ) ### Ex: D:\ORANT901
(PROGRAM = hsolesql)
4. Now you need to add entries to point to the HS in the tnsnames.ora :
access =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=<your_host>)(PORT=1521))
(CONNECT_DATA=(SID=my_test))
(HS=my_test)
5. Now you need to go into the database and create the database link:
CREATE PUBLIC DATABASE LINK "ACCESS_DB" USING 'access';
6. select * from your_table@ACCESS_DB;
HTH
RK
Message was edited by:
RKravcenko -
How to register a Location with database link in Ombplus?
Hello,
what's the detailed syntax in owb 10.2 to register a location with a database link?Hi,
thanks that helps.
Now i found out that after an import of the location the field "from Location" is not set. I need to set it to OWB_REPOSITORY_LOCATION.
How can i do it?
OMBALTER LOCATION 'Locname' SET PROPERTIES (FROM_LOCATION) VALUES ('OWB_REPOSITORY_OWNER') does not work
-> Property FROM_LOCATION is not defined in class ORACLE_GATEWAY_LOCATION
Cann you help me again?
Thanks
Helga -
How can i Create Database Link
Dear Expert,
I have two servers on that there are two databases then
how can i create database link.CREATE [SHARED][PUBLIC] DATABASE LINK link_name
[CONNECT TO user IDENTIFIED BY password]
[AUTHENTICATED BY user IDENTIFIED BY password]
[USING 'connect_string'] -
How to recover password from Database link in Oracle 10G
Hi guys,
How can I get a user password from DBLink in Oracle 10G?
From sys.link$ the column "PASSWORD" is empty and the crypted data comming from the new column "PASSWORDX" does not work by using "... identified by values..."
Any idea?
Thanks...Why do you need to know the password? If you need to re-create the link in another database you can use dbms_metadata to generate the DDL for the database link and for a fixed database link the DDL will include an encrypted password that will match the remote database password.
select dbms_metadata.get_ddl('DB_LINK','Link_name','Owner') from sys.dual
On version 9.2 it extracts the actual visible plan text password. On 10g+ encrypted representation in values clause
HTH -- Mark D Powell -- -
Don't have access to my old apps and I can't remember how to call fields from a database link now...
when i try
select "TABLE"."DATE" as "Date"
from "TABLE" "TABLE" @LINKNAME
I get ORA-00933: SQL command not properly ended
Tried CHRISD which is the name of the link, then tried CHRISD.REGRESS.RDBMS.DEV.US.ORACLE.COM which is the entire name.
Neither one looks right to me but I can't remember the correct syntax for the link name... I remember putting something about userlink in there somewhere but nothing I can think of works.
anyone?select ename from emp@dblink
...lose the double quotes.
Scott -
How do you close a database link in Apex?
How do you close a database link in Apex that is referenced in an interactive report on Page 1? I want to make sure the database link is closed before a user navigates to another page in the Apex application.
Lets assume the database link is referenced in the region source for Page 1 as follows:
Page 1 - Employee Listing
Region Source:
select ename, job, hiredate
from scott.emp@link1
Any suggestions are appreciated.
Ms. HJohn,
I figured out how to eliminate the ORA-02020 and ORA-02081 errors. The solution is reference below:
1. Create an interactive report in a page.
2. Add the SQL statement in the region source as listed below:
SELECT ENAME, JOB, HIREDATE
FROM SCOTT.EMP@DBLINK
WHERE (UPPER(ENAME) LIKE '%' || UPPER(:P1_TEXT_SEARCH)||'%')
Conditional Display
Condition Type:
PL/SQL Expression
Expression 1
:P1_TEXT_SEARCH IS NOT NULL
3. Add a search button and text search field as items on the page.
4. Create a process in the page to check the cursor and catch an exception as listed below:
Name: CHECK_CURSOR
Sequence: 30
Point: On Submit - After Computations and Validations
Type: PL/SQL Anonymous Block
PL/SQL Process:
FOR C1 IN (SELECT ENAME, JOB, HIREDATE
FROM SCOTT.EMP@DBLINK
WHERE (UPPER(ENAME) LIKE '%' || UPPER(:P1_TEXT_SEARCH)||'%'))
LOOP
IF C1.ENAME IS NOT NULL
THEN
HTP.P('Employee Name: '||C1.ENAME||' ');
END IF;
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
APEX_APPLICATION.G_PRINT_SUCCESS_MESSAGE := 'No Data Found Error';
WHEN OTHERS THEN
APEX_APPLICATION.G_PRINT_SUCCESS_MESSAGE := 'Unexpected Error';
Conditional Processing
When Button Pressed (Process After Submit When This Button is Pressed)
P1_SEARCH_DATA
5. Create a process in the page to close the database link as listed below:
Name: CLOSE_DBLINK
Sequence: 40
Point: On Submit - After Computations and Validations
Type: PL/SQL Anonymous Block
PL/SQL Process:
COMMIT;
EXECUTE IMMEDIATE 'ALTER SESSION CLOSE DATABASE LINK DBLINK';
Conditional Processing
When Button Pressed (Process After Submit When This Button is Pressed)
P1_SEARCH_DATA
6. Apply changes, run the page, and conduct a test.
I hope this solution is helpful to others.
Ms. H -
Hi all,
While trying to create a database link i am getting the following error:
Create Database Link Failed.
ORA-01031: insufficient privileges
Could you please tell me how to create a database link.
Thanks
GrishmaHi Grishma,
Login as DBA (SYSTEM or SYS for ex.) in SQL*Plus and run this command:
SELECT *
FROM dba_sys_privs
WHERE grantee = 'USERNAME'
AND PRIVILEGE = 'CREATE DATABASE LINK'
Change the USERNAME by the USER you're trying to create the database link from. (CAPITALS!)
Dimitri -
How to create database link between oracle and SQL Server
Hello Everyone,
Here i have Oracle Database 9i and SQL Server 2005 databases.
I have some tables in sql server db and i want to access from Oracle.
How to create a database link between these two servers
Thanks,Thanks for Everyone,
I was struggle with this almost 10 days....
I created Database link from Oracle to SQL Server
Now it is fine.........
Here i am giving my servers configuration and proceedure how i created the db link...@
Using Generic Connectivity (HSODBC) we can create db link between Oracle and SQL server.
Machine (1)
DB Version : Oracle 9.2.0.7.0
Operating System : HP-UX Itanuim 64 11.23
IP : 192.168.0.31
Host : abcdbt
Machine (2)
Version : SQL Server 2005
Operating System : Windows server 2003 x86
IP : 192.168.0.175
Host : SQLDEV1
User/PW : sa/abc@123! (Connect to database)
Database : SQLTEST (exsisting)
Table : T (“ T “ is the table existing in SQLTEST database with 10 rows)
Prerequisites in Machine (2):
a) Oracle 10g software
b) User account to access SQL Server database (sa/abc@123!)
c) Existing SQL Server Database (SQLTEST)
d) Tables (testing purpose) (T)
Steps:
1) Install Oracle 10.2.0.1 (Only SW,No need of database) *(Machine 2)*
2) Create a DSN where your windows Oracle 10g SW resides *(Machine 2)*
Control panel >> Administrative Tools >> Data Source (ODBC) >> System DSN ADD
You can follow this link also.....
http://www.databasejournal.com/features/oracle/article.php/3442661/Making-a-Connection-from-Oracle-to-SQL-Server.htm
I created DSN as
DSN name : SQLTEST
User : SA/abc@123! (Existing user account)
Host : 192.168.0.175 (machine 2)
Already I have 1 database in SQL Server with the name SQLTEST
You can create DSN with different name also (not same as db name also)
3) Create a hsodbc init file in $ORACLE_HOME\hs\admin *(Machine 2)*
Create init<DSN NAME> file
Ex: initSQLTEST
Copy inithsodbc to initSQLTEST
And edit
initSQLTEST file
HS_FDS_CONNECT_INFO = SQLTEST <DSN NAME>*
HS_FDS_TRACE_LEVEL = OFF*
save the file....@
4) Configure Listener.ora *(Machine 2)*
LISTENER_NEW =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.175)(PORT = 1525))
SID_LIST_LISTENER_NEW =
(SID_LIST =
(SID_DESC =
(SID_NAME = SQLTEST) *+< Here SQLTEST is DSN NAME >+*
(ORACLE_HOME = G:\oracle 10g\oracle\product\10.2.0\db_1)
(PROGRAM = hsodbc))
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = G:\oracle 10g\oracle\product\10.2.0\db_1)
(PROGRAM = extproc) )
:> lsnrctl start LISTENER_NEW
5) Configure tnsname.ora *(Machine 2)*
SQLTEST11 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.175)(PORT = 1525))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SQLTEST))
(HS=OK)
:> tnsping SQLTEST11
If No errors then conti….
6) Configure a file *(Machine 1)*
Cd $TNS_ADMIN ($ORACLE_HOME/network/admin)
Create a file
$ vi TEST_abcdbt_ifile.ora
something=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST =192.168.0.175) (PORT=1525))
(CONNECT_DATA=
(SID=SQLTEST))
(HS=OK)
$ tnsping something
$ sqlplus system/manager
Your connected to Oracle database *(machine 1)*
create database link xyz connect to “sa” identified by “abc@123!” using ‘SOMETHING’;
select * from t@xyz;10 rows selected.
Thanks,
Edited by: ram5424 on Feb 10, 2010 7:24 PM -
How to create database link from oracle to sql server
Please help with how to create database link from oracle to sql server
Best regards,
VishalPlease help with how to create database link from oracle to sql server
Best regards,
Vishal
Hi Vishal,
I found a lof of information regarding how to create a database link from Oracle to SQL Server, please see:
https://www.google.co.in/?gws_rd=cr&ei=vd3XUvGFO8TgkAXqlYCADg#q=how+to+create+database+link+from+oracle+to+sql+server
We discuss SQL Server related issue in this forum. If you have any more question regarding Oracle, please post it in Oracle communities forum for better support.
Regards,
Elvis Long
TechNet Community Support -
How to create database link between oracle9i database and oracle10g
How to create database link between oracle9i database and oracle10g
oracle9i database name "Prod" windows server 2003 ( 172.x.x.x)
oracle10g database name "TEST" sun solaris 9 (165.x.x.x.x)
Please help me on thisFor connections between 10.2 and 9.2 the 9.2 end MUST be at 9.2.0.4 or higher. Connections between 10.2 and 9.2.0.1, 9.2.0.2 or 9.2.0.3 are not supported.
Connections between 10.2 and 9.0.1 was never been supported.
Cheers !!!!
Bhupinder -
How to refresh a created database link?
I have created a database link with the command:
CREATE DATABASE LINK mydb.net CONN TO STRMADM IDENTIFIED BY strmadm_pw USING 'mydb.net'
and then i changed strmadm_pw at the remote database, which may cause the database link inactive. but how to activiate the link again?The best thing is always to try it :
SQL> show user
USER is "SCOTT"
SQL> create database link test connect to test identified by test using 'orcl';
Database link created.
SQL> create synonym test_tab for test_tab@test;
Synonym created.
SQL> select count(*) from test_tab;
COUNT(*)
1
SQL> create or replace function test_func return number is
2 counter number;
3 begin
4 select count(*) into counter from test_tab@test;
5 return counter;
6* end;
SQL> /
Function created.
SQL> select test_func from dual;
TEST_FUNC
1
SQL> conn / as sysdba
Connected.
SQL> alter user test identified by test1;
User altered.
SQL> conn scott/tiger
Connected.
SQL> select count(*) from test_tab;
select count(*) from test_tab
ERROR at line 1:
ORA-01017: invalid username/password; logon denied
ORA-02063: preceding line from TEST
SQL> select test_func from dual;
select test_func from dual
ERROR at line 1:
ORA-01017: invalid username/password; logon denied
ORA-02063: preceding line from TEST
ORA-06512: at "SCOTT.TEST_FUNC", line 4
SQL> drop database link test;
Database link dropped.
SQL> create database link test connect to test identified by test1 using 'orcl';
Database link created.
SQL> select count(*) from test_tab;
COUNT(*)
1
SQL> select test_func from dual;
TEST_FUNC
1
SQL>
Maybe you are looking for
-
No sound through headphones/microphone ALC892
I've been trying for days to fix this issue, and am lost. I've got a new desktop and cannot get sound to come out my headphones, or take input from my microphone. I believe my sound card driver is installed correctly, and that it is a pulseaudio pr
-
10.6.8 Xserve cannot join domain
Hello World! I've got an Xserve that has gone walkabout. running 10.6.8 it "escaped" the domain it was joined to, and now will not rejoin the doamin. Any thoughts on where to start looking? -background. I tried to login one day using my domain cred
-
iphone stuck on recovery mode,,, cannot restore due to error 21. tried all ways to solve the error, but no use... plz help
-
Please Help.. Trying to restore / update ipod 3rd generation - keep getting error message - The ipod touch could not be restores. An unknown error occurred (-1).
-
Extending SOA domain with OSB classpath problem
Trying to extend SOA 11.1.1.3 domain with OSB but getting classpath errors on start-up of admin server. I can see that class com.bea.wli.timer.JndiAccess is in modules/com.bea.alsb.timer_1.2.0.0.jar but I have no idea how to get the domain wizard to