1

Topic: Linked server to oracle text encoding

Kind day!
To microsoft sql server 2005  oracle v11
I receive not readable text on cyrillic
oracle:

select * from V$NLS_PARAMETERS where (parameter = ' NLS_CHARACTERSET ');
NLS_CHARACTERSET CL8MSWIN1251

tsql: parameters of sorting Cyrillic_General_CI_AI_KS
On  the text to be stored in VARCHAR2
Solved a problem parameter setting  servers:
"A name of parameters of sorting" Georgian_Modern_Sort_CI_AI_KS
(Normally it showed the text only)
All worked, to that pore as it was not required to select the text in sp, the coding flies and already does not steal up in any way
It turns out, at attempt to select the text in a variable it is not so readable, though "straight lines"  continue to work
Who can with the such faced?

alter PROCEDURE [dbo]. [test]
AS
BEGIN
DECLARE @region AS nvarchar (128)
DECLARE [lcAddress] CURSOR FOR
SELECT t1.region
FROM MISC..OMS.MARS#OSA_TOPIC t1
WHERE (34630 = t1.id)
OPEN [lcAddress]
FETCH NEXT FROM [lcAddress] INTO @region, @region2
CLOSE [lcAddress]
DEALLOCATE [lcAddress]
SELECT @region - the text is not readable
DECLARE [lcAddress1] CURSOR FOR
SELECT CAST (t1.region AS nvarchar (1000)) region
FROM OPENQUERY (MISC, ' SELECT t1.region
FROM OMS.MARS#OSA_TOPIC t1
WHERE (34630 = t1.id) ') t1
OPEN [lcAddress1]
FETCH NEXT FROM [lcAddress1] INTO @region
CLOSE [lcAddress1]
DEALLOCATE [lcAddress1]
SELECT @region - the text is not readable
SELECT @region = t1.region
FROM MISC..OMS.MARS#OSA_TOPIC t1
WHERE (34630 = t1.id)
SELECT @region - the text is not readable
--The text is normally readable
SELECT t1.region
FROM MISC..OMS.MARS#OSA_TOPIC t1
WHERE (34630 = t1.id)
--The text is normally readable
SELECT t1.region
FROM OPENQUERY (MISC, ' SELECT t1.region
FROM OMS.MARS#OSA_TOPIC t1
WHERE (34630 = t1.id) ') t1
END
GO

2

Re: Linked server to oracle text encoding

The moderator: Perhaps suffices to produce subjects?