Solved

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

Posted on 2014-09-19
7
180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Audit has been really one of the more interesting, most useful, yet difficult to maintain topics in the history of SQL Server. In earlier versions of SQL people had very few options for auditing in SQL Server. It typically meant using SQL Trace …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 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