Solved

How do I  acess tables in SQL 2005 EXPRESS linked with SQL 2000 ?

Posted on 2008-10-15
8
189 Views
Last Modified: 2010-04-21
I created a linked server on SQL 2000 to  SQL EXPRESS 2005. I am able to view the linked tables in SQL 2000 server but i can't acess the tables.
0
Comment
Question by:jhbeggs
  • 4
  • 4
8 Comments
 
LVL 37

Expert Comment

by:momi_sabag
ID: 22721651
what do you mean can't access?
what are you trying to do?
did you try to select from them? what message did you receive?
0
 

Author Comment

by:jhbeggs
ID: 22721759
I can't access the contents of the tables.I am trying to insert values into the linked table from insert trigger on a table in sql 2000.But I am getting the following error:
System.Data.SqlClient.SqlException: Invalid object name 'linkedservername'.'tablename'.
Waiting for your reply.Thank you very much.
0
 
LVL 37

Expert Comment

by:momi_sabag
ID: 22721827
can you post here the insert statement?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:jhbeggs
ID: 22721939
I tried to insert values into a table in linked server after insert the values in a table in sql 2000 by using triggers.

CREATE TRIGGER trig_name ON [dbo].[tablename]
AFTER  INSERT
AS
BEGIN
DECLARE @staff_id VARCHAR(100)
DECLARE @weeknumber (100)
DECLARE @staff_id VARCHAR(100)
SELECT @staff_id= (SELECT staff_id FROM  Inserted)
SELECT @weeknumber = (SELECT weeknumber FROM  Inserted)
INSERT INTO  [TEST].[tbl_testexpense](staff_id,week_number) VALUES('@staff_id','@weeknumbe'r)
END
0
 
LVL 37

Expert Comment

by:momi_sabag
ID: 22721969
when using a linked server you have to specify the full table name:

linked_server_name.database_name.schema.table_name
0
 

Author Comment

by:jhbeggs
ID: 22722078
I specified the full table name  and execute ,Then i get the following error.
Access to the remote server is denied because no login-mapping exists.
0
 
LVL 37

Accepted Solution

by:
momi_sabag earned 500 total points
ID: 22728406
well,
you need to solve this issue... :-)
you need to create at the remote server the same login that you are using in your local server
are you using windows authentication or sql authentication?
0
 

Author Closing Comment

by:jhbeggs
ID: 31506314
SQL EXPRESS 2005 will not allow the creation of the same username and password as in SQL 2000.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Analysis of table use 7 54
display data in text field from data base for updating 6 65
Strange msg in the SSMS pane 13 58
Email Notifications for SQL 2005 9 35
I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question