Hi All,
Iam facing a problem with sql collations.
Problem:
I have a sproc1 residing on DB1 Database which makes a call to sproc2
on DB2 database.
The out params from sproc2 are processed inside sproc1. And the sproc1
is erroring out.
DB1 - SQL_Latin1_General_CP1_CI_AS Collation
DB2 - Japanese_CI_AS_KS_WS Collation
sproc1 Code:
declare @.name varchar(50)
SELECT @.Cmd = @.Server+'.'+@.Database+'.dbo.SPROC2 '
EXEC @.cmd @.name OUT
Error:
Server: Msg 446, Level 16, State 9, Line 1
Cannot resolve collation conflict for equal to operation.
With Regards,
Anandyou ought change that collation in DB2 and put on as in DB1.
"Anand" wrote:
> Hi All,
> Iam facing a problem with sql collations.
> Problem:
> I have a sproc1 residing on DB1 Database which makes a call to sproc2
> on DB2 database.
> The out params from sproc2 are processed inside sproc1. And the sproc1
> is erroring out.
> DB1 - SQL_Latin1_General_CP1_CI_AS Collation
> DB2 - Japanese_CI_AS_KS_WS Collation
> sproc1 Code:
> declare @.name varchar(50)
> SELECT @.Cmd = @.Server+'.'+@.Database+'.dbo.SPROC2 '
> EXEC @.cmd @.name OUT
> Error:
> Server: Msg 446, Level 16, State 9, Line 1
> Cannot resolve collation conflict for equal to operation.
> With Regards,
> Anand|||Can you post sproc2's code?
See "collate" clause in BOL.
AMB
"Anand" wrote:
> Hi All,
> Iam facing a problem with sql collations.
> Problem:
> I have a sproc1 residing on DB1 Database which makes a call to sproc2
> on DB2 database.
> The out params from sproc2 are processed inside sproc1. And the sproc1
> is erroring out.
> DB1 - SQL_Latin1_General_CP1_CI_AS Collation
> DB2 - Japanese_CI_AS_KS_WS Collation
> sproc1 Code:
> declare @.name varchar(50)
> SELECT @.Cmd = @.Server+'.'+@.Database+'.dbo.SPROC2 '
> EXEC @.cmd @.name OUT
> Error:
> Server: Msg 446, Level 16, State 9, Line 1
> Cannot resolve collation conflict for equal to operation.
> With Regards,
> Anand|||Both the databases resides in different servers.
As the collation is mandatory in both the databases we cannot change the
collation on both DB1 or DB2.
Is there any options without changing the collations?
"Enric" wrote:
> you ought change that collation in DB2 and put on as in DB1.
> "Anand" wrote:
>|||To change the collation at table/field level it could work, i don't know but
in any case, we would need see that sp.
Thanks and regards,
"Anand" wrote:
> Both the databases resides in different servers.
> As the collation is mandatory in both the databases we cannot change the
> collation on both DB1 or DB2.
> Is there any options without changing the collations?
> "Enric" wrote:
>|||sproc2:
create procedure sproc2
@.name varchar(50) output
As
Begin
Select @.name = name from table1
End
Note:
The sprocs are working fine with same collation as
SQL_Latin1_General_CP1_CI_AS
"Alejandro Mesa" wrote:
> Can you post sproc2's code?
> See "collate" clause in BOL.
>
> AMB
> "Anand" wrote:
>
Showing posts with label call. Show all posts
Showing posts with label call. Show all posts
Sunday, March 25, 2012
Collation confusion (may be not)
Hello to everyone
I am litlle bit confused with the following sitatuion
OS (Win2000 SERVER) has COLLATE HEBREW_CI_AS (Let me call it A)
I have database (Latin1-General, case-insensitive, accent-sensitive,
kanatype-insensitive, width-insensitive for Unicode Data, SQL Server Sort
Order 138 on Code Page 1255 for non-Unicode Data) and employee table.
In the table we have Lastname column declared as VARCHAR(50)
Now I'm sitting on another Server with OS (Win2000 SERVER) COLLATE
LATIN-CENERAL...
I registered the 'A' SQL Server and with QA I performed SELECT lastname
From Table ,works fine (I see all lastname's in hebrew) after that I did
exactly the same statement but by EM and instead of lastname's I have seen
question's mark.
What is going on? Can some shed light on the problem
Note: I know that I can declare NVARCHAR(20) and change COLLATION and it
will be worked but my question is
Are there different ways SQL Server perfoming query by QA and EM.? Why I see
my lastname column correctly when I perfom the query with QA and questions
mark by perfomning the same query with EM
(Note: I am sitting on another server and registered to server 'A' with EM)
Thank you.The "show all rows" function in Enterprise Manager uses non-Unicode
controls. This means that Enterprise Manager can't be used to view data
that is not defined in that client machine's ANSI code page (see
HKLM\SYSTEM\CurrentControlSet\Control\Nls\CodePage, value "ACP" to find out
what this is on a given SQL client machine, but don't change the code page
directly from this reg key).
In other words, don't expect that you can view arbitrary Unicode data from
that feature in Enterprise Manager. Query Analyzer, as a fully
Unicode-enabled app, can be used to display or store any Unicode data.
HTH,
Bart
--
Please reply to the newsgroup only - thanks.
This posting is provided "AS IS" with no warranties, and confers no rights.
From: "Uri Dimant" <urid@.iscar.co.il>
Subject: Collation confusion (may be not)
Date: Tue, 11 Nov 2003 10:14:25 +0200
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <#Ck$qvCqDHA.372@.TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.sqlserver.server
NNTP-Posting-Host: bzq-25-106-78.cust.bezeqint.net 212.25.106.78
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0
8.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.server:315781
X-Tomcat-NG: microsoft.public.sqlserver.server
Hello to everyone
I am litlle bit confused with the following sitatuion
OS (Win2000 SERVER) has COLLATE HEBREW_CI_AS (Let me call it A)
I have database (Latin1-General, case-insensitive, accent-sensitive,
kanatype-insensitive, width-insensitive for Unicode Data, SQL Server Sort
Order 138 on Code Page 1255 for non-Unicode Data) and employee table.
In the table we have Lastname column declared as VARCHAR(50)
Now I'm sitting on another Server with OS (Win2000 SERVER) COLLATE
LATIN-CENERAL...
I registered the 'A' SQL Server and with QA I performed SELECT lastname
From Table ,works fine (I see all lastname's in hebrew) after that I did
exactly the same statement but by EM and instead of lastname's I have seen
question's mark.
What is going on? Can some shed light on the problem
Note: I know that I can declare NVARCHAR(20) and change COLLATION and it
will be worked but my question is
Are there different ways SQL Server perfoming query by QA and EM.? Why I see
my lastname column correctly when I perfom the query with QA and questions
mark by perfomning the same query with EM
(Note: I am sitting on another server and registered to server 'A' with EM)
Thank you.
I am litlle bit confused with the following sitatuion
OS (Win2000 SERVER) has COLLATE HEBREW_CI_AS (Let me call it A)
I have database (Latin1-General, case-insensitive, accent-sensitive,
kanatype-insensitive, width-insensitive for Unicode Data, SQL Server Sort
Order 138 on Code Page 1255 for non-Unicode Data) and employee table.
In the table we have Lastname column declared as VARCHAR(50)
Now I'm sitting on another Server with OS (Win2000 SERVER) COLLATE
LATIN-CENERAL...
I registered the 'A' SQL Server and with QA I performed SELECT lastname
From Table ,works fine (I see all lastname's in hebrew) after that I did
exactly the same statement but by EM and instead of lastname's I have seen
question's mark.
What is going on? Can some shed light on the problem
Note: I know that I can declare NVARCHAR(20) and change COLLATION and it
will be worked but my question is
Are there different ways SQL Server perfoming query by QA and EM.? Why I see
my lastname column correctly when I perfom the query with QA and questions
mark by perfomning the same query with EM
(Note: I am sitting on another server and registered to server 'A' with EM)
Thank you.The "show all rows" function in Enterprise Manager uses non-Unicode
controls. This means that Enterprise Manager can't be used to view data
that is not defined in that client machine's ANSI code page (see
HKLM\SYSTEM\CurrentControlSet\Control\Nls\CodePage, value "ACP" to find out
what this is on a given SQL client machine, but don't change the code page
directly from this reg key).
In other words, don't expect that you can view arbitrary Unicode data from
that feature in Enterprise Manager. Query Analyzer, as a fully
Unicode-enabled app, can be used to display or store any Unicode data.
HTH,
Bart
--
Please reply to the newsgroup only - thanks.
This posting is provided "AS IS" with no warranties, and confers no rights.
From: "Uri Dimant" <urid@.iscar.co.il>
Subject: Collation confusion (may be not)
Date: Tue, 11 Nov 2003 10:14:25 +0200
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <#Ck$qvCqDHA.372@.TK2MSFTNGP11.phx.gbl>
Newsgroups: microsoft.public.sqlserver.server
NNTP-Posting-Host: bzq-25-106-78.cust.bezeqint.net 212.25.106.78
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0
8.phx.gbl!TK2MSFTNGP11.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.server:315781
X-Tomcat-NG: microsoft.public.sqlserver.server
Hello to everyone
I am litlle bit confused with the following sitatuion
OS (Win2000 SERVER) has COLLATE HEBREW_CI_AS (Let me call it A)
I have database (Latin1-General, case-insensitive, accent-sensitive,
kanatype-insensitive, width-insensitive for Unicode Data, SQL Server Sort
Order 138 on Code Page 1255 for non-Unicode Data) and employee table.
In the table we have Lastname column declared as VARCHAR(50)
Now I'm sitting on another Server with OS (Win2000 SERVER) COLLATE
LATIN-CENERAL...
I registered the 'A' SQL Server and with QA I performed SELECT lastname
From Table ,works fine (I see all lastname's in hebrew) after that I did
exactly the same statement but by EM and instead of lastname's I have seen
question's mark.
What is going on? Can some shed light on the problem
Note: I know that I can declare NVARCHAR(20) and change COLLATION and it
will be worked but my question is
Are there different ways SQL Server perfoming query by QA and EM.? Why I see
my lastname column correctly when I perfom the query with QA and questions
mark by perfomning the same query with EM
(Note: I am sitting on another server and registered to server 'A' with EM)
Thank you.
Subscribe to:
Posts (Atom)