Showing posts with label connect. Show all posts
Showing posts with label connect. Show all posts

Friday, March 23, 2012

Multiple-step OLE DB operation generated errors

Hello....

I have two linked server... (ServerB and ServerC) which reside on ServerA. I am able to connect to the remote database using "Select" statements without any issues.

When I run this query, It is successful:

delete [SERVERB].MyDatabase.dbo.TableName
from [SERVERB].MyDatabase.dbo.TableName t1
Left join MyDatabase.dbo.TableName t2 on ( t1.ID = t2.ID and
t1.EmployeeNumber = t2.EmployeeNumber and
t1.AccountNumber = t2.AccountNumber)
where t2.ID is null;

However, when I change [SERVERB] to [SERVERC], I receive two errors:

"Could not find server 'ELEARN-FRM-BETA' in sysservers. Execute sp_addlinkedserver to add the server to sysservers."

And

OLE DB provider "SQLNCLI" for linked server "ELEARN-FRM-BETA" returned message "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".

When I run profiler on ServerC, I see traffic... mainly a whole bunch of exec "sp_cursorfetch" operations, so I know the connection is valid.

Any ideas?

Forch

Sorry... I forgot to mention that all three servers are SQL Server 2005 x64 edition with SP1.

Forch

sql

Friday, March 9, 2012

Multiple SqlDataSource Controls on a Page

Thanks for your help.

I'm just getting into ASP.NET 2.0 and started using the SqlDataSource control to declaritively connect to a database. I was wondering if I have two SqlDataSource controls on one page with two select commands querying the same database, will the that create to seperate instances of opening and closing the connection to the database, or will it open the database once, execute both queries, and then close the connection. It seems that if it creates two separate connections, it would still be more efficient to to connect to the database programmatically using ADO.NET. You would only need to make one trip to the database, pull down all of your data, and then close the connection.

Adrian

I believe it will open two connections. Which is what you would probably want anyhow. That would allow SQL Server to prioritize and minimize response time.

That said, most of the time you can write code to do things more efficiently than depending on a generic library. It's a trade off, and often the code you may generate may not actually be more efficient unless you are also able to spend the time to implement the more advanced features of the library, in this case, the controls ability to selectively databind and cache data.

Wednesday, March 7, 2012

multiple sql servers?

We are having some slow connections to our sql server. The server is located
at Site A, everyone at Site A can connect to the server through the LAN
quickly, just the way things should be. People at Site B, however, connect
to the SQL Server at Site A over a WAN; this causes the connection to be
slow. We were wondering if it is possible to install a second SQL Server at
Site B that will replicate with the server at Site A maybe once every night.
This way people at Site B could connect to a server that is on their LAN.
Hi,
Before doing that could you people verify with your network folks about the
network speed. It can be because of the slow network and can be solved.
Once you find that network can not be made fast, then probably you could
plan to setup a new database at Site B.
After that use some scripting mechanism / DTS / Logshipping to sync the
database with Site A.
Thanks
Hari
SQL Server MVP
"Benjamin" <Benjamin@.discussions.microsoft.com> wrote in message
news:717DC17B-C748-4718-AC0F-7420F280DDEE@.microsoft.com...
> We are having some slow connections to our sql server. The server is
> located
> at Site A, everyone at Site A can connect to the server through the LAN
> quickly, just the way things should be. People at Site B, however,
> connect
> to the SQL Server at Site A over a WAN; this causes the connection to be
> slow. We were wondering if it is possible to install a second SQL Server
> at
> Site B that will replicate with the server at Site A maybe once every
> night.
> This way people at Site B could connect to a server that is on their LAN.

multiple sql servers?

We are having some slow connections to our sql server. The server is locate
d
at Site A, everyone at Site A can connect to the server through the LAN
quickly, just the way things should be. People at Site B, however, connect
to the SQL Server at Site A over a WAN; this causes the connection to be
slow. We were wondering if it is possible to install a second SQL Server at
Site B that will replicate with the server at Site A maybe once every night.
This way people at Site B could connect to a server that is on their LAN.Hi,
Before doing that could you people verify with your network folks about the
network speed. It can be because of the slow network and can be solved.
Once you find that network can not be made fast, then probably you could
plan to setup a new database at Site B.
After that use some scripting mechanism / DTS / Logshipping to sync the
database with Site A.
Thanks
Hari
SQL Server MVP
"Benjamin" <Benjamin@.discussions.microsoft.com> wrote in message
news:717DC17B-C748-4718-AC0F-7420F280DDEE@.microsoft.com...
> We are having some slow connections to our sql server. The server is
> located
> at Site A, everyone at Site A can connect to the server through the LAN
> quickly, just the way things should be. People at Site B, however,
> connect
> to the SQL Server at Site A over a WAN; this causes the connection to be
> slow. We were wondering if it is possible to install a second SQL Server
> at
> Site B that will replicate with the server at Site A maybe once every
> night.
> This way people at Site B could connect to a server that is on their LAN.