Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Stored procedure to run results of view Expand / Collapse
Author
Message
Posted Thursday, September 5, 2013 2:33 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, December 16, 2013 11:53 PM
Points: 31, Visits: 92
I got it, this was an old copy of the original database i tested on but it didnt have that column. I created a new db copy and am busy running that query
Post #1491672
Posted Thursday, September 5, 2013 2:48 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, December 16, 2013 11:53 PM
Points: 31, Visits: 92
The copy database was a bit older and didn't contain that column. I created a new test db and restored this mornings backup.

Ran the query, but it errors out with the following:

OLE DB provider "SQLNCLI10" for linked server "23.23.209.111" returned message "Protocol error in TDS stream".
OLE DB provider "SQLNCLI10" for linked server "23.23.209.111" returned message "Communication link failure".
Msg 65535, Level 16, State 1, Line 0
Session Provider: Physical connection is not usable [xFFFFFFFF].
OLE DB provider "SQLNCLI10" for linked server "23.23.209.111" returned message "Communication link failure".
Msg 65535, Level 16, State 1, Line 0
Session Provider: Physical connection is not usable [xFFFFFFFF].
OLE DB provider "SQLNCLI10" for linked server "23.23.209.111" returned message "Communication link failure".
Msg 10054, Level 16, State 1, Line 0
TCP Provider: An existing connection was forcibly closed by the remote host.


Suspect it might be a network issue, as it can't be permissions (using sa account)

Will investigate some more
Post #1491679
Posted Thursday, September 5, 2013 3:14 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, December 16, 2013 11:53 PM
Points: 31, Visits: 92
Not sure my replies are going through. The column issue has been resolved.

Getting the following errors:

OLE DB provider "SQLNCLI10" for linked server "23.23.209.111" returned message "Protocol error in TDS stream".
OLE DB provider "SQLNCLI10" for linked server "23.23.209.111" returned message "Communication link failure".
Msg 65535, Level 16, State 1, Line 0
Session Provider: Physical connection is not usable [xFFFFFFFF].
OLE DB provider "SQLNCLI10" for linked server "23.23.209.111" returned message "Communication link failure".
Msg 65535, Level 16, State 1, Line 0
Session Provider: Physical connection is not usable [xFFFFFFFF].
OLE DB provider "SQLNCLI10" for linked server "23.23.209.111" returned message "Communication link failure".
Msg 10054, Level 16, State 1, Line 0
TCP Provider: An existing connection was forcibly closed by the remote host.

Might be a network connection either to or from the linked server. I can ping it fine though. Can't be permissions as I am using the sa account

Busy investigating
Post #1491685
Posted Thursday, September 5, 2013 4:20 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, December 18, 2014 1:43 AM
Points: 6,890, Visits: 14,254
You may get better performance if you detach the SELECT from the INSERT by running the results of the SELECT into a temp table.

Also, since your SELECT reads local and remote data, the INNER REMOTE JOIN hint may work for you depending on the relative size of the two tables.


“Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
Exploring Recursive CTEs by Example Dwain Camps
Post #1491701
Posted Thursday, September 5, 2013 4:27 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, December 16, 2013 11:53 PM
Points: 31, Visits: 92
Thanks Chris!!

I will have a look at that
Post #1491705
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse