December 23, 2008 at 8:40 am
case scenario is this: a database named OptCon exists on two different computers(i.e Computer A and Computer B) on the same network, and i need to copy a particular table from OptCon in Computer A into OptCon in Computer B. how can i get this solved? :-S
your quick response will highly be appreciated.
Thanks friends.
December 23, 2008 at 8:45 am
You can use the import/export wizard to do this
or
create an SSIS package
or
Setup a Linked server and use INSERT INTO.
I would go with the SSIS package..
December 23, 2008 at 8:54 am
Those are all great options, you can also use OpenRowset with select into to avoid setting up a permanent linked server.
Also, you can look at a combination of SQL Compare and SQL Data Compare to copy it. The advantage of this one is that it will copy the entire structure to include constraints whereas most of other options mentioned so far won't.
---
Timothy A Wiseman
SQL Blog: http://timothyawiseman.wordpress.com/
December 23, 2008 at 9:28 am
Thanks! but as you can see am a newbie, could you please give a highlight of what i'd need to do so that i can grasp it once and for all? av tried setting up a linked server, but it's failing. Kindly help with the highlights of the processes involved using a case scenario. Kip in mind that it involves two different computers.
I shall be very grateful if yu cud help with this.
regards.
December 23, 2008 at 9:36 am
Thanks! but as you can see am a newbie, could you please give a highlight of what i'd need to do so that i can grasp it once and for all? av tried setting up a linked server, but it's failing. Kindly help with the highlights of the processes involved using a case scenario. Kip in mind that it involves two different computers.
I shall be very grateful if yu cud help with this.
regards.
December 23, 2008 at 10:04 am
what is the error that you are getting when setting up a linked server?
December 23, 2008 at 10:54 am
it's asking me for product name, data source. and i dont know which service (from the various OLE DB Provider) to select. infact i dont understand the process.
Thanks.
December 23, 2008 at 11:10 am
You want the OLEDB for SQL Server provider, input the second server name and then valid credentials to connect.
December 23, 2008 at 2:48 pm
And while you don't seem to be quite there yet, a simple SQL script using the four part naming convention would be as follows:
--edit - delete computerB.OptCon.dbo.tablename - then the following....
insert into computerB.OptCon.dbo.tablename select * from computerA.OptCon.dbo.tablename
-- You can't be late until you show up.
December 23, 2008 at 5:53 pm
Check this link and it explains to step wise how to setup linked server
December 24, 2008 at 9:39 am
this is the error i get when i ran a query against the linked server i created. the name of the linked server is SERVERLINK.
error thus:
OLE DB provider "SQLNCLI" for linked server "SERVERLINK" returned message "Invalid authorization specification".
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "SQLNCLI" for linked server "SERVERLINK" reported an error. Authentication failed.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "SQLNCLI" for linked server "SERVERLINK"
December 24, 2008 at 9:54 am
I'm not familiar with SQL2005 but in SQL2000, when opening the properties on my linked server, there is a security tab. If compatible in 2005, what do you have listed on that pane? Mine connects as a specific security context and I supply the user and password on that pane.
-- You can't be late until you show up.
December 24, 2008 at 9:56 am
this is the error i get when i ran a query against the linked server i created. the name of the linked server is SERVERLINK.
error thus:
OLE DB provider "SQLNCLI" for linked server "SERVERLINK" returned message "Invalid authorization specification".
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "SQLNCLI" for linked server "SERVERLINK" reported an error. Authentication failed.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "SQLNCLI" for linked server "SERVERLINK"
December 24, 2008 at 10:06 am
run this and post what is returned. look it up in BOL.
sp_helplinkedsrvlogin
-- You can't be late until you show up.
December 24, 2008 at 11:05 am
thanks. i ran and executed the sp_helplinkedsrvlogin, but it's only returning the different logins security i have on the linked server.what i need now is how to use the linked server to communicate to different databases on different servers.
thanks.
Viewing 15 posts - 1 through 14 (of 14 total)
You must be logged in to reply to this topic. Login to reply