Hi Bijithbal
Have you try to run
SELECT *
FROM Db2.Databasename.dbo.table2 on your database server 1?
Could you retrieve any data back?
If not, have you receive any error message?
If you have receive some error message could you post it here any let us know?
I have not does it through LinkedServer Procedure
I create linked server via SQL Server management Studio 2005
Do you use SQL Server management Studio?
If so, maybe you could try to create the linked server again by using Management Studio.
Here it is the step:
1) Click on the database server where you want to add Linked Server to.
2) Click on the "+" sign of the "Server Object"
3) Right click on "Linked Servers" and Select "New linked Server"
Then fill in the details E.g. Provide a linked server name ...etc
If your another database server is SQL Server
-->On the Provider drop down list you can choose "Microsoft OLE DB Provider for SQL Server"
-->On the DataSource enter the database server name
then you can go to the Security tab to enter the security information
After that you can go to the server option.
-->Make sure data access option is true.
4) Then click on "OK"
5) You will be able to see the New Linked Server name under the "Linked Server" Folder
6) You should be able to see the database catelog as well as the database table.
E.G.
If you create the Linked Server name as "LS_DB2"
Then you can retrieve data by using
SELECT *
FROM
LS_DB2.[DatabaseName].dbo.Table2
You can then click on table2 and see if you can retrieve data from here.
Hope this help.