Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

how to break 1GB sql file? (would not open as it is)

not sure if it is resource issue, but it just does not open the sql file in ssms. is there a tool to break into 10 pieces so i can run them one by one? (the code inside has to be customized.. so i have to open it change it then copy and run it one by one).. any options?
0
25112
Asked:
25112
  • 2
  • 2
  • 2
  • +1
4 Solutions
 
PortletPaulCommented:
1Gb of SQL?

what is the file's extension?
0
 
jogosCommented:
If it is a text-file there are splitters
powershell script to split per #rows
http://gallery.technet.microsoft.com/scriptcenter/Split-large-textfiles-into-e9b8f53e

Other tool
http://www.gdgsoft.com/gsplit/
0
 
25112Author Commented:
PortletPaul,

it is a *.sql file.. yes all sql script inside.. but needs to be customized before running.

jogos, will check out now if powershell can break .sql... hope it won't lose any lines in the break..  thanks for the option.
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
PortletPaulCommented:
"so i have to open it change it then copy and run it one by one"

A file splitter cannot be guaranteed to produce viable scripts
i.e they "cut" the file at arbitrary points (usually based on wanted piece size)

So I'm not confident about this approach.

How was the file generated in the first place?
 Can you re-generate it perhaps, and if so, address your needs before it gets into the 1Gb file?

Hope you succeed!
0
 
jogosCommented:
A splitter does indeed not garantee coherent end/beginning of scripts. But while the spripts has to be changed this is becomes the responsabillity of the changer.
0
 
parthmalhanCommented:
did you try Notepad++.
Its a good tool. Try Opening your File in it.
0
 
25112Author Commented:
your directions helped- thank you-
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now