Showing posts with label following. Show all posts
Showing posts with label following. Show all posts

Friday, March 23, 2012

MSQL Update

Hi
Can anyone help me with the MSSQL following problem:
I want to update the field "Date" with today´s date in a Tabel named Customers
I want to click on a "button" that runs something like:

Update Date with Today´s date where CustomerName = TextBox.text

Thanks in advance for your helpstring strSQL = "UPDATE [Customers] SET [Date] = GetDate() WHERE CustomerName = " + TextBox.Text

basic, basic, basic

Monday, March 19, 2012

Msg 8621: The query processor ran out of stack space during query optimization

I got the above error when I tried to execute the following query

delete from BUSINESS_ASSOCIATE
where ba_name is null

As you can see the query isn't exactly complicated.

What the table does have is lots of dependancies. I got SSMS to show me all the dependancies and there are literally hundreds (maybe thousands - I'm not going to count them all) of dependant tables and i suspect that is what is causing the problem.

So what do I do about it? This is a valid data-model (industry standard in fact) but SQL won't let me delete data from this table and that's a huge problem for me. Any advice about how to progress would be welcomed.

-Jamie

anyone?

|||

Hi Jamie,

I doubt there's a "quick fix" here, but just out of curiosity, if you set maxdop to 1 for this statement, does it make any difference (assuming you've a multi cpu machine)?

Aside from that there's the obvious workaround of throwing more memory at the server, which I'm sure you've considered anyway.

Cheers

Rob

|||Could you please file a bug at http://connect.microsoft.com/sqlserver with repro script? Can you post the estimated showplan results if the query optimizer can even generate a plan?|||

Hi guys,

I sure can. I'll do that from the office tomorrow when I see if the optimiser can produce anything..

-Jamie

|||

Jamie Thomson wrote:

Hi guys,

I sure can. I'll do that from the office tomorrow when I see if the optimiser can produce anything..

-Jamie

OK, its up here: https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=227892

Its private though (cos I've uploaded a DB with data in it) so oly MSFT can see it.

-Jamie

|||Thanks for creating the bug and the repro. I assigned it to the right team and I was able to reproduce the problem on a later build also. They will get back to you soon.|||Is the max SQL memory setting too low? If it is fixed, try raising it. Also, I usually leave index creation memory set to 0. Is there a value for that server there?|||This is not related to the memory allocated to SQL Server or any of those settings.|||

Umachandar Jayachandran - MS wrote:

This is not related to the memory allocated to SQL Server or any of those settings.

Thanks Uma. I was just about to go away and test that. Good job I checked here first

-Jamie

|||

It looks like you hit the documented limit on the maximum number of FK references that QP can handle on a single table. It is 253 according to BOL. See below topic:

http://msdn2.microsoft.com/en-us/library/ms143432.aspx

|||Was there ever a workaround or a resolution on this?|||There is no workaround other than simplifying your schema to reduce the number of FK references.

Msg 8621: The query processor ran out of stack space during query optimization

I got the above error when I tried to execute the following query

delete from BUSINESS_ASSOCIATE
where ba_name is null

As you can see the query isn't exactly complicated.

What the table does have is lots of dependancies. I got SSMS to show me all the dependancies and there are literally hundreds (maybe thousands - I'm not going to count them all) of dependant tables and i suspect that is what is causing the problem.

So what do I do about it? This is a valid data-model (industry standard in fact) but SQL won't let me delete data from this table and that's a huge problem for me. Any advice about how to progress would be welcomed.

-Jamie

anyone?

|||

Hi Jamie,

I doubt there's a "quick fix" here, but just out of curiosity, if you set maxdop to 1 for this statement, does it make any difference (assuming you've a multi cpu machine)?

Aside from that there's the obvious workaround of throwing more memory at the server, which I'm sure you've considered anyway.

Cheers

Rob

|||Could you please file a bug at http://connect.microsoft.com/sqlserver with repro script? Can you post the estimated showplan results if the query optimizer can even generate a plan?|||

Hi guys,

I sure can. I'll do that from the office tomorrow when I see if the optimiser can produce anything..

-Jamie

|||

Jamie Thomson wrote:

Hi guys,

I sure can. I'll do that from the office tomorrow when I see if the optimiser can produce anything..

-Jamie

OK, its up here: https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=227892

Its private though (cos I've uploaded a DB with data in it) so oly MSFT can see it.

-Jamie

|||Thanks for creating the bug and the repro. I assigned it to the right team and I was able to reproduce the problem on a later build also. They will get back to you soon.|||Is the max SQL memory setting too low? If it is fixed, try raising it. Also, I usually leave index creation memory set to 0. Is there a value for that server there?|||This is not related to the memory allocated to SQL Server or any of those settings.|||

Umachandar Jayachandran - MS wrote:

This is not related to the memory allocated to SQL Server or any of those settings.

Thanks Uma. I was just about to go away and test that. Good job I checked here first

-Jamie

|||

It looks like you hit the documented limit on the maximum number of FK references that QP can handle on a single table. It is 253 according to BOL. See below topic:

http://msdn2.microsoft.com/en-us/library/ms143432.aspx

|||Was there ever a workaround or a resolution on this?|||There is no workaround other than simplifying your schema to reduce the number of FK references.

msg 8152

When I try to run an insert query, I got the following error message:
Server: Msg 8152, Level 16, State 9, Line 1
String or binary data would be truncated.
The statement has been terminated.
Can anyone please help? Thanks.Hi
It is happening because you try to insert a string value which is greater
then you have declared.
CREATE TABLE #Test
(
col VARCHAR(5)
)
INSERT INTO #Test VALUES ('AAAAAA')--6 characters
" -00Eric Clapton" <a@.b.com> wrote in message
news:Oz1KFHcuFHA.2948@.TK2MSFTNGP15.phx.gbl...
> When I try to run an insert query, I got the following error message:
> Server: Msg 8152, Level 16, State 9, Line 1
> String or binary data would be truncated.
> The statement has been terminated.
>
> Can anyone please help? Thanks.
>|||Hi Eric,
Thanks for the post.
For error message 8152, it usually means when the length of the value
entered by you into a char, varchar, nchar, nvarchar column is longer than
the maximum length of the column. For example, inserting 'FAQ' into a
char(2) column would result in this error.
You cou use Profiler to troubleshooting this error message. Tracing what
statement causes this.
If you have any questions or concerns, don't hesitate to let me know. We
are always here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/technicalsupport/supportoverview/40010469
Others: https://partner.microsoft.com/US/technicalsupport/supportoverview/
If you are outside the United States, please visit our International
Support page: http://support.microsoft.com/common/international.aspx
=====================================================This posting is provided "AS IS" with no warranties, and confers no rights.

msg 8152

When I try to run an insert query, I got the following error message:
Server: Msg 8152, Level 16, State 9, Line 1
String or binary data would be truncated.
The statement has been terminated.
Can anyone please help? Thanks.
Hi
It is happening because you try to insert a string value which is greater
then you have declared.
CREATE TABLE #Test
(
col VARCHAR(5)
)
INSERT INTO #Test VALUES ('AAAAAA')--6 characters
" -00Eric Clapton" <a@.b.com> wrote in message
news:Oz1KFHcuFHA.2948@.TK2MSFTNGP15.phx.gbl...
> When I try to run an insert query, I got the following error message:
> Server: Msg 8152, Level 16, State 9, Line 1
> String or binary data would be truncated.
> The statement has been terminated.
>
> Can anyone please help? Thanks.
>
|||Hi Eric,
Thanks for the post.
For error message 8152, it usually means when the length of the value
entered by you into a char, varchar, nchar, nvarchar column is longer than
the maximum length of the column. For example, inserting 'FAQ' into a
char(2) column would result in this error.
You cou use Profiler to troubleshooting this error message. Tracing what
statement causes this.
If you have any questions or concerns, don't hesitate to let me know. We
are always here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/tec...rview/40010469
Others: https://partner.microsoft.com/US/tec...pportoverview/
If you are outside the United States, please visit our International
Support page: http://support.microsoft.com/common/international.aspx
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.

msg 8152

When I try to run an insert query, I got the following error message:
Server: Msg 8152, Level 16, State 9, Line 1
String or binary data would be truncated.
The statement has been terminated.
Can anyone please help? Thanks.Hi
It is happening because you try to insert a string value which is greater
then you have declared.
CREATE TABLE #Test
(
col VARCHAR(5)
)
INSERT INTO #Test VALUES ('AAAAAA')--6 characters
" -00Eric Clapton" <a@.b.com> wrote in message
news:Oz1KFHcuFHA.2948@.TK2MSFTNGP15.phx.gbl...
> When I try to run an insert query, I got the following error message:
> Server: Msg 8152, Level 16, State 9, Line 1
> String or binary data would be truncated.
> The statement has been terminated.
>
> Can anyone please help? Thanks.
>|||Hi Eric,
Thanks for the post.
For error message 8152, it usually means when the length of the value
entered by you into a char, varchar, nchar, nvarchar column is longer than
the maximum length of the column. For example, inserting 'FAQ' into a
char(2) column would result in this error.
You cou use Profiler to troubleshooting this error message. Tracing what
statement causes this.
If you have any questions or concerns, don't hesitate to let me know. We
are always here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/te...erview/40010469
Others: https://partner.microsoft.com/US/te...upportoverview/
If you are outside the United States, please visit our International
Support page: http://support.microsoft.com/common/international.aspx
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

Msg 7619, Level 16, State 1, Line 1

i have a C# program which connect to sql 2k
each time i use any arabic word in search i got the following error
Msg 7619, Level 16, State 1, Line 1
*** Sent via Developersdex http://www.codecomments.com ***
what are your globalization settings in your web.config file? Try something
like.
<globalization requestEncoding="utf-8" responseEncoding="utf-8"
culture="ar-SA" uiCulture= "ar" />
Also is your page template directive setting the following?
<%@. Page ResponseEncoding="UTF-8" RequestEncoding="UTF-8" Culure="ar-SA"
uiCulture="ar" %>
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Amaal Ali" <eng_moli@.hotmail.com> wrote in message
news:uc4R3cHGGHA.3952@.TK2MSFTNGP10.phx.gbl...
> i have a C# program which connect to sql 2k
> each time i use any arabic word in search i got the following error
> Msg 7619, Level 16, State 1, Line 1
>
> *** Sent via Developersdex http://www.codecomments.com ***
|||Thanks Alot Mr Hilary Cotter about ur concerning
but i got this msg through Query Analyzr not program only
finally i got the soluation
as
i have to set the "language for word breaker " to Neutral option
when i add the required column to My index Catalog
Thanks Again
*** Sent via Developersdex http://www.codecomments.com ***
|||Thanks Alot Mr Hilary Cotter about ur concerning
but i got this msg through Query Analyzr not program only
finally i got the soluation
as
i have to set the "language for word breaker " to Neutral option
when i add the required column to My index Catalog
Thanks Again
*** Sent via Developersdex http://www.codecomments.com ***

Msg 7391, Level 16 The operation could not be performed because OL

I am getting the following error message
Msg 7391, Level 16, State 2, ProcedureName, Line 103
The operation could not be performed because OLE DB provider "SQLNCLI" for
linked server "LINKEDSERVERNAME" was unable to begin a distributed
transaction.
This error is thrown from a stored procedures from a SQL Server 2005 (32)
default instance on Windows 2003 Server. This sp creates a #temp table and
inserts values based on the results of an executed stored procedure against a
linked server as follows: The linked server points to a SQL Server 200(32)
on Windows 2000 Server os.
create table #Data (
...columns...
)
insertinto #Data
(...columns)
exec LINKDEDSERVER.DATABASE.dbo.STOREDPROCEDURE @.PARAM
If I run the following command by itself, it runs fine. It only errors
within the sp and while it is inserting into #temp.
exec LINKDEDSERVER.DATABASE.dbo.STOREDPROCEDURE @.PARAM
I have enabled network DTC access on the executing Windows 2003 server as
suggested by the following article.
http://support.microsoft.com/default...b;en-us;817064
Any Help?
Hi
Have you checked out http://support.microsoft.com/kb/839279
John
"timw86" wrote:

> I am getting the following error message
> Msg 7391, Level 16, State 2, ProcedureName, Line 103
> The operation could not be performed because OLE DB provider "SQLNCLI" for
> linked server "LINKEDSERVERNAME" was unable to begin a distributed
> transaction.
> This error is thrown from a stored procedures from a SQL Server 2005 (32)
> default instance on Windows 2003 Server. This sp creates a #temp table and
> inserts values based on the results of an executed stored procedure against a
> linked server as follows: The linked server points to a SQL Server 200(32)
> on Windows 2000 Server os.
> create table #Data (
> ...columns...
> )
> insertinto #Data
> (...columns)
> exec LINKDEDSERVER.DATABASE.dbo.STOREDPROCEDURE @.PARAM
> If I run the following command by itself, it runs fine. It only errors
> within the sp and while it is inserting into #temp.
> exec LINKDEDSERVER.DATABASE.dbo.STOREDPROCEDURE @.PARAM
> I have enabled network DTC access on the executing Windows 2003 server as
> suggested by the following article.
> http://support.microsoft.com/default...b;en-us;817064
> Any Help?

Msg 7391, Level 16 The operation could not be performed because OL

I am getting the following error message
Msg 7391, Level 16, State 2, ProcedureName, Line 103
The operation could not be performed because OLE DB provider "SQLNCLI" for
linked server "LINKEDSERVERNAME" was unable to begin a distributed
transaction.
This error is thrown from a stored procedures from a SQL Server 2005 (32)
default instance on Windows 2003 Server. This sp creates a #temp table and
inserts values based on the results of an executed stored procedure against a
linked server as follows: The linked server points to a SQL Server 200(32)
on Windows 2000 Server os.
create table #Data (
...columns...
)
insert into #Data
(...columns)
exec LINKDEDSERVER.DATABASE.dbo.STOREDPROCEDURE @.PARAM
If I run the following command by itself, it runs fine. It only errors
within the sp and while it is inserting into #temp.
exec LINKDEDSERVER.DATABASE.dbo.STOREDPROCEDURE @.PARAM
I have enabled network DTC access on the executing Windows 2003 server as
suggested by the following article.
http://support.microsoft.com/default.aspx?scid=kb;en-us;817064
Any Help?Hi
Have you checked out http://support.microsoft.com/kb/839279
John
"timw86" wrote:
> I am getting the following error message
> Msg 7391, Level 16, State 2, ProcedureName, Line 103
> The operation could not be performed because OLE DB provider "SQLNCLI" for
> linked server "LINKEDSERVERNAME" was unable to begin a distributed
> transaction.
> This error is thrown from a stored procedures from a SQL Server 2005 (32)
> default instance on Windows 2003 Server. This sp creates a #temp table and
> inserts values based on the results of an executed stored procedure against a
> linked server as follows: The linked server points to a SQL Server 200(32)
> on Windows 2000 Server os.
> create table #Data (
> ...columns...
> )
> insert into #Data
> (...columns)
> exec LINKDEDSERVER.DATABASE.dbo.STOREDPROCEDURE @.PARAM
> If I run the following command by itself, it runs fine. It only errors
> within the sp and while it is inserting into #temp.
> exec LINKDEDSERVER.DATABASE.dbo.STOREDPROCEDURE @.PARAM
> I have enabled network DTC access on the executing Windows 2003 server as
> suggested by the following article.
> http://support.microsoft.com/default.aspx?scid=kb;en-us;817064
> Any Help?|||Thanks John.
The issue appears to be MSDTC security configurations for the initiating
server (windows 2003 server). By default, after I enabled Distributed
Transactions, the transaction manager communication had its setting to Mutual
Authentication. I concluded that this will not work for this our
environment. We have a windows 2003 server initiating dtc to a windows 2000
server. I changed the setting to no authentication is required. This has
allowed the sql commands to be executed without error. I conclude that the
mutual authentication is a new feature to windows 2003 and requires 2 windows
2003 servers communicating via DTC to one another. The kb article's
symptoms and cause are lacking in detail. However, the kb workaround
provided usefull steps.
Tim
"John Bell" wrote:
> Hi
> Have you checked out http://support.microsoft.com/kb/839279
> John
> "timw86" wrote:
> > I am getting the following error message
> >
> > Msg 7391, Level 16, State 2, ProcedureName, Line 103
> > The operation could not be performed because OLE DB provider "SQLNCLI" for
> > linked server "LINKEDSERVERNAME" was unable to begin a distributed
> > transaction.
> >
> > This error is thrown from a stored procedures from a SQL Server 2005 (32)
> > default instance on Windows 2003 Server. This sp creates a #temp table and
> > inserts values based on the results of an executed stored procedure against a
> > linked server as follows: The linked server points to a SQL Server 200(32)
> > on Windows 2000 Server os.
> >
> > create table #Data (
> > ...columns...
> > )
> >
> > insert into #Data
> > (...columns)
> > exec LINKDEDSERVER.DATABASE.dbo.STOREDPROCEDURE @.PARAM
> >
> > If I run the following command by itself, it runs fine. It only errors
> > within the sp and while it is inserting into #temp.
> >
> > exec LINKDEDSERVER.DATABASE.dbo.STOREDPROCEDURE @.PARAM
> >
> > I have enabled network DTC access on the executing Windows 2003 server as
> > suggested by the following article.
> > http://support.microsoft.com/default.aspx?scid=kb;en-us;817064
> >
> > Any Help?

Msg 7391, Level 16 The operation could not be performed because OL

I am getting the following error message
Msg 7391, Level 16, State 2, ProcedureName, Line 103
The operation could not be performed because OLE DB provider "SQLNCLI" for
linked server "LINKEDSERVERNAME" was unable to begin a distributed
transaction.
This error is thrown from a stored procedures from a SQL Server 2005 (32)
default instance on Windows 2003 Server. This sp creates a #temp table and
inserts values based on the results of an executed stored procedure against
a
linked server as follows: The linked server points to a SQL Server 200(32)
on Windows 2000 Server os.
create table #Data (
...columns...
)
insert into #Data
(...columns)
exec LINKDEDSERVER.DATABASE.dbo.STOREDPROCEDURE @.PARAM
If I run the following command by itself, it runs fine. It only errors
within the sp and while it is inserting into #temp.
exec LINKDEDSERVER.DATABASE.dbo.STOREDPROCEDURE @.PARAM
I have enabled network DTC access on the executing Windows 2003 server as
suggested by the following article.
http://support.microsoft.com/defaul...kb;en-us;817064
Any Help?Hi
Have you checked out http://support.microsoft.com/kb/839279
John
"timw86" wrote:

> I am getting the following error message
> Msg 7391, Level 16, State 2, ProcedureName, Line 103
> The operation could not be performed because OLE DB provider "SQLNCLI" for
> linked server "LINKEDSERVERNAME" was unable to begin a distributed
> transaction.
> This error is thrown from a stored procedures from a SQL Server 2005 (32)
> default instance on Windows 2003 Server. This sp creates a #temp table a
nd
> inserts values based on the results of an executed stored procedure agains
t a
> linked server as follows: The linked server points to a SQL Server 200(32
)
> on Windows 2000 Server os.
> create table #Data (
> ...columns...
> )
> insert into #Data
> (...columns)
> exec LINKDEDSERVER.DATABASE.dbo.STOREDPROCEDURE @.PARAM
> If I run the following command by itself, it runs fine. It only errors
> within the sp and while it is inserting into #temp.
> exec LINKDEDSERVER.DATABASE.dbo.STOREDPROCEDURE @.PARAM
> I have enabled network DTC access on the executing Windows 2003 server as
> suggested by the following article.
> http://support.microsoft.com/defaul...kb;en-us;817064
> Any Help?

msg 4820 Bulk insert error -- "Unknown version of format file"

Hi all,

ISSUE:
====================
In SQL 2005 (sp2) I get the following error when preforming a bulk
insert with an associated xml format file:
"Could not bulk insert. Unknown version of format file"

Question:
====================
I am unsure what they mean by "unknown version". Specifically the
format file in question was created using bcp. Also the entire table
scenario was created from a msdn example.

Any ideas? have you seen this before?

NOTE: i can reproduce this issue outside the example but will refer to
msdn considering it is simple and easily reproducible.

Scenario
====================
I can reproduce this error with the BULK INSERT example discussed on
msdn (example A)
http://msdn2.microsoft.com/en-us/library/ms191234.aspx

TO REPRODUCE:

* In short the table structure is:
Person (Age int, FirstName varchar(20), LastName varchar(30))

* Data File Template:
Age<tab>Firstname<tab>Lastname<return>

* xml file format from bcp (and described on msdn)
<?xml version="1.0"?>
<BCPFORMAT
xmlns="http://schemas.microsoft.com/sqlserver/2004/bulkload/format"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RECORD>
<FIELD ID="1" xsi:type="CharTerm" TERMINATOR="\t"
MAX_LENGTH="12"/>
<FIELD ID="2" xsi:type="CharTerm" TERMINATOR="\t"
MAX_LENGTH="20" COLLATION="SQL_Latin1_General_CP1_CI_AS"/>
<FIELD ID="3" xsi:type="CharTerm" TERMINATOR="\r\n"
MAX_LENGTH="30"
COLLATION="SQL_Latin1_General_CP1_CI_AS"/>
</RECORD>
<ROW>
<COLUMN SOURCE="1" NAME="age" xsi:type="SQLINT"/>
<COLUMN SOURCE="2" NAME="firstname" xsi:type="SQLVARYCHAR"/>
<COLUMN SOURCE="3" NAME="lastname" xsi:type="SQLVARYCHAR"/>
</ROW>
</BCPFORMAT>

* Here is some the actual sql statement that pulls this all together
BULK INSERT mytestnames
FROM 'C:\datatest\exampledata-c.Dat'
WITH (FORMATFILE = 'C:\datatest\examplefmt.Fmt');

Thanks in advanced for any feedback.

Cheers!

Hi,

plz can you show your XML format file "examplefmt.Fmt".

there must be something like this:

examplefmt.Fmt

...

2 SQLCHAR 0 100 "," 2 firstname SQL_Latin1_General_CP1_CI_AS
...

Monday, March 12, 2012

msg 4820 Bulk insert error -- "Unknown version of format file"

Hi all,

ISSUE:
====================
In SQL 2005 (sp2) I get the following error when preforming a bulk
insert with an associated xml format file:
"Could not bulk insert. Unknown version of format file"

Question:
====================
I am unsure what they mean by "unknown version". Specifically the
format file in question was created using bcp. Also the entire table
scenario was created from a msdn example.

Any ideas? have you seen this before?

NOTE: i can reproduce this issue outside the example but will refer to
msdn considering it is simple and easily reproducible.

Scenario
====================
I can reproduce this error with the BULK INSERT example discussed on
msdn (example A)
http://msdn2.microsoft.com/en-us/library/ms191234.aspx

TO REPRODUCE:

* In short the table structure is:
Person (Age int, FirstName varchar(20), LastName varchar(30))

* Data File Template:
Age<tab>Firstname<tab>Lastname<return>

* xml file format from bcp (and described on msdn)
<?xml version="1.0"?>
<BCPFORMAT
xmlns="http://schemas.microsoft.com/sqlserver/2004/bulkload/format"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RECORD>
<FIELD ID="1" xsi:type="CharTerm" TERMINATOR="\t"
MAX_LENGTH="12"/>
<FIELD ID="2" xsi:type="CharTerm" TERMINATOR="\t"
MAX_LENGTH="20" COLLATION="SQL_Latin1_General_CP1_CI_AS"/>
<FIELD ID="3" xsi:type="CharTerm" TERMINATOR="\r\n"
MAX_LENGTH="30"
COLLATION="SQL_Latin1_General_CP1_CI_AS"/>
</RECORD>
<ROW>
<COLUMN SOURCE="1" NAME="age" xsi:type="SQLINT"/>
<COLUMN SOURCE="2" NAME="firstname" xsi:type="SQLVARYCHAR"/>
<COLUMN SOURCE="3" NAME="lastname" xsi:type="SQLVARYCHAR"/>
</ROW>
</BCPFORMAT>

* Here is some the actual sql statement that pulls this all together
BULK INSERT mytestnames
FROM 'C:\datatest\exampledata-c.Dat'
WITH (FORMATFILE = 'C:\datatest\examplefmt.Fmt');

Thanks in advanced for any feedback.

Cheers!

Hi,

plz can you show your XML format file "examplefmt.Fmt".

there must be something like this:

examplefmt.Fmt

...

2 SQLCHAR 0 100 "," 2 firstname SQL_Latin1_General_CP1_CI_AS
...

Msg 468, Level 16, State 9, Line 1 --Cannot resolve the collation conflict between "Latin1_

execute the following in any user database...

So far I've been able to only reproduce this on SQL 2005 Standard instances..for some reason I don't get the error on Enterprise server.

It appears that perhaps the system objects have different collation attributes..?!!

select name from sysusers where name not in ( select name from master..syslogins )

Microsoft SQL Server 2005 - 9.00.1399.06 (X64)

Oct 14 2005 00:35:21

Copyright (c) 1988-2005 Microsoft Corporation

Standard Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 1)

(1 row(s) affected)

Msg 468, Level 16, State 9, Line 1

Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

This is because your master is in a different collation than your user database.

Try adding the COLLATE to your query.

selectnamefrom sysusers wherenamenotin(selectname COLLATE Latin1_General_CI_AIfrom master..syslogins )

Not sure which collation is your master's but just make sure they use the same collation for the comparison.

I personally like to keep all my collations the same over the entire server.

hth

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Wesley- I have a similar issue but I certainly did NOT reset any collations on purpose. I'm trying to get a match between the sysobjects.name and the objname returned by FN_LISTEXTENDEDPROPERTY from the extended properties table (or view or wherever they hide that stuff in SQL 2005). I tried your suggestion using both collations mentioned in the error -- but no luck. Here's the second attempt:

select o.[id] as 'table_id', o.[name] COLLATE Latin1_General_CI_AI as 'table_name',
0 as 'column_order', NULL as 'column_name', NULL as 'column_datatype',
NULL as 'column_length', Cast(e.value as varchar(500)) as 'column_description'
from sysobjects o
left join ::FN_LISTEXTENDEDPROPERTY(N'MS_Description', N'user',N'dbo',N'table', N'MyTable', null, default) e on o.name = e.objname
where o.name = 'MyTable'

Any thoughts? Thanks in advance.

|||

Hi,

Rewrite your join like this

on o.nameCOLLATE Latin1_General_CI_AS = e.objname

hth

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Superb! Works like a charm. Wonder how the COLLATIONS ever got out of synch on system tables?

|||

Doesn't appear to be a question of out of sync.
I've got the same behaviour on my installation.

If I find some time I'll try to figure out why.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Doesn't appear to be a question of out of sync.
I've got the same behaviour on my installation.

If I find some time I'll try to figure out why

Any progress on this one? I'm having a little trouble understanding when I need to add this COLLATE clause.

Dave

|||

Something odd is definitely going on here. We just moved to SQL Server 2005 and this problem is coming up. These are fresh installs of 2k5 and we didn't change any collations on the system meta-views. The default install options, I believe, were accepted on this.

BTW, I'm getting this error on a user database that we scripted as a CREATE Database from a production db. It has a compatibility of 90, not 80, and does have the collation of SQL_Latin1_CP1_CI_AS. All the system databases on SQL 2000 has that same collation. When I look at the properties of the system dbs on 2k5, the collation is also SQL_Latin1_CP1_CI_AS, so maybe it's a column collation issue?

Point is, I don't see a collation for Latin1_General_CI_AI anywhere on my SQL 2k5 server. So why am I getting this error?

Catadmin

|||

Same thing here. This SQL joins input from two system sources. Why they are coming up as two different collations I do not yet know. The objname from the extended property and the table_name (changed to colObjectName in the query) from sp_tables seem to use two different collations. Our install was a converstion from SQL 2000 to SQL 2005 but all DBs are set to Compatibility level of 90 and using SQL_Latin1_General_CP1_CI_AS. I'll keep digging but hopefully someone will post a quick answer here. This is also reproduceable on a test server that was not a conversion from SQL 2005 (was a fresh install).

Select colObjectName,Convert(varchar(1000),value)as colDescription

From(

Select table_name as colObjectName

FromOpenquery(yourservername,'yourdbname..sp_tables')

) procs

LeftJoin

::FN_LISTEXTENDEDPROPERTY (

'Description',

'User','dbo',

'Table',default,default,default

)

on colObjectName

-- collate SQL_Latin1_General_CP1_CI_AS --uncomment this line is required to work on our server

= objname

Where colObjectName like'tbl%' --the prefix we use for in house developed tables

|||I did some research, and my guess is that fn_listextendedproperty returns the property of
mssqlsystemresource, although I have not verified that mssqlsystemresource has this collation. I suspect that this is difficult to address in terms of functionality. Remember that the resouce database is like a DLL, so it cannot be in the server collation, it must always be in one and the same collation.

What should be done is to document it. I filed
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=287215

Msg 468, Level 16, State 9, Line 1 --Cannot resolve the collation conflict between "Latin1_

execute the following in any user database...

So far I've been able to only reproduce this on SQL 2005 Standard instances..for some reason I don't get the error on Enterprise server.

It appears that perhaps the system objects have different collation attributes..?!!

select name from sysusers where name not in ( select name from master..syslogins )

Microsoft SQL Server 2005 - 9.00.1399.06 (X64)

Oct 14 2005 00:35:21

Copyright (c) 1988-2005 Microsoft Corporation

Standard Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 1)

(1 row(s) affected)

Msg 468, Level 16, State 9, Line 1

Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

This is because your master is in a different collation than your user database.

Try adding the COLLATE to your query.

select name from sysusers where name not in ( select name COLLATE Latin1_General_CI_AI from master..syslogins )

Not sure which collation is your master's but just make sure they use the same collation for the comparison.

I personally like to keep all my collations the same over the entire server.

hth

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Wesley- I have a similar issue but I certainly did NOT reset any collations on purpose. I'm trying to get a match between the sysobjects.name and the objname returned by FN_LISTEXTENDEDPROPERTY from the extended properties table (or view or wherever they hide that stuff in SQL 2005). I tried your suggestion using both collations mentioned in the error -- but no luck. Here's the second attempt:

select o.[id] as 'table_id', o.[name] COLLATE Latin1_General_CI_AI as 'table_name',
0 as 'column_order', NULL as 'column_name', NULL as 'column_datatype',
NULL as 'column_length', Cast(e.value as varchar(500)) as 'column_description'
from sysobjects o
left join ::FN_LISTEXTENDEDPROPERTY(N'MS_Description', N'user',N'dbo',N'table', N'MyTable', null, default) e on o.name = e.objname
where o.name = 'MyTable'

Any thoughts? Thanks in advance.

|||

Hi,

Rewrite your join like this

on o.name COLLATE Latin1_General_CI_AS = e.objname

hth

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Superb! Works like a charm. Wonder how the COLLATIONS ever got out of synch on system tables?

|||

Doesn't appear to be a question of out of sync.
I've got the same behaviour on my installation.

If I find some time I'll try to figure out why.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Doesn't appear to be a question of out of sync.
I've got the same behaviour on my installation.

If I find some time I'll try to figure out why

Any progress on this one? I'm having a little trouble understanding when I need to add this COLLATE clause.

Dave

|||

Something odd is definitely going on here. We just moved to SQL Server 2005 and this problem is coming up. These are fresh installs of 2k5 and we didn't change any collations on the system meta-views. The default install options, I believe, were accepted on this.

BTW, I'm getting this error on a user database that we scripted as a CREATE Database from a production db. It has a compatibility of 90, not 80, and does have the collation of SQL_Latin1_CP1_CI_AS. All the system databases on SQL 2000 has that same collation. When I look at the properties of the system dbs on 2k5, the collation is also SQL_Latin1_CP1_CI_AS, so maybe it's a column collation issue?

Point is, I don't see a collation for Latin1_General_CI_AI anywhere on my SQL 2k5 server. So why am I getting this error?

Catadmin

|||

Same thing here. This SQL joins input from two system sources. Why they are coming up as two different collations I do not yet know. The objname from the extended property and the table_name (changed to colObjectName in the query) from sp_tables seem to use two different collations. Our install was a converstion from SQL 2000 to SQL 2005 but all DBs are set to Compatibility level of 90 and using SQL_Latin1_General_CP1_CI_AS. I'll keep digging but hopefully someone will post a quick answer here. This is also reproduceable on a test server that was not a conversion from SQL 2005 (was a fresh install).

