Re: SQL Server 2005 - Save tran save point name case sensitive?



xAvailx (bzamora.avastone@xxxxxxxxx) writes:
I checked the server and database collations. On both we are using the
English (US) default collation SQL_Latin1_General_CP1_CI_AS which
should be case insensitive.

I tried your sample code, and it worked as advertised. However, as soon
as I wrapped it in Try / Catch block, then I get the error in my
original post. Note that if I change, "Rollback Tran LOCALTRAN" to
"Rollback Tran localtran" I don't get any errors.

It appears that TRY/CATCH has nothing to do with it. Rather, it appears
that the identifier for SAVE TRANSACTION follows the database collation,
whereas the identifier for BEGIN TRANSACTION is always case-sensitive!
And it's not that it has to do with the server collation. I usually run
with a case-sensitive server collation, but I tried this on a case-
insensitive server, and the behaviour appear to be the same. That was an
SQL 2000 instance, but there does not seem to be any difference between
SQL 2000 and SQL 2005.

This is so completely weird that I submitted
http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackId=FDBK45704
and gave you credit for it. I did not vote it very high though.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: ODBC/OLE DB Connection Pool
    ... >> where I have changed the case of SA, despite the fact SQL Server treats ... > That depends on the server collation. ... properties - other things such as one connection containing a Workstation ID ...
    (microsoft.public.inetserver.asp.db)
  • Re: ODBC/OLE DB Connection Pool
    ... >> where I have changed the case of SA, despite the fact SQL Server treats ... > That depends on the server collation. ... properties - other things such as one connection containing a Workstation ID ...
    (microsoft.public.data.oledb)
  • Re: ODBC/OLE DB Connection Pool
    ... >> where I have changed the case of SA, despite the fact SQL Server treats ... > That depends on the server collation. ... properties - other things such as one connection containing a Workstation ID ...
    (microsoft.public.data.ado)
  • Re: Key sensitive
    ... Did you mean to say you want to change the server collation to be case ... please reply with your SQLServer version. ... SQL Server MVP ...
    (microsoft.public.sqlserver.setup)
  • Re: Query training -- Complex queries
    ... > Update PositionsEOM ... Here you don't have a derived table, but a correlated subquery. ... UPDATE in Books Online. ... is not written for SQL Server. ...
    (microsoft.public.sqlserver.server)