dblink and characterset [message #274978] |
Thu, 18 October 2007 00:22 |
alantany
Messages: 115 Registered: July 2007
|
Senior Member |
|
|
Hello:
I have a quesiton abort dblink and characterset.
For: DB 1 DB 2
there is a dblink on db 1 connect to db 2;
When I issue:
select * from t@dblink on DB 1,which characterset will db 1 use to create the session to db 2? is the characterset of database of db 1 or the NLS parameter in .profile of os on DB 1?how can I confirm it?
Regards!
Alan
|
|
|
|
|
|
Re: dblink and characterset [message #275031 is a reply to message #275021] |
Thu, 18 October 2007 02:35 |
alantany
Messages: 115 Registered: July 2007
|
Senior Member |
|
|
Hi,Michel:
I mean ,when we connect to a db from a client such as using sqlplus ,we will use a client characterset(windows at regisry,linux at .profile),this will tell oracle what characterset the client use,so that oracle know if there need a characterset convert between the client and server when communicate.
In this case,when db 1 connect to db 2 using dblink,what characterset db 1 will use to communicate with db 2?does db 1 act as a client role,choose characterset form .profile or act as a server role and use it own characterset?
Regards
Alan
|
|
|
|
|
Re: dblink and characterset [message #275043 is a reply to message #275031] |
Thu, 18 October 2007 02:55 |
|
Michel Cadot
Messages: 68732 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Well, does Oracle use the session character set or the database character set? This is a good question but is worth to ask if you have different and not compatible character set.
I don't know the answer (I always kept compatible environments where I worked).
You can make an easy test:
- create a database 1 with a character set that doesn't support a known character but that you are able to see on your client
- create a database 2 that supports this character
- create a table on database 2 and insert this character
- create a database link on database 1 to database 2
- connect to database 1 and select the data through the database link
Do you see the character?
If yes, client character set is used for opening the database link
If no, database character set is used.
Thank to post the result.
Regards
Michel
[Updated on: Thu, 18 October 2007 03:28] Report message to a moderator
|
|
|
|
Re: dblink and characterset [message #275220 is a reply to message #275052] |
Thu, 18 October 2007 18:58 |
alantany
Messages: 115 Registered: July 2007
|
Senior Member |
|
|
I have ased Tom and I posted the reply:
Quote: |
from any client to any server (db1 is a client to db2 in this case), if the characterset of the client is different from the characterset of the server - then the data will be converted into the clients characterset as they retrieve it, and into the servers characterset as the client sends it.
So, in your case, you have sqlplus client, connecting to db1, connecting to db2.
the sqlplus client will get data converted into their characterset from db1.
when db1 retrieves from db2, it'll get the data in the characterset db1 is expecting and then if needed, db1 would convert that for the sqlplus client.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/ds_concepts.htm#sthref4077
|
Regards!
Alan
[Updated on: Fri, 19 October 2007 01:55] by Moderator Report message to a moderator
|
|
|
|
|