General discussion


How do you import .sql file into MS SQL 2000 Server?

By mdowner ·
I was working originally with what turned out to be a very unreliable offshore IT firm in India. I had to finally severe our working relationship
with them. They were about 70% complete even though they demanded 100% payment upfront.

My problem is they sent me all the site files and a database .sql file. I am in no way a DBA, my background is systems engineer. I have a local installation of SQL Server 2000 along with the Web host SQL 2000 Server. I am clueless how to get the data base (the .sql file)
into the MS SQL 2000 Server.

Sorry if I seem out of it, I am home with a
severe cold/flu.

Thanks in advance for you input/advice,

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Pucker up, this could hurt.

by Tony Hopkinson In reply to How do you import .sql fi ...

.sql is the default extension for a script.
In 2000 you would probably run Query Analyser. Open the .sql file and execute it (Click the green arrow)

Now whether this script will run is another question, if it does, what it does is a book of questions. Which bits of it mean what in terms of whatever spec you gave them, a twenty-six gold leaf bound collectors edition volume set.

Normally you would gave expected a backup of the database (.bak file by default). If all you've got is a script, it's either proven and will just go or you've got an unproven work in progress.

Employing them in the first place sounds like a mistake, severing the relationship in this apparent state definitely was.

Even if it works, you are in real difficulty without full documentation of what they've done up to press and how they were going to do the rest of it.

Go hire yourself a contract DBA, a local one this time, perhaps even one who knows his arse from his elbow. Get him or her (sorry ladies) to do a report on where you are. It might be minor, it could be an unmitigated disaster.

I trust this incident has sort of made you appreciate the potential pitfalls of outsourcing!

By the way, you need to get some sort of DBA resource in, get the contractor to advise you on that as well. Might just be a few hours a month, once the systems bedded in. You also need a database recovery strategy (backups et al). He or she will be able to help you with that as well.

Collapse -

Go hire yourself a contract DBA?

by NOW LEFT TR In reply to Pucker up, this could hur ...

That is outsourcing!

Or do you mean 'hire' as in works for you only?

Collapse -

Hmm Good point

by Tony Hopkinson In reply to Go hire yourself a contra ...

Outsourcing vs "Outsourcing" I must confess when I hear the term now I always think sack expensive locals and replace them with a much cheaper workforce. There's probably a reason for that.

I was thinking Contract DBA in a consultant role, report and recomendations. One of the things he could recommend is whether they need an inhouse resource, whether it's worthwhile to bung it off to another company, or whether a maintenance contract with a 'local' expert will be suitable. WEB based, 24/7 as well perhaps.

If the indian firm are as iffy as seems to be implying, finding out where he is at with the project and a real cost to complete is priority 1.
He needs a DBA with design experience as well not just admin.

Not enough info to even guess. Even if this firm were competent 30% missing, given you do performance tuning last , ..... Could be very scary. It would be very easy to get burnt again, especially as he has no expertise himself.

That issue I'd be addressing as fast as possible at least basic sql and admin concepts, even if he ends up employing some one full time.

Collapse -

Really tough situation however...

by NOW LEFT TR In reply to Hmm Good point

just hope the supplied the Schemma!

Collapse -

First Post Ever?>

by NOW LEFT TR In reply to How do you import .sql fi ...

They were about 70% complete even though they demanded 100% payment upfront.

Since when did this ever happen - who let this happen?

As for the SQL file. It is not a database but an SQL file. SQL being Structured Query Language. A series of instructions to query an existing database.

And database given would normally be in the .bak catagory. If you are sure this ius the DB file take a copy, change to .bak an then import it via Enterprise Man. Such instruction can be found on the web no problem.

Collapse -

... And If Its SQL

by JohnnySacks In reply to First Post Ever?>

Seems like the offshore firm was out of control so whatever the SQL file creates (database, tables, procedures, etc.) will most likely be out of date because nobody kept up with the maintenance required to synchronize what they created on-the-fly with the master script.

Just like incompetent firms in the 90's all over again but no legal recourse whatsoever available. Did they try strategic selective literacy on you or were they all f#%king illiterate 100% of the time?

Collapse -

Actually thats not quite right

by Nick.McDermaid In reply to First Post Ever?>

A SQL file doesn't necessarily just query the database. This particular file most likely contains DDL.

DDL will crate tables and database objects for you. Of course they will be empty but they will at least create the objects for you.

Collapse -

How can you tell??

by NOW LEFT TR In reply to Actually thats not quite ...

Disagree with - 'most likely' - most .sql files you encounter are just a Query, perhaps a DDL (SQL create commands) in the odd case!

"The Data Definition Language (DDL) part of SQL permits database tables to be created or deleted"

Was worth pointing out however but it is stll SQL commands!

Collapse -

In a Perfect World...

by JohnnySacks In reply to Actually thats not quite ...

There would be DDL commands to create the database, dba login, default user login, tables, insert statements to initialize all the lookup tables, and in short, do everything to set up a 100% clean database repetitively in their test environment and in the end, your production server.

Just a hand off of their development database as a backup dump would give you a mess of unused development objects mixed in with production objects.

Collapse -

Hey Matt

by Tig2 In reply to How do you import .sql fi ...

My partner and I are willing to take an in-depth look at your problem. We have together about 40 years combined experience in database and query.

I guess this is proof- hire American...

Tony and TechMail are right- what you have is a query. I am hoping that you have the .bak file (database) to run it against.

Not out to toast you- I understand business decisions. You can only do what you can. I'm just sorry that you ended up in this situation. At least we can look at your problem and hopefully give you some insight on what you have, balanced on your requirements, and help you to understand what you need to do next.

I hope this offer is helpful. Please feel free to peer me if there is any way we can help.

Related Discussions

Related Forums