Discussion Locked

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

0 helpful
12 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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,
matt

12 replies

by tony hopkinson

.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.

by tony hopkinson

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.

by now left tr

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.

by johnnysacks

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?

by nick.mcdermaid

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.

by now left tr

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!

by johnnysacks

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.

by tig2

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.

by techexec2

Quite frankly...

You get what you pay for, dude.

Hire American IT software engineers. And, you really shouldn't ask for free help. Sign a fair contract and pay an American to get your job done for you.

Consider this a "learning experience". I have NEVER hired an offshore Indian software engineer and I have never regretted it. It was worth every penny. Think about it.

by tony hopkinson

I'd be more concerned with the apparent lack of documentation. No mentions of reviews, deliverables, phasing. These are critical enough in internal projects, external ones. They are mandatory.
Phased payment schedule based on deliverables is worth it, even if it costs a bit extra. I mean if this turns out really bad, he could have effectively ended up with nothing.

To be brutal, if I was the person responsible at my end for this situation, I'd be kicking myself up the arse. The first rule of all rules in business software development, is to minimise the amount of resource you expend finding out things won't work.

This discussion is closed to new replies.