.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Linked server from SQL Server 2008 R2 to SQL Server 2005 not working

Posted By:      Posted Date: September 30, 2010    Points: 0   Category :Sql Server
 

I'm trying to create a linked server from SQL Server r2 to SQL Server 2005 (both 64 bit Enterprise) using the following script

 EXEC master.dbo.sp_addlinkedserver
 @server = N'TestLS'
 ,@srvproduct='
 ,@provider='SQLOLEDB.1'
 ,@datasrc=N'dw_prod'
 ,@provstr='Integrated Security=SSPI;';
 
 GO

SELECT
    *
 FROM
    [TestLS].[I_OLAP].[dbo].[FACT_AUDIT]
I verified that the Kerberos is working.

When I try to run a four part query as below it gives me the error

Msg 18456, Level 14, State 1, Line 1
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
OLE DB provider "SQLNCLI10" for linked server "TestLS" returned message "Invalid connection string attribute".


If I try to set up the linked server against localhost (i.e. SQL 2008 R2, it works just fine).


Thanks,
GB


GBM


View Complete Post


More Related Resource Links

CLR stored procedures asssemblies working in sql server 2005 but giving issues over sql server 2008

  
Hi I developed CLR stored procedures assemblies using VS2005 and deployed in sql server 2005 are working fine. Currently we are migrating to sql server 2008. The same CLR assemblies are not working in 2008 version and raising following error. Here i created CLR assemblies in sql server 2008 using 'sa' user account which is having db_owner permission over 'mydatabase'. I am getting an error message like "A .NET Framework error occurred during execution of user-defined routine or aggregate". In sql logs showing messages like as -- Common language runtime (CLR) functionality initialized using CLR version v2.0.50727 from C:\Windows\Microsoft.NET\Framework\v2.0.50727\. -- AppDomain 2 (mydatabase.dbo[runtime].1) created.   Please let me know what may be the cause for this type of issues. Is there any specific backward compatibility settings has to be done over sql server 2008 or sql server 2008 R2 while using 2005 CLR routines?   Thanks in advance.  

restore SQL server 2005 database on new SQL server 2008 not working

  
please any one advice me ,i have Great Plain database on SQL server 2005 when i tried to install new SQL server 2008 and restore my Database the GreatPlain not working well as well the Data Base

2008 Report not working on 2005 report server

  

Hello, I have been researching this issue and it seems if I have created a report using 2008, I cannot upload it to a 2005 report server.

I just wanted to check and see if I have any other options than to re-create the report using 2005? Would copy/paste of the XML from 2008 to 2005 work?

Thanks! Linda

 


Distributed transaction using linked server not working in SQL Server 2008 64 bit

  

Hi. I have had an issue trying to get distributed transactions to work in SQL Server 2008 using a linked server. The error message I get is

OLE DB provider "SQLNCLI10" for linked server "pod1" returned message "No transaction is active.".
Msg 7391, Level 16, State 2, Line 3
The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "pod1" was unable to begin a distributed transaction.

My Environment:

Windows Server 2008 Enterprise 64 bit, SQL Server 2008 Enterprise 64 bit

Problem occurs with multiple different builds of SQL Server 2008 - I have been able to reproduce the problem with 10.0.1600.0, 10.0.1779.0 (CU 2), as well as 10.0.2531 (SP1)

 

I am aware that other people have had this issue and have reviewed all existing posts. I have verified that the MSDTC is configured correctly on both machines. I have also used DTCTester to verify that DTC is working correctly on all machines in question. None of the mentioned resolutions has solved this problem for me.

I am not seeing this problem occur on my 32 bit test machines - it is only occurring if at least one of the two machines is 64 bit.

 


Linked server issue on test box, post upgrade 2005 to 2008 R2

  

In an effort to do some testing prior to upgrading our environment to 2008 R2, I made a test instance on our Dev box.  2005 instance, copied as many things as I could think of from various other instances.  Made a basic linked server to our main cluster, had a repeating job to email me results of a query across that link every few hours.

 

Everything was working fine until the upgrade finished.  It completed at ~7pm.  The email at 6PM came through fine (while the upgrade was in progress), the email at 8pm didn't come through.  Checked various things (DB mail was still working, tested fine).  It couldn't access the data across the linked server.  I tried deleting that link and remaking it.  Errors out.  Tried running the same scripts we use to create our standard linked servers, error out.  The only ones that I can set up and function are links to other instances on the same box.

