Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
How to split large file on Windows?

I have a 100MB SQL file which my host won't let me upload all at once (2MB per upload).

The database is on a different server so I can't use SSH. I'm stuck with phpMyAdmin.

Is there any program that can split a 100MB SQL file into 2MB chunks?

share|improve this question

migrated from stackoverflow.com Aug 18 '11 at 13:29

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Mehper C. Palavuzlar, random Aug 18 '11 at 14:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Voted to migrate to Superuser, as this isn't a development question. –  Adam Robinson Aug 18 '11 at 13:22
    
Ohh man without ssh this going to be hard. Have you tried zipping it? I know it won't get you to 2MB but hopefully close. –  Amir Raminfar Aug 18 '11 at 13:23
1  
If a zip will do, several zipping apps can split files into custom sized chunks. –  MPelletier Aug 18 '11 at 13:31
    
@Mehper Might be not that trivial using SQL. –  slhck Aug 18 '11 at 13:40
1  
Isn't an SQL file simply a text file containing a list of create table and insert statements? If so surely it is amenable to splitting at statement boundaries in a text editor or script? –  RedGrittyBrick Aug 18 '11 at 14:08
show 1 more comment

1 Answer

You can give this script a try, it has helped me out a couple of times:

http://www.ozerov.de/bigdump/

Altho it does not always work as expected.

share|improve this answer
add comment