July 20, 2009 at 9:48 am
Hi,
I am trying to insert into another sql server using linked server
SQL Query is:
INSERT INTO OPENQUERY(SE755_VISTA, 'SELECT FormType,FormNumber,ScanDateTime,DuplicateChecked
BatchNum,SeqNum,FormImage FROM Biovail_Images.dbo.FORMIMAGES' )
SELECT * FROM OPENQUERY(SE755_VISTA,'SELECT FormType,''BIOTELE98_10'',ScanDateTime,DuplicateChecked,
BatchNum,SeqNum,FormImage FROM Biovail_Images.dbo.FORMIMAGES
where Biovail_Images.dbo.FORMIMAGES.formnumber =''BIOTELE98''')
but it's throwing an error
OLE DB provider "SQLNCLI" for linked server "SE755_VISTA" returned message "Login timeout expired".
OLE DB provider "SQLNCLI" for linked server "SE755_VISTA" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.".
Msg 53, Level 16, State 1, Line 0
Named Pipes Provider: Could not open a connection to SQL Server [53].
Any idea??
Thanks..
Thanks.
Gunjan.
July 20, 2009 at 9:57 am
INSERT INTO OPENQUERY(SE755_VISTA, 'SELECT FormType,FormNumber,ScanDateTime,DuplicateChecked
BatchNum,SeqNum,FormImage FROM Biovail_Images.dbo.FORMIMAGES' )
check to make sure all of your columns are separated by commas.
DuplicateCheck and BatchNum don't have a comma between them.
July 20, 2009 at 9:59 am
Thanks for the reply Matt.
I chekced my table design and I forgot to set the identity specification for my ImageID column. but now it's throwing an sql server connection error.
Thanks.
Gunjan.
July 20, 2009 at 10:01 am
Yes Matt. you are right. that was the second error. now it worked.
Thanks a lot.
Thanks.
Gunjan.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply