Solved

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

Posted on 2014-09-19
7
173 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
how to import 7 53
SQL server 2008 SP4 29 33
Auditing in Azure SQL Database 3 28
Job Dependencies in SQL Server Agent: 1 14
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 …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 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

12 Experts available now in Live!

Get 1:1 Help Now