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?
LVL 5
25112Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
parthmalhanConnect With a Mentor Commented:
did you try Notepad++.
Its a good tool. Try Opening your File in it.
0
 
PortletPaulCommented:
1Gb of SQL?

what is the file's extension?
0
 
jogosConnect With a Mentor Commented:
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
[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

 
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
 
PortletPaulConnect With a Mentor Commented:
"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
 
jogosConnect With a Mentor Commented:
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
 
25112Author Commented:
your directions helped- thank you-
0
All Courses

From novice to tech pro — start learning today.