I've looked around at other fixes for this error message and none seem to make any difference.  Log in with Domain cred's, log in with the sa account, no difference.  I can connect from other instances & servers back to this one, just not outbound from this one.  And it worked prior to the upgrade I applied to it.  All other instances on the box are 2005 as well.

Here is the message I ge

Issue with linked server 2008 (and R2) not an issue in 2005

  

Hi,

I have been using SQL 2005 successfully to connect to tables in a 10g Oracle data warehouse. I have been using the 11g client.

I have tried several times to get this working in SQL Server 2008 (and R2) and have tried the 10g and 11g clients...

I do a query like Select top 100 * from DWD..DW.IC_TRAN_PND and I get the error: 

"Invalid data for type "numeric".

 

I have read about the reasons for this but is there a way to make it work like it does in SQL server 2005?


Cannot update Excel 2007 spreadsheet as linked server within SQL 2005 or SQL 2008 via ADO

  
Greetings!

I am having difficulty updating an Excel worksheet via the ACE.OLEDB.12.0
provider.

I have a worksheet defined as a linked server in SQL Server via this
provider, and all attempts to update the lone worksheet in this file as a
linked server results in the following:

OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "linked_excel"
returned message "Bookmark is invalid.".
Msg 7346, Level 16, State 2, Line 1
Cannot get the data of the row from the OLE DB provider
"Microsoft.ACE.OLEDB.12.0" for linked server "linked_excel".

The query:
update linked_excel...sheet1$ set error_col='hithere' where
)='G'

However, when I try to perform precisely the same update against the same
source via openrowset, it works, to-wit:

update openrowset('Microsoft.ACE.OLEDB.12.0','Excel
12.0;HDR=yes;Database=f:\path_to_file\filename.xlsx','select * from
[sheet1$]')
set error_col='hithere'
where
='G'

SELECT's performed against either version work properly.

The linked server behavior is consistent across SQL 2005 and 2008
installations.

I am concerned that this problem is an artifact of an OLEDB provider update that purposely disabled update b

Not working on Windows Server 2008

  

Hi,

 

I had the CSS friendly adapters working great on our old server (windows server 2003 - 32bit) and now we have moved to a 64 bit environment and now I can not get the CSS friendly adapters to work.

We are using SharePoint 2007.

Is there another work thru for 64bit environment.

I notice windows server 2008 has a directory  C:\Windows\Microsoft.NET\Framework64 would I be using the browser file in this directory???

Please help!


SQL server 2005 2008

  

i cant install sql server 2005 nor 2008 on my windows 7 os

i read about somthing like adding new account when installing sql 2008 to provision the server or so, but didnt know how,,,

can you plz help me??

 


Indexing services on window server 2008 is not working with .net

  
Hi, I am useing Microsoft indexing services in windows 2008 64 bit .I am getting error like "Exception from HRESULT: 0xC0000005" while i am createing  new catlog from .net 2.0.I am using  "ciodm.dll" for adding new catlog. i am using this code for create new catelog.   Dim Admin As New CIODMLib.AdminIndexServer   Admin.AddCatalog(varContractNo, txtCatelog.Text + "\" + varContractNo) Admin.Stop() Admin.Start() AddScope(txtDocFolderPath.Text, txtSite.Text, txtCatelogname.Text)   Please help me anybody have fixed this issue on window server 2008 64 bit.  

Replication between SQL Server 2005 and SQL Server 2008

  
Hi,    We were using SQL Server Transactional Replication between two SQL Server 2005 servers. Now we are going to upgrade the Publisher server to SQL Server 2008, Distributor Server remains as SQL Server 2005.     Can anyone let me know what is the challenges we need to face when configuring Replication between SQL Server 2005 and SQL Server 2008. Replication Method - Transactional Replication Distributor/Subscriber - SQL Server 2005 Publisher     -  SQL Server 208 Regards, Fazlu.

SQL Server 2008 Linked Server SELECT INTO issue

  
I have a SQL Server 2008 installation running on a clustered Windows Server 2008 R2. I am trying to execute a query on a remote SQL Server to create a table. In order to do so, I call a stored procedure on the remote SQL Server. The stored procedure's description is as follows: ------------------------------------- Create procedure [dbo].[USP_RemoteExec] @varSQL varchar(max) as declare @tempSql nvarchar(max); set @tempSql = CONVERT(nvarchar(max),@varSQL); exec sp_executesql @tempSql ------------------------------------- I pass the following command to the remote stored procedure as follows: exec [servername].[dbname].dbo.USP_RemoteExecute @varSQL='if object_id(''testdb.dbo.tmp_testEmpty3'') is not null drop table testdb.dbo.tmp_testEmpty3; create table testdb.dbo.tmp_testempty3(col1 int, col2 varchar(20));' go select * from [servername].testdb.dbo.tmp_testEmpty3 go This statement returns the following: --------------------------------- col1,col2 (0 row(s) affected) But, when I run the following statement: exec [servername].[dbname].dbo.USP_RemoteExecute @varSQL='if object_id(''testdb.dbo.tmp_testEmpty'') is not null drop table testdb.dbo.tmp_testEmpty; select * into testdb.dbo.tmp_testEmpty from (select top 10 mytab.[col1] as [col1] , mytab.[col2] as [col2] , mytab.[col3] as [col3] FROM testdb.dbo.mytab as [mytab] with (nolock)) as A' go select * from [

SQL Server 2005 as Distributor, Subscriber - SQL Server 2008 as Publisher

  
Hi,           I am creating a Distributor on SQL Server 2005 the server name is Server1 and Server1 is the Subscriber as well, we are using Push Subscription           Publisher is on SQL Server 2008, Server2. When i try to create a Publications, it throws the following error.          Server "Server1" is an Older Version of SQL Server and cannot be the Distributor for Server  'Server2'  Server1 - Distributor, Subscriber  Server2 - Publisher Is there any way to overcome this issue..? Regards, Fazlu.

Moving a Copy of SQL Report Server 2005 and Upgrade to 2008

  
Hello, We have SQL 2005 Report Server in a Windows 2003 64 bit server box. We want to create a copy of this report server database somewhere in the domain, so that we can access it for a different purpose. My question is, will there be any complications with this? I'm thinking about the encryption key that's needed to access the database. If we are successful with this, we might also want to upgrade to SQL 2008. Thanks for your help,   Elizabeth K.

Can SSAS 2005 run with Sql Server 2008 database engine?

  
Are there any known issues of running SSAS 2005 with SQL Server 2008 database engine?

SQL Server 2008 Linked Server SELECT INTO issue

  
I have a SQL Server 2008 installation running on a clustered Windows Server 2008 R2. I am trying to execute a query on a remote SQL Server to create a table. In order to do so, I call a stored procedure on the remote SQL Server. The stored procedure's description is as follows: ------------------------------------- Create procedure [dbo].[USP_RemoteExec] @varSQL varchar(max) as declare @tempSql nvarchar(max); set @tempSql = CONVERT(nvarchar(max),@varSQL); exec sp_executesql @tempSql ------------------------------------- I pass the following command to the remote stored procedure as follows: exec [servername].[dbname].dbo.USP_RemoteExecute @varSQL='if object_id(''testdb.dbo.tmp_testEmpty3'') is not null drop table testdb.dbo.tmp_testEmpty3; create table testdb.dbo.tmp_testempty3(col1 int, col2 varchar(20));' go select * from [servername].testdb.dbo.tmp_testEmpty3 go This statement returns the following: --------------------------------- col1,col2 (0 row(s) affected) But, when I run the following statement: exec [servername].[dbname].dbo.USP_RemoteExecute @varSQL='if object_id(''testdb.dbo.tmp_testEmpty'') is not null drop table testdb.dbo.tmp_testEmpty; select * into testdb.dbo.tmp_testEmpty from (select top 10 mytab.[col1] as [col1] , mytab.[col2] as [col2] , mytab.[col3] as [col3] FROM testdb.dbo.mytab as [mytab] with (nolock)) as A' go select * from [

Best practice for user defined error messages in SQL Server 2005/2008 --Need help

  
My requirement is to setup a standard practice for our team in handling DB erros and also  user defined messages. We are handling exceptions using Raiseerror method with in Try and Catch blocks.  For user defined message, we are using Sp_addmessage to add our application specific error/warning messages with error codess>80000.  Ex: 80001 | Company name already exists. please check. Here is the sample code ********************************************************************* CREATE PROCEDURE [dbo].[usp_CompanyProfile_insert]  -- Add the parameters for the stored procedure here  (@company_name VARCHAR(50),  @company_code VARCHAR(3),  @user_id INT  ) AS BEGIN  -- SET NOCOUNT ON added to prevent extra result sets from  -- interfering with SELECT statements.  SET NOCOUNT ON;  BEGIN TRY -- Begin Try Block      -- Validate company name   IF EXISTS (SELECT company_id FROM companyprofile WHERE company_name = @company_name)    RAISERROR(90021, 16, 1)      INSERT INTO companyprofile (company_name,       company_code,       createdby)   VALUES(@company_name,     @company_code,     @user_id)    END TRY  -- End Try Block &
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend