Showing posts with label temp. Show all posts
Showing posts with label temp. Show all posts

Wednesday, March 21, 2012

Problem populating temp table from linked server.

Hello,

I have a 2000 sql server linked to a 2005 sql server an I am trying to return data across the link. If I just run the sp I get the data back fine but if I try to Insert the data into a temp table the process just hangs and has to be killed.

This works fine:

EXEC [MyLink].[MyDocs].[dbo].[spGetSearchWrapper] -- (returns 156k records in about 2 sec.)

However inserting the results into a local temp table never returns. In fact the process never really runs.

CREATE TABLE #tmpOrgResult
(
intObjectID INT NOT NULL,
intObjectTypeCodeID INT NOT NULL

)
GO

-- Insert org records that match the search.
INSERT INTO #tmpOrgResult
(
intObjectID,
intObjectTypeCodeID
)
EXEC [MyLink].[MyDocs].[dbo].[spGetSearchWrapper] -- (This statement just hangs)

Try with

SET REMOTE_PROC_TRANSACTIONS OFF

before the INSERT statement. What I suspect happens is the local transaction is promoted to a distributed one and something gets messed up.

Zlatko

|||

You are correct it is getting promoted to a distributed transaction. Turns out MSDTC was off by default on the server. The following article showed me how to enable it. Works like a champ now.

http://support.microsoft.com/?kbid=873160

|||You are welcome.

Monday, February 20, 2012

Problem inserting into a Text field in a temp table after SP3

I have a stored proc that is inserting data into a Text field. This was
working fine on Friday, but today throws the following error:
ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 55 generated fatal exception c0000005
EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
Yesterday we upgraded our SQL server from SP2 to SP3, and today we upgraded
3 to 3a after finding this problem. We found the KB article 817359 which
seems to be related, but if we change their example from nText & nVarchar to
Text and Varchar we still get the error (the same one as above). Can anyone
tell me how to fix this problem?
TIA
Ron LounsburyRon,
You should contact PSS to report this. An AV normally means a bug in
sqlserver. You should not be charged for this incident.
--
-oj
RAC v2.2 & QALite!
http://www.rac4sql.net
"Ron Lounsbury" <rlounsbury AT Progeny DOT net> wrote in message
news:uwvRfPrsDHA.1788@.tk2msftngp13.phx.gbl...
> I have a stored proc that is inserting data into a Text field. This was
> working fine on Friday, but today throws the following error:
> ODBC: Msg 0, Level 19, State 1
> SqlDumpExceptionHandler: Process 55 generated fatal exception c0000005
> EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
> Yesterday we upgraded our SQL server from SP2 to SP3, and today we
upgraded
> 3 to 3a after finding this problem. We found the KB article 817359 which
> seems to be related, but if we change their example from nText & nVarchar
to
> Text and Varchar we still get the error (the same one as above). Can
anyone
> tell me how to fix this problem?
> TIA
> Ron Lounsbury
>|||OJ
Thanks for the response. It was a bug that they have a fix for, but you
have to call them to get it.
Ron Lounsbury
"oj" <nospam_ojngo@.home.com> wrote in message
news:eJjF$jrsDHA.4056@.TK2MSFTNGP11.phx.gbl...
> Ron,
> You should contact PSS to report this. An AV normally means a bug in
> sqlserver. You should not be charged for this incident.
> --
> -oj
> RAC v2.2 & QALite!
> http://www.rac4sql.net
>
> "Ron Lounsbury" <rlounsbury AT Progeny DOT net> wrote in message
> news:uwvRfPrsDHA.1788@.tk2msftngp13.phx.gbl...
> > I have a stored proc that is inserting data into a Text field. This was
> > working fine on Friday, but today throws the following error:
> >
> > ODBC: Msg 0, Level 19, State 1
> > SqlDumpExceptionHandler: Process 55 generated fatal exception c0000005
> > EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.
> >
> > Yesterday we upgraded our SQL server from SP2 to SP3, and today we
> upgraded
> > 3 to 3a after finding this problem. We found the KB article 817359
which
> > seems to be related, but if we change their example from nText &
nVarchar
> to
> > Text and Varchar we still get the error (the same one as above). Can
> anyone
> > tell me how to fix this problem?
> >
> > TIA
> > Ron Lounsbury
> >
> >
>