473,406 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

VERY strange problem with DB Instance

I am sure this is a configuration or permissions problem, but I cannot
figure out what it might be.

I have 2 SQL 2000 database servers: one is a linked Windows 2003 based
server using a specified login account and the main server is Windows
2000. The user on the linked server is an SA. Both are running SP
3a.

I EXEC a select statement that selects data from this linked server
(shown below in detail) that runs just fine when executed by itself.
However, if I try to insert the results of the EXEC into a temp table
it NEVER returns! In fact through Profiler I can see that it never
even hits the other database. I left it running for an hour and 18
minutes one time. Even canceling the query took over 6 minutes. I am
doing my tests from Query Analyzer (logged in as an Admin), but my
ASPX pages fail as well.

So, here is the select statement that works:

DECLARE @SQLString varchar(1024)
SELECT @SQLString = 'select name, ''win2003-testsvr\Data1''
from
[win2003-testsvr\Data1].master.dbo.sysdatabases
where status & 1024 != 1024 --avoid read only
order by name'
EXEC(@SQLString)

The above query returns the results expected. However this query
never returns:
CREATE TABLE #tblDatabases
(
DBName nvarchar(256),
DBInstance varchar(128)
)
GO
DECLARE @SQLString varchar(1024)
SELECT @SQLString = 'select name, ''win2003-testsvr\Data1''
from
[win2003-testsvr\Data1].master.dbo.sysdatabases
where status & 1024 != 1024 --avoid read only
order by name'
INSERT INTO #tblDatabases EXEC(@SQLString)
GO
select * from #tblDatabases
drop table #tblDatabases

If, I run this query and use the name of the current database server,
it runs as expected. It is only when I try to access this particular
server that it hangs. Actually, I even replaced the server instance
above with another server instance running on a different Windows 2003
machine and that worked.

So this is obviously a configuration or permissions issue, but what
kind of setting or permission would cause an insert into a temp table
to fail for a select statement!!

Please HELP,
Vance
Jul 20 '05 #1
6 4936
Vance Kessler (vk******@peachtree.com) writes:
I EXEC a select statement that selects data from this linked server
(shown below in detail) that runs just fine when executed by itself.
However, if I try to insert the results of the EXEC into a temp table
it NEVER returns!


Hm, have you checked that MSTDC is running on the other machine?
--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2


Yes, the Distributed Transaction Coordinator (msdtc.exe) is running on
both systems.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #3
ermm - dumb q perhaps...

but have you double and triple checked all the columns, servername etc
are actually spelt right (poss incl case) - errors dont seem to
transmit well over the distributed transactions...specially if the
table doesnt exist.

Vance Kessler <vk******@peachtree.com> wrote in message news:<3f***********************@news.frii.net>...
Yes, the Distributed Transaction Coordinator (msdtc.exe) is running on
both systems.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 20 '05 #4
Vance Kessler <vk******@peachtree.com> wrote in message news:<3f***********************@news.frii.net>...
Yes, the Distributed Transaction Coordinator (msdtc.exe) is running on
both systems.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


I have no idea myself, but I found this on Google - the same problem,
caused by not rebooting after installing a servicepack:

http://groups.google.com/groups?hl=e...%40tkmsftngp09

Simon
Jul 20 '05 #5
I FOUND IT! I found the following in another post:

---------------------------------------------------------------
BY default Win 2003 server has the following two things disabled. You
need to enable them and reboot your win2003 sql server.
Under add/remove programs/windows components/application server/
enable network COM+ and Enable Network DTC access.
---------------------------------------------------------------
I found this when I noticed the following in the event log:

Event Type: Error
Event Source: MSDTC
Event Category: CM
Event ID: 4357
Date: 9/10/2003
Time: 8:16:34 AM
User: N/A
Computer: ANDROMEDA
Description:
MS DTC is unable to communicate with MS DTC on a remote system. No
common RPC protocol is supported between the two systems. Please
ensure that one or more of the following RPC protocols are common to
both systems: TCP/IP, SPX, or NetBEUI. Error Specifics:
..\iomgrclt.cpp:203, CmdLine: C:\WINNT\System32\msdtc.exe, Pid: 612

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 21 00 00 00 20 00 00 00 !... ...
Jul 20 '05 #6
I sure am glad you posted this. I've been trying to figure out this
problem for 2 weeks without success. I made the suggested changes and
the error went away after rebooting the server. Wheew!

TW

Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Moshe | last post by:
Page with a <form> action calls ASP page. The ASP page has the following structure <%@ LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Option Explicit %> <% Server.ScriptTimeOut=100 With Response...
0
by: john | last post by:
Hi,All Gurus: It is kind of complicated, please bear with me and let me know if you have any questions. Thanks a lot in advance. John I have a csharp method, using emit to dynamically generate...
1
by: mdurliSPAMFILTER | last post by:
Hello, I developed a win32 .exe CGI that connects to a clustered SQLServer to report some data. The software is written with Borland C++Builder. This is the oledb string:...
6
by: Werner Partner | last post by:
I use a page created by php. It should show two pictures of a person an a short text. If there are no picture, nothing is shown, if there is no text, nothing is shown. There a about 20...
5
by: cody | last post by:
I have a very funny/strange effect here. if I let the delegate do "return prop.GetGetMethod().Invoke(info.AudioHeader, null);" then I get wrong results, that is, a wrong method is called and I...
3
by: Trapulo | last post by:
I've two copy af the same asp.net application. The application enter on sql server, working with two separate databases (on the same sql server instance, of course). The connection is made with...
4
by: Praveen_db2 | last post by:
Hi All I am getting strange errors in my db2diag.log can any one tell me what these errors mean?? Following is the code from my db2diag.log...
10
by: conor.robinson | last post by:
The Problem (very basic, but strange): I have a list holding a population of objects, each object has 5 vars and appropriate funtions to get or modify the vars. When objects in the list have...
4
by: Gotch | last post by:
Hi, I'm getting a very strange behaviour while running a project I've done.... Let's expose it: I've two projects. Both of them use a Form to do some Gui stuff. Other threads pack up messages...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.