Select colObjectName, Convert(varchar(1000),value) as colDescription

From (

Select table_name as colObjectName

From Openquery (yourservername,'yourdbname..sp_tables')

) procs

Left Join

::FN_LISTEXTENDEDPROPERTY (

'Description',

'User','dbo',

'Table', default, default, default

)

on colObjectName

-- collate SQL_Latin1_General_CP1_CI_AS --uncomment this line is required to work on our server

= objname

Where colObjectName like 'tbl%' --the prefix we use for in house developed tables

|||I did some research, and my guess is that fn_listextendedproperty returns the property of
mssqlsystemresource, although I have not verified that mssqlsystemresource has this collation. I suspect that this is difficult to address in terms of functionality. Remember that the resouce database is like a DLL, so it cannot be in the server collation, it must always be in one and the same collation.

What should be done is to document it. I filed
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=287215

Msg 468, Level 16, State 9, Line 1 --Cannot resolve the collation conflict between "Latin1_

execute the following in any user database...

So far I've been able to only reproduce this on SQL 2005 Standard instances..for some reason I don't get the error on Enterprise server.

It appears that perhaps the system objects have different collation attributes..?!!

select name from sysusers where name not in ( select name from master..syslogins )

Microsoft SQL Server 2005 - 9.00.1399.06 (X64)

Oct 14 2005 00:35:21

Copyright (c) 1988-2005 Microsoft Corporation

Standard Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 1)

(1 row(s) affected)

Msg 468, Level 16, State 9, Line 1

Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

This is because your master is in a different collation than your user database.

Try adding the COLLATE to your query.

selectnamefrom sysusers wherenamenotin(selectname COLLATE Latin1_General_CI_AIfrom master..syslogins )

Not sure which collation is your master's but just make sure they use the same collation for the comparison.

I personally like to keep all my collations the same over the entire server.

hth

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Wesley- I have a similar issue but I certainly did NOT reset any collations on purpose. I'm trying to get a match between the sysobjects.name and the objname returned by FN_LISTEXTENDEDPROPERTY from the extended properties table (or view or wherever they hide that stuff in SQL 2005). I tried your suggestion using both collations mentioned in the error -- but no luck. Here's the second attempt:

select o.[id] as 'table_id', o.[name] COLLATE Latin1_General_CI_AI as 'table_name',
0 as 'column_order', NULL as 'column_name', NULL as 'column_datatype',
NULL as 'column_length', Cast(e.value as varchar(500)) as 'column_description'
from sysobjects o
left join ::FN_LISTEXTENDEDPROPERTY(N'MS_Description', N'user',N'dbo',N'table', N'MyTable', null, default) e on o.name = e.objname
where o.name = 'MyTable'

Any thoughts? Thanks in advance.

|||

Hi,

Rewrite your join like this

on o.nameCOLLATE Latin1_General_CI_AS = e.objname

hth

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Superb! Works like a charm. Wonder how the COLLATIONS ever got out of synch on system tables?

|||

Doesn't appear to be a question of out of sync.
I've got the same behaviour on my installation.

If I find some time I'll try to figure out why.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Doesn't appear to be a question of out of sync.
I've got the same behaviour on my installation.

If I find some time I'll try to figure out why

Any progress on this one? I'm having a little trouble understanding when I need to add this COLLATE clause.

Dave

|||

Something odd is definitely going on here. We just moved to SQL Server 2005 and this problem is coming up. These are fresh installs of 2k5 and we didn't change any collations on the system meta-views. The default install options, I believe, were accepted on this.

BTW, I'm getting this error on a user database that we scripted as a CREATE Database from a production db. It has a compatibility of 90, not 80, and does have the collation of SQL_Latin1_CP1_CI_AS. All the system databases on SQL 2000 has that same collation. When I look at the properties of the system dbs on 2k5, the collation is also SQL_Latin1_CP1_CI_AS, so maybe it's a column collation issue?

Point is, I don't see a collation for Latin1_General_CI_AI anywhere on my SQL 2k5 server. So why am I getting this error?

Catadmin

|||

Same thing here. This SQL joins input from two system sources. Why they are coming up as two different collations I do not yet know. The objname from the extended property and the table_name (changed to colObjectName in the query) from sp_tables seem to use two different collations. Our install was a converstion from SQL 2000 to SQL 2005 but all DBs are set to Compatibility level of 90 and using SQL_Latin1_General_CP1_CI_AS. I'll keep digging but hopefully someone will post a quick answer here. This is also reproduceable on a test server that was not a conversion from SQL 2005 (was a fresh install).

Select colObjectName,Convert(varchar(1000),value)as colDescription

From(

Select table_name as colObjectName

FromOpenquery(yourservername,'yourdbname..sp_tables')

) procs

LeftJoin

::FN_LISTEXTENDEDPROPERTY (

'Description',

'User','dbo',

'Table',default,default,default

)

on colObjectName

-- collate SQL_Latin1_General_CP1_CI_AS --uncomment this line is required to work on our server

= objname

Where colObjectName like'tbl%' --the prefix we use for in house developed tables

|||I did some research, and my guess is that fn_listextendedproperty returns the property of
mssqlsystemresource, although I have not verified that mssqlsystemresource has this collation. I suspect that this is difficult to address in terms of functionality. Remember that the resouce database is like a DLL, so it cannot be in the server collation, it must always be in one and the same collation.

What should be done is to document it. I filed
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=287215

Msg 468, Level 16, State 9, Line 1 --Cannot resolve the collation conflict between "Latin1_

execute the following in any user database...

So far I've been able to only reproduce this on SQL 2005 Standard instances..for some reason I don't get the error on Enterprise server.

It appears that perhaps the system objects have different collation attributes..?!!

select name from sysusers where name not in ( select name from master..syslogins )

Microsoft SQL Server 2005 - 9.00.1399.06 (X64)

Oct 14 2005 00:35:21

Copyright (c) 1988-2005 Microsoft Corporation

Standard Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 1)

(1 row(s) affected)

Msg 468, Level 16, State 9, Line 1

Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

This is because your master is in a different collation than your user database.

Try adding the COLLATE to your query.

selectnamefrom sysusers wherenamenotin(selectname COLLATE Latin1_General_CI_AIfrom master..syslogins )

Not sure which collation is your master's but just make sure they use the same collation for the comparison.

I personally like to keep all my collations the same over the entire server.

hth

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Wesley- I have a similar issue but I certainly did NOT reset any collations on purpose. I'm trying to get a match between the sysobjects.name and the objname returned by FN_LISTEXTENDEDPROPERTY from the extended properties table (or view or wherever they hide that stuff in SQL 2005). I tried your suggestion using both collations mentioned in the error -- but no luck. Here's the second attempt:

select o.[id] as 'table_id', o.[name] COLLATE Latin1_General_CI_AI as 'table_name',
0 as 'column_order', NULL as 'column_name', NULL as 'column_datatype',
NULL as 'column_length', Cast(e.value as varchar(500)) as 'column_description'
from sysobjects o
left join ::FN_LISTEXTENDEDPROPERTY(N'MS_Description', N'user',N'dbo',N'table', N'MyTable', null, default) e on o.name = e.objname
where o.name = 'MyTable'

Any thoughts? Thanks in advance.

|||

Hi,

Rewrite your join like this

on o.nameCOLLATE Latin1_General_CI_AS = e.objname

hth

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Superb! Works like a charm. Wonder how the COLLATIONS ever got out of synch on system tables?

|||

Doesn't appear to be a question of out of sync.
I've got the same behaviour on my installation.

If I find some time I'll try to figure out why.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Doesn't appear to be a question of out of sync.
I've got the same behaviour on my installation.

If I find some time I'll try to figure out why

Any progress on this one? I'm having a little trouble understanding when I need to add this COLLATE clause.

Dave

|||

Something odd is definitely going on here. We just moved to SQL Server 2005 and this problem is coming up. These are fresh installs of 2k5 and we didn't change any collations on the system meta-views. The default install options, I believe, were accepted on this.

BTW, I'm getting this error on a user database that we scripted as a CREATE Database from a production db. It has a compatibility of 90, not 80, and does have the collation of SQL_Latin1_CP1_CI_AS. All the system databases on SQL 2000 has that same collation. When I look at the properties of the system dbs on 2k5, the collation is also SQL_Latin1_CP1_CI_AS, so maybe it's a column collation issue?

Point is, I don't see a collation for Latin1_General_CI_AI anywhere on my SQL 2k5 server. So why am I getting this error?

Catadmin

|||

Same thing here. This SQL joins input from two system sources. Why they are coming up as two different collations I do not yet know. The objname from the extended property and the table_name (changed to colObjectName in the query) from sp_tables seem to use two different collations. Our install was a converstion from SQL 2000 to SQL 2005 but all DBs are set to Compatibility level of 90 and using SQL_Latin1_General_CP1_CI_AS. I'll keep digging but hopefully someone will post a quick answer here. This is also reproduceable on a test server that was not a conversion from SQL 2005 (was a fresh install).

Select colObjectName,Convert(varchar(1000),value)as colDescription

From(

Select table_name as colObjectName

FromOpenquery(yourservername,'yourdbname..sp_tables')

) procs

LeftJoin

::FN_LISTEXTENDEDPROPERTY (

'Description',

'User','dbo',

'Table',default,default,default

)

on colObjectName

-- collate SQL_Latin1_General_CP1_CI_AS --uncomment this line is required to work on our server

= objname

Where colObjectName like'tbl%' --the prefix we use for in house developed tables

|||I did some research, and my guess is that fn_listextendedproperty returns the property of
mssqlsystemresource, although I have not verified that mssqlsystemresource has this collation. I suspect that this is difficult to address in terms of functionality. Remember that the resouce database is like a DLL, so it cannot be in the server collation, it must always be in one and the same collation.

What should be done is to document it. I filed
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=287215

Msg 468, Level 16, State 9, Line 1 --Cannot resolve the collation conflict between "Lat

execute the following in any user database...

So far I've been able to only reproduce this on SQL 2005 Standard instances..for some reason I don't get the error on Enterprise server.

It appears that perhaps the system objects have different collation attributes..?!!

select name from sysusers where name not in ( select name from master..syslogins )

Microsoft SQL Server 2005 - 9.00.1399.06 (X64)

Oct 14 2005 00:35:21

Copyright (c) 1988-2005 Microsoft Corporation

Standard Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 1)

(1 row(s) affected)

Msg 468, Level 16, State 9, Line 1

Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

This is because your master is in a different collation than your user database.

Try adding the COLLATE to your query.

select name from sysusers where name not in ( select name COLLATE Latin1_General_CI_AI from master..syslogins )

Not sure which collation is your master's but just make sure they use the same collation for the comparison.

I personally like to keep all my collations the same over the entire server.

hth

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Wesley- I have a similar issue but I certainly did NOT reset any collations on purpose. I'm trying to get a match between the sysobjects.name and the objname returned by FN_LISTEXTENDEDPROPERTY from the extended properties table (or view or wherever they hide that stuff in SQL 2005). I tried your suggestion using both collations mentioned in the error -- but no luck. Here's the second attempt:

select o.[id] as 'table_id', o.[name] COLLATE Latin1_General_CI_AI as 'table_name',
0 as 'column_order', NULL as 'column_name', NULL as 'column_datatype',
NULL as 'column_length', Cast(e.value as varchar(500)) as 'column_description'
from sysobjects o
left join ::FN_LISTEXTENDEDPROPERTY(N'MS_Description', N'user',N'dbo',N'table', N'MyTable', null, default) e on o.name = e.objname
where o.name = 'MyTable'

Any thoughts? Thanks in advance.

|||

Hi,

Rewrite your join like this

on o.name COLLATE Latin1_General_CI_AS = e.objname

hth

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Superb! Works like a charm. Wonder how the COLLATIONS ever got out of synch on system tables?

|||

Doesn't appear to be a question of out of sync.
I've got the same behaviour on my installation.

If I find some time I'll try to figure out why.

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

Doesn't appear to be a question of out of sync.
I've got the same behaviour on my installation.

If I find some time I'll try to figure out why

Any progress on this one? I'm having a little trouble understanding when I need to add this COLLATE clause.

Dave

|||

Something odd is definitely going on here. We just moved to SQL Server 2005 and this problem is coming up. These are fresh installs of 2k5 and we didn't change any collations on the system meta-views. The default install options, I believe, were accepted on this.

BTW, I'm getting this error on a user database that we scripted as a CREATE Database from a production db. It has a compatibility of 90, not 80, and does have the collation of SQL_Latin1_CP1_CI_AS. All the system databases on SQL 2000 has that same collation. When I look at the properties of the system dbs on 2k5, the collation is also SQL_Latin1_CP1_CI_AS, so maybe it's a column collation issue?

Point is, I don't see a collation for Latin1_General_CI_AI anywhere on my SQL 2k5 server. So why am I getting this error?

Catadmin

|||

Same thing here. This SQL joins input from two system sources. Why they are coming up as two different collations I do not yet know. The objname from the extended property and the table_name (changed to colObjectName in the query) from sp_tables seem to use two different collations. Our install was a converstion from SQL 2000 to SQL 2005 but all DBs are set to Compatibility level of 90 and using SQL_Latin1_General_CP1_CI_AS. I'll keep digging but hopefully someone will post a quick answer here. This is also reproduceable on a test server that was not a conversion from SQL 2005 (was a fresh install).

Select colObjectName, Convert(varchar(1000),value) as colDescription

From (

Select table_name as colObjectName

From Openquery (yourservername,'yourdbname..sp_tables')

) procs

Left Join

::FN_LISTEXTENDEDPROPERTY (

'Description',

'User','dbo',

'Table', default, default, default

)

on colObjectName

-- collate SQL_Latin1_General_CP1_CI_AS --uncomment this line is required to work on our server

= objname

Where colObjectName like 'tbl%' --the prefix we use for in house developed tables

|||I did some research, and my guess is that fn_listextendedproperty returns the property of
mssqlsystemresource, although I have not verified that mssqlsystemresource has this collation. I suspect that this is difficult to address in terms of functionality. Remember that the resouce database is like a DLL, so it cannot be in the server collation, it must always be in one and the same collation.

What should be done is to document it. I filed
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=287215

msg 3721

I tried to run the following in query analyzer:
ALTER TABLE Products_table enable Trigger XXX_ins_upd_trg;
But I got the error message : Server: Msg 3721, Level 16, State 1, Line 1
And I tried to search Microsoft support website for this message and none of
them is relevant to my case. Can anyone please help? Thanks.
Hi,
See if the table name provided is correct.
Thanks
Hari
" 009SteveJobs" <steve@.jobs.com> wrote in message
news:uyEImlEDHHA.4024@.TK2MSFTNGP04.phx.gbl...
>I tried to run the following in query analyzer:
> ALTER TABLE Products_table enable Trigger XXX_ins_upd_trg;
> But I got the error message : Server: Msg 3721, Level 16, State 1, Line 1
> And I tried to search Microsoft support website for this message and none
> of them is relevant to my case. Can anyone please help? Thanks.
>
|||Just checked. It's correct.
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:Owr6xIFDHHA.4396@.TK2MSFTNGP02.phx.gbl...
> Hi,
> See if the table name provided is correct.
> Thanks
> Hari
> " 009SteveJobs" <steve@.jobs.com> wrote in message
> news:uyEImlEDHHA.4024@.TK2MSFTNGP04.phx.gbl...
>

msg 3721

I tried to run the following in query analyzer:
ALTER TABLE Products_table enable Trigger XXX_ins_upd_trg;
But I got the error message : Server: Msg 3721, Level 16, State 1, Line 1
And I tried to search Microsoft support website for this message and none of
them is relevant to my case. Can anyone please help? Thanks.Hi,
See if the table name provided is correct.
Thanks
Hari
" 009SteveJobs" <steve@.jobs.com> wrote in message
news:uyEImlEDHHA.4024@.TK2MSFTNGP04.phx.gbl...
>I tried to run the following in query analyzer:
> ALTER TABLE Products_table enable Trigger XXX_ins_upd_trg;
> But I got the error message : Server: Msg 3721, Level 16, State 1, Line 1
> And I tried to search Microsoft support website for this message and none
> of them is relevant to my case. Can anyone please help? Thanks.
>|||Just checked. It's correct.
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:Owr6xIFDHHA.4396@.TK2MSFTNGP02.phx.gbl...
> Hi,
> See if the table name provided is correct.
> Thanks
> Hari
> " 009SteveJobs" <steve@.jobs.com> wrote in message
> news:uyEImlEDHHA.4024@.TK2MSFTNGP04.phx.gbl...
>>I tried to run the following in query analyzer:
>> ALTER TABLE Products_table enable Trigger XXX_ins_upd_trg;
>> But I got the error message : Server: Msg 3721, Level 16, State 1, Line 1
>> And I tried to search Microsoft support website for this message and none
>> of them is relevant to my case. Can anyone please help? Thanks.
>>
>|||You didn't post the message text. I looked in SQL Server 2000 sysmessages table and didn't find
error 3721, which makes it very hard for us to suggest something.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
" 009SteveJobs" <steve@.jobs.com> wrote in message news:e88ceZFDHHA.3604@.TK2MSFTNGP03.phx.gbl...
> Just checked. It's correct.
>
> "Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
> news:Owr6xIFDHHA.4396@.TK2MSFTNGP02.phx.gbl...
>> Hi,
>> See if the table name provided is correct.
>> Thanks
>> Hari
>> " 009SteveJobs" <steve@.jobs.com> wrote in message news:uyEImlEDHHA.4024@.TK2MSFTNGP04.phx.gbl...
>>I tried to run the following in query analyzer:
>> ALTER TABLE Products_table enable Trigger XXX_ins_upd_trg;
>> But I got the error message : Server: Msg 3721, Level 16, State 1, Line 1
>> And I tried to search Microsoft support website for this message and none of them is relevant to
>> my case. Can anyone please help? Thanks.
>>
>>
>

msg 3721

I tried to run the following in query analyzer:
ALTER TABLE Products_table enable Trigger XXX_ins_upd_trg;
But I got the error message : Server: Msg 3721, Level 16, State 1, Line 1
And I tried to search Microsoft support website for this message and none of
them is relevant to my case. Can anyone please help? Thanks.Hi,
See if the table name provided is correct.
Thanks
Hari
" 009SteveJobs" <steve@.jobs.com> wrote in message
news:uyEImlEDHHA.4024@.TK2MSFTNGP04.phx.gbl...
>I tried to run the following in query analyzer:
> ALTER TABLE Products_table enable Trigger XXX_ins_upd_trg;
> But I got the error message : Server: Msg 3721, Level 16, State 1, Line 1
> And I tried to search Microsoft support website for this message and none
> of them is relevant to my case. Can anyone please help? Thanks.
>|||Just checked. It's correct.
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:Owr6xIFDHHA.4396@.TK2MSFTNGP02.phx.gbl...
> Hi,
> See if the table name provided is correct.
> Thanks
> Hari
> " 009SteveJobs" <steve@.jobs.com> wrote in message
> news:uyEImlEDHHA.4024@.TK2MSFTNGP04.phx.gbl...
>|||You didn't post the message text. I looked in SQL Server 2000 sysmessages ta
ble and didn't find
error 3721, which makes it very hard for us to suggest something.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
" 009SteveJobs" <steve@.jobs.com> wrote in message news:e88ceZFDHHA.3604@.TK2MSFTNGP03.phx.gbl
..
> Just checked. It's correct.
>
> "Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
> news:Owr6xIFDHHA.4396@.TK2MSFTNGP02.phx.gbl...
>