Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently attempting to import a 35MB sql file into a shared hosting database.

I am unable to connect directly to the database using sql management studio tools of any type.

I have only been given access to myLittleAdmin -

Current issues

We need to import 35MB data - breaking it up MANUALLY into 5mb chunks, we still cannot upload. Pasting directly into the textarea instead will make the browser hang.

Managed to paste a 4mb sql file into the textarea, but could not get it to process as it times out.

Hosting company is not providing access to

Nor are they willing to look into changing timeouts.

Any suggestions would be great :)

share|improve this question
up vote 1 down vote accepted

I assume that you have access to upload your own ASP/ scripts?

If so, you could write yourself a script that:

  1. downloads the file from another location
  2. reads the file a bit at a time, where one "bit" may be a CREATE TABLE statement or an INSERT statement (or perhaps a group if insert statements
  3. runs each bit of SQL against a fresh database database

Step one may need a little thought as that too could time out. Zipping the file would be a good idea if you have access to a library at the other end to unzip it. Failing that you could split the file into small chunks and have the script pull each part separately, appending each new block to the copy of the file it has. If you problem is script timeouts then this will still fail if the loop is in the script, but you could have a client side loop that requests each part be done with an synchronous xmlhttprequest:

  • browser loads an HTML page with client-side loop in it, which starts
  • client-side script requests the script on the server gets hold of part 1 of the file
  • the server doesn't return until it has part one
  • client-side script requests the script on the server gets hold of part 1 of the file
  • and so on...

The same sort of client side loop may be needed by parts two and three also.

The "get the file" (or "get the parts of the file") part would be able to read the file from another web location. This step can of course be skipped entirely if you can send the large file directly to the server via FTP or similar without problems (the script could then just read the file from local storage).

Though to be honest I'd probably look for a host that better suited my needs rather than writing a relatively complex couple of scripts to do what should be a simple one-off job.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.