Solved

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

Posted on 2014-09-19
7
174 Views
Last Modified: 2014-09-24
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
Comment
Question by:25112
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 48

Expert Comment

by:PortletPaul
ID: 40334017
1Gb of SQL?

what is the file's extension?
0
 
LVL 25

Assisted Solution

by:jogos
jogos earned 250 total points
ID: 40334237
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
 
LVL 5

Author Comment

by:25112
ID: 40334911
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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
LVL 48

Assisted Solution

by:PortletPaul
PortletPaul earned 125 total points
ID: 40334962
"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
 
LVL 25

Assisted Solution

by:jogos
jogos earned 250 total points
ID: 40336043
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
 
LVL 4

Accepted Solution

by:
parthmalhan earned 125 total points
ID: 40338534
did you try Notepad++.
Its a good tool. Try Opening your File in it.
0
 
LVL 5

Author Comment

by:25112
ID: 40342440
your directions helped- thank you-
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now