Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Select..into clause using Linked server

Author  Topic 

rubs_65
Posting Yak Master

144 Posts

Posted - 2009-02-02 : 13:29:34
Hi,

We have an script that moves data from Oracle to SQL Server using linked
server:
SELECT * INTO TAB_A FROM LINKED..DB.TAB_A GO

If SQL Server is in Simple or Bulk-logged recovery mode, would this Select..Into will do bulk copy (minimal logging)?

Thanks
--rubs

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-02 : 13:32:25
How big is oracle table/data you are moving? I would use SSIS instead or Bulk-insert. Yes Simple or Bulk-Recovery model will do minimall logging but depends on whether you are doing in batches or single transaction.
Go to Top of Page

mfemenel
Professor Frink

1421 Posts

Posted - 2009-02-02 : 13:59:14
Always be careful using select into especially in this situation. When you use select into, it will generate a schema lock on your database until the operation completes. It depends on your particular setup but it it's never going to be fast coming from a completely different database and you end up with a log jam in your database if you have other "select into" statements in other queries.

Mike
"oh, that monkey is going to pay"
Go to Top of Page
   

- Advertisement -