0

I need to import a table from a .sql with size of 55GB. But i cant open it in Server Management Studio because of memory, there is a way to import this table query to my database of another way?

3
  • 1
    So you have a script that contains insert statements? Try splitting the file into smaller parts and running those from command line.
    – vonPryz
    Feb 26, 2019 at 18:23
  • 1
    You should use PowerShell or SSIS to bulk import the data. SSMS is not ideal for large data.
    – Kin Shah
    Feb 26, 2019 at 18:50
  • If you can re-export the data in some other format, be it CSV or whatever, you would be better off. However, given a .sql file, I'd pull out my favorite programming tool, and read it in line by line. Every time you have a complete INSERT statement (and, if you are lucky, it is one line per INSERT), execute it against the target database. Alternately, you can correctly split this into, say, 10k row files through a read-save-write out 10k rows into new file, repeat process. Feb 26, 2019 at 22:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.