I tried using the stored procedure to connect to the external server bu am unable to connect by entering the correct server name, user name and password. I don't have network. I think it is possible without network or through IP address.
I tried to connect external server by using
sp_addlinkedserver 'externalserver', 'SQL Server'
and also I tried this
sp_addlinkedsvrlogins 'externalserver', 'windowsusername', 'sa', 'sa'
Select * From [externalserver].[mydatabase].[dbo].[mytable]
But it is not connected. How to do it?
How to connect to the external server to access to the external database to view the data and migrate the data into another identical database in my local system.
Your valuable suggestion and sample stored procedure will be helpful. It is very urgent.