Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Tuesday, March 27, 2012

Converting Data from Access 2000 to SQL Server 2000

Hi,
I worked on a project in ASP.NET using SQL server 2000 as the back end. Its a conversion application that I rewrote in ASP.NET using C#. I need to import the old data in Access db into SQL server 2000 and I have very little knowledge about doing it. The data in not a direct one -one transformation. There are considerable changes to the Database design and data types. Any help and suggestions wud be really helpful. Also, any article links wud be great.

Thanks.
HOW TO: Convert an Access Database to SQL Server

Sunday, March 25, 2012

converting access db to mysql

Hey people,

I have to convert MS Access 2000 database into mysql database, the whole
thing being part of this project I'm doing for one of my faculty
classes. My professor somehow presumed I knew db's and gave me long list
of things to do with that particular database, first thing being that
particular conversion. Truth is that I don't know a first thing about
db's, let alone using mysql... I downloaded mysql form www.mysql.com and
still searching for MS Access 2000 (it doesn't work with 2003 I have,
or I don't know how to make it work).

Any kind of help will be welcomed and highly appreciated!!!

Thanks,

MarioCenturies ago, Nostradamus foresaw when chicha <mario@.blindsight.org> would write:
> Hey people,
> I have to convert MS Access 2000 database into mysql database, the
> whole thing being part of this project I'm doing for one of my
> faculty classes. My professor somehow presumed I knew db's and gave
> me long list of things to do with that particular database, first
> thing being that particular conversion. Truth is that I don't know a
> first thing about db's, let alone using mysql... I downloaded mysql
> form www.mysql.com and still searching for MS Access 2000 (it
> doesn't work with 2003 I have, or I don't know how to make it work).
> Any kind of help will be welcomed and highly appreciated!!!

Hmm.

It sounds as though you're interested in sorts of assistance that
would be considered to be academic offenses.

Thanks for the offer to "aid and abet," but no thanks.
--
let name="cbbrowne" and tld="ntlug.org" in name ^ "@." ^ tld;;
http://www.ntlug.org/~cbbrowne/multiplexor.html
Rules of the Evil Overlord #40. "I will be neither chivalrous nor
sporting. If I have an unstoppable superweapon, I will use it as early
and as often as possible instead of keeping it in reserve."
<http://www.eviloverlord.com/>|||"Christopher Browne" <cbbrowne@.acm.org> wrote in message
news:2pu2isFonehqU1@.uni-berlin.de...

> It sounds as though you're interested in sorts of assistance that
> would be considered to be academic offenses.

This one doesn't sound like "do my homework for me" to me.

It's more like "moving from one db to the other is a preliminary step before
the project can really begin".

Of course, in any project like this, it's always the first step that's the
giant killer.|||Hi, Mario.

> My professor somehow presumed I knew db's and gave me long list
> of things to do with that particular database, first thing being that
> particular conversion. Truth is that I don't know a first thing about
> db's, let alone using mysql...

You have set yourself up for failure. The first thing you should do is go
back to your professor and explain that you got carried away by the
excitement of the project assignment, but that you now realize that this
database conversion is way over your head. How can one tell this is way
over your head? Reread the following statement that you made:

> still searching for MS Access 2000 (it doesn't work with 2003 I have,
> or I don't know how to make it work).

Access 2000 is the default database format for Access 2000, 2002, and 2003.
This is going to sound harsh, but if you can't figure out "how to make it
work," then either you aren't using any of these versions of Access or don't
know how to open an Access database file with Access. Might you be using
Access 97 or another application in the Office 2003 suite in your attempts
to open the Access 2000 database?

Converting a database from Access to MySQL isn't just selecting a menu item
to launch a Wizard and assigning a path and file name to the new MySQL
database through the Wizard GUI. You can probably export each of the tables
from the Access database to *.CSV files that can be imported into MySQL, but
you've got to do the relational database design and likely the table
creation first in MySQL. None of the queries, forms, reports, macros,
modules or data access pages can be exported from Access into a format that
MySQL can read and convert into a MySQL format for the new database.

The scope of this project is so vast that the type of help you need is for
someone to do the entire project for you. However, since this is a class
project, I doubt you'll get much assistance from the News Groups.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)

"chicha" <mario@.blindsight.org> wrote in message
news:chcfuv$n00$1@.bagan.srce.hr...
> Hey people,
> I have to convert MS Access 2000 database into mysql database, the whole
> thing being part of this project I'm doing for one of my faculty
> classes. My professor somehow presumed I knew db's and gave me long list
> of things to do with that particular database, first thing being that
> particular conversion. Truth is that I don't know a first thing about
> db's, let alone using mysql... I downloaded mysql form www.mysql.com and
> still searching for MS Access 2000 (it doesn't work with 2003 I have,
> or I don't know how to make it work).
> Any kind of help will be welcomed and highly appreciated!!!
> Thanks,
> Mario|||In message <chcfuv$n00$1@.bagan.srce.hr>, chicha <mario@.blindsight.org>
writes
>Hey people,
>I have to convert MS Access 2000 database into mysql database, the whole
>thing being part of this project I'm doing for one of my faculty
>classes. My professor somehow presumed I knew db's and gave me long list
>of things to do with that particular database, first thing being that
>particular conversion.

You can't just convert an Access database to MySQL because there are
lots of things that Access can do that MySQL can't. You may be able to
copy the data from an Access database to a MySQL Server but that's a
trivially small part of a complete conversion.

> Truth is that I don't know a first thing about
>db's, let alone using mysql... I downloaded mysql form www.mysql.com and
> still searching for MS Access 2000 (it doesn't work with 2003 I have,
>or I don't know how to make it work).

Access 2003 should be able to open an Access 2000 database file. Check
the file extension for the database file you have, do you have a file
with a .MDB extension or is it something else?

>Any kind of help will be welcomed and highly appreciated!!!

Run away screaming. It's the most helpful thing I can suggest.

--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money.|||"chicha" <mario@.blindsight.org> wrote in message
news:chcfuv$n00$1@.bagan.srce.hr...
> Hey people,
> I have to convert MS Access 2000 database into mysql database, the whole
> thing being part of this project I'm doing for one of my faculty
> classes. My professor somehow presumed I knew db's and gave me long list
> of things to do with that particular database, first thing being that
> particular conversion. Truth is that I don't know a first thing about
> db's, let alone using mysql... I downloaded mysql form www.mysql.com and
> still searching for MS Access 2000 (it doesn't work with 2003 I have,
> or I don't know how to make it work).
> Any kind of help will be welcomed and highly appreciated!!!

If your a quick study, Google can be your best friend.

If you have approx. $100 USD and a 2 week window, go to rentacoder.com.
Someone from Pakistan will do your job for you for that price with glee.

If neither of those works for you, you're probably F%#*ked.|||You might want to consider exporting the data from Access to a flat
text file. then import the flat text file into mysql. This way, you
can avoid having to find a way to convert directly from one to the
other.

I know mysql can import flat files, as a co-worked did it to load
legacy data from our operational system into a mysql db for a web
page.
hth
Rob

chicha <mario@.blindsight.org> wrote in message news:<chcfuv$n00$1@.bagan.srce.hr>...
> Hey people,
> I have to convert MS Access 2000 database into mysql database, the whole
> thing being part of this project I'm doing for one of my faculty
> classes. My professor somehow presumed I knew db's and gave me long list
> of things to do with that particular database, first thing being that
> particular conversion. Truth is that I don't know a first thing about
> db's, let alone using mysql... I downloaded mysql form www.mysql.com and
> still searching for MS Access 2000 (it doesn't work with 2003 I have,
> or I don't know how to make it work).
> Any kind of help will be welcomed and highly appreciated!!!
> Thanks,
> Mario|||Thanks guys for your replies!

I see now I phrased my post in a completely wrong way.

First of all, what I'm trying to do here is to get some guidance and
friendly advice to get me started. I HAVE to do this project, I was told
to. For any of you who read somewhere between my lines "please could
somebody do this for free instead of me??", I just must stress that that
was NOT my idea for this post. There are easier and more reliable ways
to cheat at faculty then using newsgroups...

I'm new with db's but not with PC's. What I should have written is that
I got the database made in Access 2000 (.MDB) which doesn't work with
Access 2003. I know this is wrong, and that it should work, but it
doesn't. I spoke with the author/professor assistant who obviously did
it using "Databases for dummies" book and he said he's sure it works but
has bugs(!!!). He doesn't know what bugs though :). That's why he gave
me the whole thing to put it in mysql. When I tried it in 2003, sure as
hell, it didn't work, bug or no bug. It opened and loaded, but didn't
read relations nor data. It works in A2000 because the whole "office of
construction in mech. eng." at my faculty uses it. I'm not gonna tell
that guy he did it all wrong, because he knows it. He knows I know it
too. Saying it loud would mean my academical suicide. I'll rather use
Access 2000 and fix it there.

I mentioned it in the post because I thought someone could offer an
advice. My apologies that I haven't explained the situation more
thoroughly, I thought it was uneccessary. It would save me from you guys
thinking I'm complete idiot or lousy cheat.

Thanks to all of you guys who provided insightfull info and links, I
appreciate it. I'll check it out, and see what can be done.

Cheers,

Mario

rkc wrote:

> "chicha" <mario@.blindsight.org> wrote in message
> news:chcfuv$n00$1@.bagan.srce.hr...
>>Hey people,
>>
>>I have to convert MS Access 2000 database into mysql database, the whole
>>thing being part of this project I'm doing for one of my faculty
>>classes. My professor somehow presumed I knew db's and gave me long list
>>of things to do with that particular database, first thing being that
>>particular conversion. Truth is that I don't know a first thing about
>>db's, let alone using mysql... I downloaded mysql form www.mysql.com and
>> still searching for MS Access 2000 (it doesn't work with 2003 I have,
>>or I don't know how to make it work).
>>
>>Any kind of help will be welcomed and highly appreciated!!!
>
> If your a quick study, Google can be your best friend.
> If you have approx. $100 USD and a 2 week window, go to rentacoder.com.
> Someone from Pakistan will do your job for you for that price with glee.
> If neither of those works for you, you're probably F%#*ked.
>
>|||In message <chd16b$jso$1@.bagan.srce.hr>, chicha <mario@.blindsight.org>
writes
>Thanks guys for your replies!
>I see now I phrased my post in a completely wrong way.
>First of all, what I'm trying to do here is to get some guidance and
>friendly advice to get me started. I HAVE to do this project, I was
>told to. For any of you who read somewhere between my lines "please
>could somebody do this for free instead of me??", I just must stress
>that that was NOT my idea for this post. There are easier and more
>reliable ways to cheat at faculty then using newsgroups...

OK. Here's a few things to think about.

First, Access is not just a database system. It includes a forms
designer and a report designer, neither of which exist in MySQL. In
addition to moving the data from Access to MySQL you will also have to
design data-entry forms and reports. You will need to choose additional
software to do that.

It is possible to use Access as a front-end with the data stored in a
MySQL database. If you do it right you won't need to redesign any of
your forms or reports to do that. This is probably what you should aim
at as the first step in migration.

MySQL is designed as a client-server system and is usually used with the
data stored on a central server and client programs running on users'
workstations. You can run both client and server software on the same
machine, but you don't have to. If your site has any other MySQL
databases in use then you may find that there are already MySQL experts
available.

A copy of Access 2003 should open an Access 2000 database file without
any problems. If you are having problems with the database file then
switching to Access 2000 probably won't fix the problem. Find a machine
where the system works. Open up the database file and look at the tables
in it. Look for attached tables that use data that is actually stored
elsewhere. That might be in another Access database file or perhaps even
in a MySQL database on a server elsewhere. If your database uses
attached tables then you have to bring a copy of the data source to your
new machine in addition to the database file itself. Check this and let
us know whether there are any attached tables.

[...]

>I mentioned it in the post because I thought someone could offer an
>advice. My apologies that I haven't explained the situation more
>thoroughly, I thought it was uneccessary. It would save me from you
>guys thinking I'm complete idiot or lousy cheat.

It's pretty difficult to gather all of the information on a system if
expert users are standing right in front of you. Trying to do it through
a newsgroup is even more difficult.

Speaking of newsgroups, I'm not sure that comp.databases.theory is the
right newsgroup for this. You might want to drop that from the
crossposting list (unless anyone in that newsgroup wants it to
continue.)

--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money.|||You can certainly move the data to mysql, and keep the ms-access front end.

A large portion, in fact most of the forms and reports will work. However,
do you need to be aware of some differences etc.

And, most code as is will also work.

The main areas to watch are:

You need to have both a primary key, and a timestamp in EACH table on
the mysql side.

You can continue to use the ms-access query builder. For reports,
queries that have multi-table joins should be changed to pass-through, and
that performances VERY well with mysql.

So, this project is do-able. However, you should have a good familiarly with
ms-access, and your initial problems with ms-access need to be solved first.

good luck!

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@.msn.com
http://www.attcanada.net/~kallal.msn|||"chicha" wrote

> When I tried it in 2003, sure as hell, it didn't
> work, bug or no bug. It opened and loaded,
> but didn't read relations nor data. It works in
> A2000 because the whole "office of con-
> struction in mech. eng." at my faculty uses it.

That seems to indicate that the TableDefs in the database you are trying to
work with are simply links to tables in another "back-end" Access database.
You are assuming a cause when you haven't even identified what the problem
is.

If the "whole office of..." are all working with the same tables, that is
almost certainly the way it would have been set up. Almost certainly, it has
not a thing to do with whether you are using Access 2000, 2002, or 2003 to
work with it.

If the computer where you are trying Access 2003 is not connected on the
same LAN as the "whole office of..." then you are unlikely to be able to fix
that, unless you find and copy the shared tables to the machine/environment
where you are working. If you do that, or if your Access 2003 computer is on
the same LAN, then you may be able to fix the problem as simply as finding
the shared tables and using the Linked Table Manager (on the menu, Tools |
Database Utilities | Linked Table Manager) to relink the TableDefs to the
proper backend database.

Did I sufficiently emphasize the key here is "FIND THE SHARED TABLES AND
LINK THEM"?

I strongly urge you do that before you waste any more of your time and
effort on worrying about Access 2000. If, however, you try to do it in
Access 2000, on a machine that is in the same LAN as the "whole office of
..." and it _does_ work, you cannot assume that it worked just because you
used Access 2000 (see above).

As many have told you, you can convert the data -- BUT you first have to
HAVE the data, which you do not seem to have. Other than just hipshooting a
possible (probably not a workable) solution, I don't see any good reason to
convert even the data to MySQL.

Should I emphasize again, the key is "FIND THE SHARED TABLES"?

But certainly, you can convert nothing BUT the data to MySQL, because it is
a server database and has no support for any of the other features (to wit,
the user interface) of Access.

Larry Linson
Microsoft Access MVP|||chicha <mario@.blindsight.org> wrote:
> Hey people,

[...]

> Any kind of help will be welcomed and highly appreciated!!!

Convert tables -> .*csv -> mysql

I don't know MS Access 2000...

> Thanks,
> Mario

Servus,
Dietrich|||chicha schrieb:
> Hey people,
> I have to convert MS Access 2000 database into mysql database, the whole
> thing being part of this project I'm doing for one of my faculty
> classes. My professor somehow presumed I knew db's and gave me long list
> of things to do with that particular database, first thing being that
> particular conversion. Truth is that I don't know a first thing about
> db's, let alone using mysql... I downloaded mysql form www.mysql.com and
> still searching for MS Access 2000 (it doesn't work with 2003 I have,
> or I don't know how to make it work).
> Any kind of help will be welcomed and highly appreciated!!!
> Thanks,
> Mario

Hello,
http://www.dbtools.com.br/EN/dbmanager.php

Gru Matthias

--
www.source-code.de
- The Developers Source -|||"Matthias Gutmann" wrote

> http://www.dbtools.com.br/EN/dbmanager.php

Matthias, I'll bet your tool won't work unless he finds and uses the actual
data tables. Linked TableDefs just are not sufficient to retrieve the data
unless the Links are valid, and there is a strong probability that is
chicha's problem. Once he has them, that appears to be a very useful set of
features.

Larry Linson
Microsoft Access MVP|||"chicha" <mario@.blindsight.org> wrote in message
news:chcfuv$n00$1@.bagan.srce.hr...
> Hey people,
> I have to convert MS Access 2000 database into mysql database, the whole
> thing being part of this project I'm doing for one of my faculty
> classes. My professor somehow presumed I knew db's and gave me long list
> of things to do with that particular database, first thing being that
> particular conversion. Truth is that I don't know a first thing about
> db's, let alone using mysql... I downloaded mysql form www.mysql.com and
> still searching for MS Access 2000 (it doesn't work with 2003 I have,
> or I don't know how to make it work).
> Any kind of help will be welcomed and highly appreciated!!!
> Thanks,
> Mario

OK, now that we have a clearer picture of what you're up against maybe we
can break it down into steps:

1. Open the DB up with MS Access.
2. Unload the data into portable format files.
3. Extract the data definitions (at least tables and indexes) into some
form for migration.
4. Create an empty target DB.
5. Define tables, indexes, and whatever necessary infrastructure to contain
the same data.
6. Load the data from the protable format files.

These tasks are not equally easy. You can probably do some of them by the
seat of your pants, just using the general PC skills and savvy you've picked
up elsewhere. For some of them, you probably need help.

As far as step 1 goes. I'd really advise you to get someone with the right
version of MS Access to open the DB. The last thing you need to be doing at
this stage is messing around with version skew or incompatible software.
What about the professor? Can he open the DB with his version of Access?

We'll help you with the remaining steps once you can open the DB.|||Check this link

http://www.convert-in.com/acc2sql.htm

Nerver used it but it looks interesting.

Cheers

"chicha" <mario@.blindsight.org> wrote in message
news:chd16b$jso$1@.bagan.srce.hr...
> Thanks guys for your replies!
> I see now I phrased my post in a completely wrong way.
> First of all, what I'm trying to do here is to get some guidance and
> friendly advice to get me started. I HAVE to do this project, I was told
> to. For any of you who read somewhere between my lines "please could
> somebody do this for free instead of me??", I just must stress that that
> was NOT my idea for this post. There are easier and more reliable ways to
> cheat at faculty then using newsgroups...
> I'm new with db's but not with PC's. What I should have written is that I
> got the database made in Access 2000 (.MDB) which doesn't work with Access
> 2003. I know this is wrong, and that it should work, but it doesn't. I
> spoke with the author/professor assistant who obviously did it using
> "Databases for dummies" book and he said he's sure it works but has
> bugs(!!!). He doesn't know what bugs though :). That's why he gave me the
> whole thing to put it in mysql. When I tried it in 2003, sure as hell, it
> didn't work, bug or no bug. It opened and loaded, but didn't read
> relations nor data. It works in A2000 because the whole "office of
> construction in mech. eng." at my faculty uses it. I'm not gonna tell that
> guy he did it all wrong, because he knows it. He knows I know it too.
> Saying it loud would mean my academical suicide. I'll rather use Access
> 2000 and fix it there.
> I mentioned it in the post because I thought someone could offer an
> advice. My apologies that I haven't explained the situation more
> thoroughly, I thought it was uneccessary. It would save me from you guys
> thinking I'm complete idiot or lousy cheat.
> Thanks to all of you guys who provided insightfull info and links, I
> appreciate it. I'll check it out, and see what can be done.
> Cheers,
> Mario
>
> rkc wrote:
>> "chicha" <mario@.blindsight.org> wrote in message
>> news:chcfuv$n00$1@.bagan.srce.hr...
>>
>>>Hey people,
>>>
>>>I have to convert MS Access 2000 database into mysql database, the whole
>>>thing being part of this project I'm doing for one of my faculty
>>>classes. My professor somehow presumed I knew db's and gave me long list
>>>of things to do with that particular database, first thing being that
>>>particular conversion. Truth is that I don't know a first thing about
>>>db's, let alone using mysql... I downloaded mysql form www.mysql.com and
>>> still searching for MS Access 2000 (it doesn't work with 2003 I have,
>>>or I don't know how to make it work).
>>>
>>>Any kind of help will be welcomed and highly appreciated!!!
>>
>>
>> If your a quick study, Google can be your best friend.
>>
>> If you have approx. $100 USD and a 2 week window, go to rentacoder.com.
>> Someone from Pakistan will do your job for you for that price with glee.
>>
>> If neither of those works for you, you're probably F%#*ked.
>>
>>
>|||Thanks, thanks, thanks!!!

I spent this few days doing my research and thanks to your kind answers
and ideas I finally have idea what's going on.

Database I got to work on, now finally loaded up in Access 2003 but
cannot be worked with since it has password protection. I got the
username and password together with the db form that guy who made it,
but program just doesn't reckognize neither of those... it doesn't even
prompt me to use them, it just says I don't have permission to open/run
any of components. Although he made username for me, now it's nowhere
tzo be found, only Admin.

Obviously there's something wrong with db itself. Now I applied to get
faculty's copy of Access 2000 with student license (that's gonna take
some time...), then I'll see what's going on. When I make it work in
both 2000 & 2003 Access I'll start thinking about conversion.

I'll send posts about my progress.

Thanks again for your replies!!

mario

Bolt Upright wrote:
> Check this link
> http://www.convert-in.com/acc2sql.htm
> Nerver used it but it looks interesting.
> Cheers
>
> "chicha" <mario@.blindsight.org> wrote in message
> news:chd16b$jso$1@.bagan.srce.hr...
>>Thanks guys for your replies!
>>
>>I see now I phrased my post in a completely wrong way.
>>
>>First of all, what I'm trying to do here is to get some guidance and
>>friendly advice to get me started. I HAVE to do this project, I was told
>>to. For any of you who read somewhere between my lines "please could
>>somebody do this for free instead of me??", I just must stress that that
>>was NOT my idea for this post. There are easier and more reliable ways to
>>cheat at faculty then using newsgroups...
>>
>>I'm new with db's but not with PC's. What I should have written is that I
>>got the database made in Access 2000 (.MDB) which doesn't work with Access
>>2003. I know this is wrong, and that it should work, but it doesn't. I
>>spoke with the author/professor assistant who obviously did it using
>>"Databases for dummies" book and he said he's sure it works but has
>>bugs(!!!). He doesn't know what bugs though :). That's why he gave me the
>>whole thing to put it in mysql. When I tried it in 2003, sure as hell, it
>>didn't work, bug or no bug. It opened and loaded, but didn't read
>>relations nor data. It works in A2000 because the whole "office of
>>construction in mech. eng." at my faculty uses it. I'm not gonna tell that
>>guy he did it all wrong, because he knows it. He knows I know it too.
>>Saying it loud would mean my academical suicide. I'll rather use Access
>>2000 and fix it there.
>>
>>I mentioned it in the post because I thought someone could offer an
>>advice. My apologies that I haven't explained the situation more
>>thoroughly, I thought it was uneccessary. It would save me from you guys
>>thinking I'm complete idiot or lousy cheat.
>>
>>Thanks to all of you guys who provided insightfull info and links, I
>>appreciate it. I'll check it out, and see what can be done.
>>
>>Cheers,
>>
>>Mario
>>
>>
>>
>>rkc wrote:
>>
>>
>>>"chicha" <mario@.blindsight.org> wrote in message
>>>news:chcfuv$n00$1@.bagan.srce.hr...
>>>
>>>
>>>>Hey people,
>>>>
>>>>I have to convert MS Access 2000 database into mysql database, the whole
>>>>thing being part of this project I'm doing for one of my faculty
>>>>classes. My professor somehow presumed I knew db's and gave me long list
>>>>of things to do with that particular database, first thing being that
>>>>particular conversion. Truth is that I don't know a first thing about
>>>>db's, let alone using mysql... I downloaded mysql form www.mysql.com and
>>>> still searching for MS Access 2000 (it doesn't work with 2003 I have,
>>>>or I don't know how to make it work).
>>>>
>>>>Any kind of help will be welcomed and highly appreciated!!!
>>>
>>>
>>>If your a quick study, Google can be your best friend.
>>>
>>>If you have approx. $100 USD and a 2 week window, go to rentacoder.com.
>>>Someone from Pakistan will do your job for you for that price with glee.
>>>
>>>If neither of those works for you, you're probably F%#*ked.
>>>
>>>
>>>
>|||Chicha,

You have to have the MDW file with which it was secured before the userid
and password will do you any good. I'll say again, using Access 2000 isn't
going to change that. Along with the userid and password, find and join the
MDW, and you'll be able to open it.

You are _fixated_ on Access 2000 as the solution, but you still haven't
understood the problem.

Larry Linson
Microsoft Access MVP

"chicha" <mario@.blindsight.org> wrote in message
news:chg6ns$hrj$1@.bagan.srce.hr...
> Thanks, thanks, thanks!!!
> I spent this few days doing my research and thanks to your kind answers
> and ideas I finally have idea what's going on.
> Database I got to work on, now finally loaded up in Access 2003 but
> cannot be worked with since it has password protection. I got the
> username and password together with the db form that guy who made it,
> but program just doesn't reckognize neither of those... it doesn't even
> prompt me to use them, it just says I don't have permission to open/run
> any of components. Although he made username for me, now it's nowhere
> tzo be found, only Admin.
> Obviously there's something wrong with db itself. Now I applied to get
> faculty's copy of Access 2000 with student license (that's gonna take
> some time...), then I'll see what's going on. When I make it work in
> both 2000 & 2003 Access I'll start thinking about conversion.
> I'll send posts about my progress.
> Thanks again for your replies!!
> mario
>
> Bolt Upright wrote:
> > Check this link
> > http://www.convert-in.com/acc2sql.htm
> > Nerver used it but it looks interesting.
> > Cheers
> > "chicha" <mario@.blindsight.org> wrote in message
> > news:chd16b$jso$1@.bagan.srce.hr...
> >>Thanks guys for your replies!
> >>
> >>I see now I phrased my post in a completely wrong way.
> >>
> >>First of all, what I'm trying to do here is to get some guidance and
> >>friendly advice to get me started. I HAVE to do this project, I was told
> >>to. For any of you who read somewhere between my lines "please could
> >>somebody do this for free instead of me??", I just must stress that that
> >>was NOT my idea for this post. There are easier and more reliable ways
to
> >>cheat at faculty then using newsgroups...
> >>
> >>I'm new with db's but not with PC's. What I should have written is that
I
> >>got the database made in Access 2000 (.MDB) which doesn't work with
Access
> >>2003. I know this is wrong, and that it should work, but it doesn't. I
> >>spoke with the author/professor assistant who obviously did it using
> >>"Databases for dummies" book and he said he's sure it works but has
> >>bugs(!!!). He doesn't know what bugs though :). That's why he gave me
the
> >>whole thing to put it in mysql. When I tried it in 2003, sure as hell,
it
> >>didn't work, bug or no bug. It opened and loaded, but didn't read
> >>relations nor data. It works in A2000 because the whole "office of
> >>construction in mech. eng." at my faculty uses it. I'm not gonna tell
that
> >>guy he did it all wrong, because he knows it. He knows I know it too.
> >>Saying it loud would mean my academical suicide. I'll rather use Access
> >>2000 and fix it there.
> >>
> >>I mentioned it in the post because I thought someone could offer an
> >>advice. My apologies that I haven't explained the situation more
> >>thoroughly, I thought it was uneccessary. It would save me from you guys
> >>thinking I'm complete idiot or lousy cheat.
> >>
> >>Thanks to all of you guys who provided insightfull info and links, I
> >>appreciate it. I'll check it out, and see what can be done.
> >>
> >>Cheers,
> >>
> >>Mario
> >>
> >>
> >>
> >>rkc wrote:
> >>
> >>
> >>>"chicha" <mario@.blindsight.org> wrote in message
> >>>news:chcfuv$n00$1@.bagan.srce.hr...
> >>>
> >>>
> >>>>Hey people,
> >>>>
> >>>>I have to convert MS Access 2000 database into mysql database, the
whole
> >>>>thing being part of this project I'm doing for one of my faculty
> >>>>classes. My professor somehow presumed I knew db's and gave me long
list
> >>>>of things to do with that particular database, first thing being that
> >>>>particular conversion. Truth is that I don't know a first thing about
> >>>>db's, let alone using mysql... I downloaded mysql form www.mysql.com
and
> >>>> still searching for MS Access 2000 (it doesn't work with 2003 I have,
> >>>>or I don't know how to make it work).
> >>>>
> >>>>Any kind of help will be welcomed and highly appreciated!!!
> >>>
> >>>
> >>>If your a quick study, Google can be your best friend.
> >>>
> >>>If you have approx. $100 USD and a 2 week window, go to rentacoder.com.
> >>>Someone from Pakistan will do your job for you for that price with
glee.
> >>>
> >>>If neither of those works for you, you're probably F%#*ked.
> >>>
> >>>
> >>sqlsql

Wednesday, March 7, 2012

Convert SQL 2005 to SQL 2000

I started a project using SQL 2005 and now the customer has decided they can't go to 2005 yet so I need to convert it back to 2000. I didn't use any new features of 2005. How do I move it back to SQL 2000?Hi Steve,

Well, backup of 2005 doesn't restore on SQL 2000. However, you can generate SQL Script from objtecs and run into SQL Server 2000 Database.

Follow this steps:

1. Create new database in SQL 2000
2. Genarete script from objtects on the SQL 2005
3. Execute this script on the SQL 2000

If you have data, use bcp utilities to export and import.

Nilton Pinheiro|||

I am have problems with the syntax on the sql05 scripts. They are not running in 2000.

Has anyone else had problems?

|||socalmp, can you give some examples? Hard to say without them.|||

I have a db I imported into sql05 and now I need to transfer that db to a hosting company using sql2000.

I go right click on db >Tasks > generate scripts > and a wizard pops up to walk thru the settings for the script. I turn everything to false except script foreign keys, primary keys and unique keys because I have some relationships in the tables. The script version is sql2000 and the behavior is to generate create statements only. this is what I get:

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [patients](

[patientID] [int] IDENTITY(1,1) NOT NULL,

[last] [text] NULL,

[first] [text] NULL,

[dob] [datetime] NULL,

[gender] [text] NULL,

[sexuality] [text] NULL,

[ethnicity] [text] NULL,

[job] [varchar](50) NULL,

[company] [varchar](50) NULL,

[homephone] [varchar](50) NULL,

[homephone2] [varchar](50) NULL,

[mobile] [varchar](50) NULL,

[businessphone] [varchar](50) NULL,

[streetadd] [varchar](50) NULL,

[state] [text] NULL,

[zip] [nvarchar](50) NULL,

[country] [varchar](50) NULL,

[email] [varchar](50) NULL,

[email2] [varchar](50) NULL,

[webpage] [varchar](50) NULL,

[im] [varchar](50) NULL,

[reffered] [varchar](50) NULL,

[type] [varchar](50) NULL,

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

[patientID] ASC

)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [treatment](

[patientID] [int] NOT NULL,

[treatmentdate] [datetime] NULL,

[product] [varchar](50) NULL,

[amount] [numeric](18, 0) NULL

) ON [PRIMARY]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [notes](

[patientID] [int] NOT NULL,

[notes] [varchar](50) NOT NULL

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[treatment] WITH CHECK ADD CONSTRAINT [FK_treatment_patients] FOREIGN KEY([patientID])

REFERENCES [patients] ([patientID])

GO

ALTER TABLE [dbo].[notes] WITH CHECK ADD CONSTRAINT [FK_notes_patients] FOREIGN KEY([patientID])

REFERENCES [patients] ([patientI

When You run this in query analyzer I get this error:

Line 29: Incorrect syntax near '('.

And that is from this line:

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

I have tried many times with no success to get the script wizard to make a script compatible with SQL2000. My t-sql skills need improvement obviously, but I don't know why this has to be so difficult. Enterprise manager seemed easier to work with then the new sql05. I am sure I just need to get up to speed with its features

Any suggestions? I am trying to migrate a db from sql05 to sql 2000 using Query Analyser or csv import wizard only. I was able to previoulsy generate scripts from enterpirse manager to create the db with Query Analyser.

|||

Here's a script from Sql2000 made with enterprise manager and it ran just fine in the query anaylzer:

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_notes_patients]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)

ALTER TABLE [dbo].[notes] DROP CONSTRAINT FK_notes_patients

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_treatment_patients]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)

ALTER TABLE [dbo].[treatment] DROP CONSTRAINT FK_treatment_patients

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[notes]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[notes]

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[patients]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[patients]

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[treatment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[treatment]

GO

CREATE TABLE [dbo].[notes] (

[patientID] [int] NOT NULL ,

[notes] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL

) ON [PRIMARY]

GO

CREATE TABLE [dbo].[patients] (

[patientID] [int] IDENTITY (1, 1) NOT NULL ,

[last] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[first] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[dob] [datetime] NULL ,

[gender] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[sexuality] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[ethnicity] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[job] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[company] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[homephone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[homephone2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[mobile] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[businessphone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[streetadd] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[state] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[zip] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[country] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[email] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[email2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[webpage] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[im] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[reffered] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[type] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

CREATE TABLE [dbo].[treatment] (

[patientID] [int] NOT NULL ,

[treatmentdate] [datetime] NULL ,

[product] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[amount] [numeric](18, 0) NULL

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[patients] WITH NOCHECK ADD

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

[patientID]

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[notes] ADD

CONSTRAINT [FK_notes_patients] FOREIGN KEY

(

[patientID]

) REFERENCES [dbo].[patients] (

[patientID]

)

GO

ALTER TABLE [dbo].[treatment] ADD

CONSTRAINT [FK_treatment_patients] FOREIGN KEY

(

[patientID]

) REFERENCES [dbo].[patients] (

[patientID]

)

GO

So I am not sure What the difference is betwen the scripts?

|||

Maybe your default collation is not set to SQL_Latin1_General_CP1_CI_AS

I noticed in the 2000 script it is being specified all the way down. That might need to be specified in your 2000 instance. Try adding the collation statement to your columns in the 2005 script and see.

|||There is an easy way to solve the problem.

Open the Microsoft SQL Management Studio, then in "Object Explorer" right click on your Database->Tasks->Generate Scripts

In the Wizard

Script Window Click Next, Select You DB, Click Next and in the Choose

Script Option Step, Change the value of "Script for Server Version"

from "SQL Server 2005" to "SQL Server 2000" and go on.

When you click "Finish" button, your script will SQL 2000 compatible.

Good luck.

|||I tried this and the first script is a product of SQL 2005 and their acript generator. I made sure it was SQL 2000 compatible and it will not run in a SQL 2000 query analyzer. Strange!|||

On the script side, I looked more closely and I think the (IGNORE_DUP_KEY = OFF) syntax is incorrect. I believe you either have IGNORE_DUP_KEY specified or it is absent (which is the equivalent of OFF).

Another way you could accomplish your goal is to set your database to a 2000 version format, make a backup, and send it to your hosting provider to restore on their server. That solution should at least solve any script problems.

Run the following command against your database in SQL Management Studio and then create your backup.

sp_dbcmptlevel 'MyDatabaseName', 80

Hope that helps.
Hugh

|||

While generating the Script

We have to select option

Script for Server version as SQL Server 2000

|||

Created the databse with compatibility level set to sql200.

restored my client database from sql2005

i run the command "sp_dbcmptlevel 'MyDatabaseName', 80"

backup the database

everyrhing was ok.

I go to the enterprise manager of my sql2000 and restore the backed up database and this is the error i got.

"Too many backup devices specified for backup or restore; only 64 are allowed. Restore Database is terminating abnormally."

|||Has anybody found useful input on the 64 backup device limit? Same problem here moving a SQL 2005 db to SQL 2005 or 2000.|||

Hi Byrnie,

In my case I have SQL2005 running on my laptop. I needed to move the database onto my server which is currently running SQL 2000. On the laptop and in SQL Server Management Studio I selected the import/export Wizard. Using the wizard I was able to export my SQL2005 tables across to the SQL2000 server. I have not yet completed the process and have just started the job. I will have to verify the data as soon as the job has completed. This is the first time I am contributing anything to a forum. I hope it helps

|||Hi frnds,

I have done the process of Converting SQL 2005 Database into SQL 2000 Database.

1.Create Database in SQL Server 2000 which is the name into SQL 2005.
2.From SQL 2005 Mgmt Console Studio , from Database - tasks - Generate Script
-then select Database -Script for Server Version - Change it from SQL Server 2005 to SQL Server 2000
3. Do the process as per wizard.
4.We can run that Script into SQL Query Analyzer 2000 for that selected database where you want to move it.

Its working fine.I got whole database table creation and whole relationship which was made into SQL Server 2005.

Gr8t.. thanks for your help.

Convert SQL 2005 to SQL 2000

I started a project using SQL 2005 and now the customer has decided they can't go to 2005 yet so I need to convert it back to 2000. I didn't use any new features of 2005. How do I move it back to SQL 2000?Hi Steve,

Well, backup of 2005 doesn't restore on SQL 2000. However, you can generate SQL Script from objtecs and run into SQL Server 2000 Database.

Follow this steps:

1. Create new database in SQL 2000
2. Genarete script from objtects on the SQL 2005
3. Execute this script on the SQL 2000

If you have data, use bcp utilities to export and import.

Nilton Pinheiro|||

I am have problems with the syntax on the sql05 scripts. They are not running in 2000.

Has anyone else had problems?

|||socalmp, can you give some examples? Hard to say without them.|||

I have a db I imported into sql05 and now I need to transfer that db to a hosting company using sql2000.

I go right click on db >Tasks > generate scripts > and a wizard pops up to walk thru the settings for the script. I turn everything to false except script foreign keys, primary keys and unique keys because I have some relationships in the tables. The script version is sql2000 and the behavior is to generate create statements only. this is what I get:

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [patients](

[patientID] [int] IDENTITY(1,1) NOT NULL,

[last] [text] NULL,

[first] [text] NULL,

[dob] [datetime] NULL,

[gender] [text] NULL,

[sexuality] [text] NULL,

[ethnicity] [text] NULL,

[job] [varchar](50) NULL,

[company] [varchar](50) NULL,

[homephone] [varchar](50) NULL,

[homephone2] [varchar](50) NULL,

[mobile] [varchar](50) NULL,

[businessphone] [varchar](50) NULL,

[streetadd] [varchar](50) NULL,

[state] [text] NULL,

[zip] [nvarchar](50) NULL,

[country] [varchar](50) NULL,

[email] [varchar](50) NULL,

[email2] [varchar](50) NULL,

[webpage] [varchar](50) NULL,

[im] [varchar](50) NULL,

[reffered] [varchar](50) NULL,

[type] [varchar](50) NULL,

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

[patientID] ASC

)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [treatment](

[patientID] [int] NOT NULL,

[treatmentdate] [datetime] NULL,

[product] [varchar](50) NULL,

[amount] [numeric](18, 0) NULL

) ON [PRIMARY]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [notes](

[patientID] [int] NOT NULL,

[notes] [varchar](50) NOT NULL

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[treatment] WITH CHECK ADD CONSTRAINT [FK_treatment_patients] FOREIGN KEY([patientID])

REFERENCES [patients] ([patientID])

GO

ALTER TABLE [dbo].[notes] WITH CHECK ADD CONSTRAINT [FK_notes_patients] FOREIGN KEY([patientID])

REFERENCES [patients] ([patientI

When You run this in query analyzer I get this error:

Line 29: Incorrect syntax near '('.

And that is from this line:

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

I have tried many times with no success to get the script wizard to make a script compatible with SQL2000. My t-sql skills need improvement obviously, but I don't know why this has to be so difficult. Enterprise manager seemed easier to work with then the new sql05. I am sure I just need to get up to speed with its features

Any suggestions? I am trying to migrate a db from sql05 to sql 2000 using Query Analyser or csv import wizard only. I was able to previoulsy generate scripts from enterpirse manager to create the db with Query Analyser.

|||

Here's a script from Sql2000 made with enterprise manager and it ran just fine in the query anaylzer:

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_notes_patients]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)

ALTER TABLE [dbo].[notes] DROP CONSTRAINT FK_notes_patients

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_treatment_patients]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)

ALTER TABLE [dbo].[treatment] DROP CONSTRAINT FK_treatment_patients

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[notes]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[notes]

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[patients]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[patients]

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[treatment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[treatment]

GO

CREATE TABLE [dbo].[notes] (

[patientID] [int] NOT NULL ,

[notes] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL

) ON [PRIMARY]

GO

CREATE TABLE [dbo].[patients] (

[patientID] [int] IDENTITY (1, 1) NOT NULL ,

[last] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[first] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[dob] [datetime] NULL ,

[gender] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[sexuality] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[ethnicity] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[job] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[company] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[homephone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[homephone2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[mobile] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[businessphone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[streetadd] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[state] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[zip] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[country] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[email] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[email2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[webpage] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[im] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[reffered] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[type] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

CREATE TABLE [dbo].[treatment] (

[patientID] [int] NOT NULL ,

[treatmentdate] [datetime] NULL ,

[product] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[amount] [numeric](18, 0) NULL

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[patients] WITH NOCHECK ADD

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

[patientID]

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[notes] ADD

CONSTRAINT [FK_notes_patients] FOREIGN KEY

(

[patientID]

) REFERENCES [dbo].[patients] (

[patientID]

)

GO

ALTER TABLE [dbo].[treatment] ADD

CONSTRAINT [FK_treatment_patients] FOREIGN KEY

(

[patientID]

) REFERENCES [dbo].[patients] (

[patientID]

)

GO

So I am not sure What the difference is betwen the scripts?

|||

Maybe your default collation is not set to SQL_Latin1_General_CP1_CI_AS

I noticed in the 2000 script it is being specified all the way down. That might need to be specified in your 2000 instance. Try adding the collation statement to your columns in the 2005 script and see.

|||There is an easy way to solve the problem.
Open the Microsoft SQL Management Studio, then in "Object Explorer" right click on your Database->Tasks->Generate Scripts
In the Wizard Script Window Click Next, Select You DB, Click Next and in the Choose Script Option Step, Change the value of "Script for Server Version" from "SQL Server 2005" to "SQL Server 2000" and go on.
When you click "Finish" button, your script will SQL 2000 compatible.
Good luck.
|||I tried this and the first script is a product of SQL 2005 and their acript generator. I made sure it was SQL 2000 compatible and it will not run in a SQL 2000 query analyzer. Strange!|||

On the script side, I looked more closely and I think the (IGNORE_DUP_KEY = OFF) syntax is incorrect. I believe you either have IGNORE_DUP_KEY specified or it is absent (which is the equivalent of OFF).

Another way you could accomplish your goal is to set your database to a 2000 version format, make a backup, and send it to your hosting provider to restore on their server. That solution should at least solve any script problems.

Run the following command against your database in SQL Management Studio and then create your backup.

sp_dbcmptlevel 'MyDatabaseName', 80

Hope that helps.
Hugh

|||

While generating the Script

We have to select option

Script for Server version as SQL Server 2000

|||

Created the databse with compatibility level set to sql200.

restored my client database from sql2005

i run the command "sp_dbcmptlevel 'MyDatabaseName', 80"

backup the database

everyrhing was ok.

I go to the enterprise manager of my sql2000 and restore the backed up database and this is the error i got.

"Too many backup devices specified for backup or restore; only 64 are allowed. Restore Database is terminating abnormally."

|||Has anybody found useful input on the 64 backup device limit? Same problem here moving a SQL 2005 db to SQL 2005 or 2000.|||

Hi Byrnie,

In my case I have SQL2005 running on my laptop. I needed to move the database onto my server which is currently running SQL 2000. On the laptop and in SQL Server Management Studio I selected the import/export Wizard. Using the wizard I was able to export my SQL2005 tables across to the SQL2000 server. I have not yet completed the process and have just started the job. I will have to verify the data as soon as the job has completed. This is the first time I am contributing anything to a forum. I hope it helps

|||Hi frnds,

I have done the process of Converting SQL 2005 Database into SQL 2000 Database.

1.Create Database in SQL Server 2000 which is the name into SQL 2005.
2.From SQL 2005 Mgmt Console Studio , from Database - tasks - Generate Script
-then select Database -Script for Server Version - Change it from SQL Server 2005 to SQL Server 2000
3. Do the process as per wizard.
4.We can run that Script into SQL Query Analyzer 2000 for that selected database where you want to move it.

Its working fine.I got whole database table creation and whole relationship which was made into SQL Server 2005.

Gr8t.. thanks for your help.

Convert SQL 2005 to SQL 2000

I started a project using SQL 2005 and now the customer has decided they can't go to 2005 yet so I need to convert it back to 2000. I didn't use any new features of 2005. How do I move it back to SQL 2000?Hi Steve,

Well, backup of 2005 doesn't restore on SQL 2000. However, you can generate SQL Script from objtecs and run into SQL Server 2000 Database.

Follow this steps:

1. Create new database in SQL 2000
2. Genarete script from objtects on the SQL 2005
3. Execute this script on the SQL 2000

If you have data, use bcp utilities to export and import.

Nilton Pinheiro|||

I am have problems with the syntax on the sql05 scripts. They are not running in 2000.

Has anyone else had problems?

|||socalmp, can you give some examples? Hard to say without them.|||

I have a db I imported into sql05 and now I need to transfer that db to a hosting company using sql2000.

I go right click on db >Tasks > generate scripts > and a wizard pops up to walk thru the settings for the script. I turn everything to false except script foreign keys, primary keys and unique keys because I have some relationships in the tables. The script version is sql2000 and the behavior is to generate create statements only. this is what I get:

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [patients](

[patientID] [int] IDENTITY(1,1) NOT NULL,

[last] [text] NULL,

[first] [text] NULL,

[dob] [datetime] NULL,

[gender] [text] NULL,

[sexuality] [text] NULL,

[ethnicity] [text] NULL,

[job] [varchar](50) NULL,

[company] [varchar](50) NULL,

[homephone] [varchar](50) NULL,

[homephone2] [varchar](50) NULL,

[mobile] [varchar](50) NULL,

[businessphone] [varchar](50) NULL,

[streetadd] [varchar](50) NULL,

[state] [text] NULL,

[zip] [nvarchar](50) NULL,

[country] [varchar](50) NULL,

[email] [varchar](50) NULL,

[email2] [varchar](50) NULL,

[webpage] [varchar](50) NULL,

[im] [varchar](50) NULL,

[reffered] [varchar](50) NULL,

[type] [varchar](50) NULL,

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

[patientID] ASC

)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [treatment](

[patientID] [int] NOT NULL,

[treatmentdate] [datetime] NULL,

[product] [varchar](50) NULL,

[amount] [numeric](18, 0) NULL

) ON [PRIMARY]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [notes](

[patientID] [int] NOT NULL,

[notes] [varchar](50) NOT NULL

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[treatment] WITH CHECK ADD CONSTRAINT [FK_treatment_patients] FOREIGN KEY([patientID])

REFERENCES [patients] ([patientID])

GO

ALTER TABLE [dbo].[notes] WITH CHECK ADD CONSTRAINT [FK_notes_patients] FOREIGN KEY([patientID])

REFERENCES [patients] ([patientI

When You run this in query analyzer I get this error:

Line 29: Incorrect syntax near '('.

And that is from this line:

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

I have tried many times with no success to get the script wizard to make a script compatible with SQL2000. My t-sql skills need improvement obviously, but I don't know why this has to be so difficult. Enterprise manager seemed easier to work with then the new sql05. I am sure I just need to get up to speed with its features

Any suggestions? I am trying to migrate a db from sql05 to sql 2000 using Query Analyser or csv import wizard only. I was able to previoulsy generate scripts from enterpirse manager to create the db with Query Analyser.

|||

Here's a script from Sql2000 made with enterprise manager and it ran just fine in the query anaylzer:

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_notes_patients]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)

ALTER TABLE [dbo].[notes] DROP CONSTRAINT FK_notes_patients

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_treatment_patients]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)

ALTER TABLE [dbo].[treatment] DROP CONSTRAINT FK_treatment_patients

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[notes]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[notes]

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[patients]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[patients]

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[treatment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[treatment]

GO

CREATE TABLE [dbo].[notes] (

[patientID] [int] NOT NULL ,

[notes] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL

) ON [PRIMARY]

GO

CREATE TABLE [dbo].[patients] (

[patientID] [int] IDENTITY (1, 1) NOT NULL ,

[last] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[first] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[dob] [datetime] NULL ,

[gender] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[sexuality] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[ethnicity] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[job] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[company] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[homephone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[homephone2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[mobile] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[businessphone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[streetadd] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[state] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[zip] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[country] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[email] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[email2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[webpage] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[im] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[reffered] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[type] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

CREATE TABLE [dbo].[treatment] (

[patientID] [int] NOT NULL ,

[treatmentdate] [datetime] NULL ,

[product] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[amount] [numeric](18, 0) NULL

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[patients] WITH NOCHECK ADD

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

[patientID]

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[notes] ADD

CONSTRAINT [FK_notes_patients] FOREIGN KEY

(

[patientID]

) REFERENCES [dbo].[patients] (

[patientID]

)

GO

ALTER TABLE [dbo].[treatment] ADD

CONSTRAINT [FK_treatment_patients] FOREIGN KEY

(

[patientID]

) REFERENCES [dbo].[patients] (

[patientID]

)

GO

So I am not sure What the difference is betwen the scripts?

|||

Maybe your default collation is not set to SQL_Latin1_General_CP1_CI_AS

I noticed in the 2000 script it is being specified all the way down. That might need to be specified in your 2000 instance. Try adding the collation statement to your columns in the 2005 script and see.

|||There is an easy way to solve the problem.
Open the Microsoft SQL Management Studio, then in "Object Explorer" right click on your Database->Tasks->Generate Scripts
In the Wizard Script Window Click Next, Select You DB, Click Next and in the Choose Script Option Step, Change the value of "Script for Server Version" from "SQL Server 2005" to "SQL Server 2000" and go on.
When you click "Finish" button, your script will SQL 2000 compatible.
Good luck.
|||I tried this and the first script is a product of SQL 2005 and their acript generator. I made sure it was SQL 2000 compatible and it will not run in a SQL 2000 query analyzer. Strange!|||

On the script side, I looked more closely and I think the (IGNORE_DUP_KEY = OFF) syntax is incorrect. I believe you either have IGNORE_DUP_KEY specified or it is absent (which is the equivalent of OFF).

Another way you could accomplish your goal is to set your database to a 2000 version format, make a backup, and send it to your hosting provider to restore on their server. That solution should at least solve any script problems.

Run the following command against your database in SQL Management Studio and then create your backup.

sp_dbcmptlevel 'MyDatabaseName', 80

Hope that helps.
Hugh

|||

While generating the Script

We have to select option

Script for Server version as SQL Server 2000

|||

Created the databse with compatibility level set to sql200.

restored my client database from sql2005

i run the command "sp_dbcmptlevel 'MyDatabaseName', 80"

backup the database

everyrhing was ok.

I go to the enterprise manager of my sql2000 and restore the backed up database and this is the error i got.

"Too many backup devices specified for backup or restore; only 64 are allowed. Restore Database is terminating abnormally."

|||Has anybody found useful input on the 64 backup device limit? Same problem here moving a SQL 2005 db to SQL 2005 or 2000.|||

Hi Byrnie,

In my case I have SQL2005 running on my laptop. I needed to move the database onto my server which is currently running SQL 2000. On the laptop and in SQL Server Management Studio I selected the import/export Wizard. Using the wizard I was able to export my SQL2005 tables across to the SQL2000 server. I have not yet completed the process and have just started the job. I will have to verify the data as soon as the job has completed. This is the first time I am contributing anything to a forum. I hope it helps

|||Hi frnds,

I have done the process of Converting SQL 2005 Database into SQL 2000 Database.

1.Create Database in SQL Server 2000 which is the name into SQL 2005.
2.From SQL 2005 Mgmt Console Studio , from Database - tasks - Generate Script
-then select Database -Script for Server Version - Change it from SQL Server 2005 to SQL Server 2000
3. Do the process as per wizard.
4.We can run that Script into SQL Query Analyzer 2000 for that selected database where you want to move it.

Its working fine.I got whole database table creation and whole relationship which was made into SQL Server 2005.

Gr8t.. thanks for your help.

Convert SQL 2005 to SQL 2000

I started a project using SQL 2005 and now the customer has decided they can't go to 2005 yet so I need to convert it back to 2000. I didn't use any new features of 2005. How do I move it back to SQL 2000?Hi Steve,

Well, backup of 2005 doesn't restore on SQL 2000. However, you can generate SQL Script from objtecs and run into SQL Server 2000 Database.

Follow this steps:

1. Create new database in SQL 2000
2. Genarete script from objtects on the SQL 2005
3. Execute this script on the SQL 2000

If you have data, use bcp utilities to export and import.

Nilton Pinheiro|||

I am have problems with the syntax on the sql05 scripts. They are not running in 2000.

Has anyone else had problems?

|||socalmp, can you give some examples? Hard to say without them.|||

I have a db I imported into sql05 and now I need to transfer that db to a hosting company using sql2000.

I go right click on db >Tasks > generate scripts > and a wizard pops up to walk thru the settings for the script. I turn everything to false except script foreign keys, primary keys and unique keys because I have some relationships in the tables. The script version is sql2000 and the behavior is to generate create statements only. this is what I get:

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [patients](

[patientID] [int] IDENTITY(1,1) NOT NULL,

[last] [text] NULL,

[first] [text] NULL,

[dob] [datetime] NULL,

[gender] [text] NULL,

[sexuality] [text] NULL,

[ethnicity] [text] NULL,

[job] [varchar](50) NULL,

[company] [varchar](50) NULL,

[homephone] [varchar](50) NULL,

[homephone2] [varchar](50) NULL,

[mobile] [varchar](50) NULL,

[businessphone] [varchar](50) NULL,

[streetadd] [varchar](50) NULL,

[state] [text] NULL,

[zip] [nvarchar](50) NULL,

[country] [varchar](50) NULL,

[email] [varchar](50) NULL,

[email2] [varchar](50) NULL,

[webpage] [varchar](50) NULL,

[im] [varchar](50) NULL,

[reffered] [varchar](50) NULL,

[type] [varchar](50) NULL,

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

[patientID] ASC

)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [treatment](

[patientID] [int] NOT NULL,

[treatmentdate] [datetime] NULL,

[product] [varchar](50) NULL,

[amount] [numeric](18, 0) NULL

) ON [PRIMARY]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [notes](

[patientID] [int] NOT NULL,

[notes] [varchar](50) NOT NULL

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[treatment] WITH CHECK ADD CONSTRAINT [FK_treatment_patients] FOREIGN KEY([patientID])

REFERENCES [patients] ([patientID])

GO

ALTER TABLE [dbo].[notes] WITH CHECK ADD CONSTRAINT [FK_notes_patients] FOREIGN KEY([patientID])

REFERENCES [patients] ([patientI

When You run this in query analyzer I get this error:

Line 29: Incorrect syntax near '('.

And that is from this line:

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

I have tried many times with no success to get the script wizard to make a script compatible with SQL2000. My t-sql skills need improvement obviously, but I don't know why this has to be so difficult. Enterprise manager seemed easier to work with then the new sql05. I am sure I just need to get up to speed with its features

Any suggestions? I am trying to migrate a db from sql05 to sql 2000 using Query Analyser or csv import wizard only. I was able to previoulsy generate scripts from enterpirse manager to create the db with Query Analyser.

|||

Here's a script from Sql2000 made with enterprise manager and it ran just fine in the query anaylzer:

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_notes_patients]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)

ALTER TABLE [dbo].[notes] DROP CONSTRAINT FK_notes_patients

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_treatment_patients]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)

ALTER TABLE [dbo].[treatment] DROP CONSTRAINT FK_treatment_patients

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[notes]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[notes]

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[patients]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[patients]

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[treatment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[treatment]

GO

CREATE TABLE [dbo].[notes] (

[patientID] [int] NOT NULL ,

[notes] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL

) ON [PRIMARY]

GO

CREATE TABLE [dbo].[patients] (

[patientID] [int] IDENTITY (1, 1) NOT NULL ,

[last] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[first] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[dob] [datetime] NULL ,

[gender] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[sexuality] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[ethnicity] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[job] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[company] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[homephone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[homephone2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[mobile] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[businessphone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[streetadd] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[state] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[zip] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[country] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[email] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[email2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[webpage] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[im] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[reffered] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[type] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

CREATE TABLE [dbo].[treatment] (

[patientID] [int] NOT NULL ,

[treatmentdate] [datetime] NULL ,

[product] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[amount] [numeric](18, 0) NULL

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[patients] WITH NOCHECK ADD

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

[patientID]

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[notes] ADD

CONSTRAINT [FK_notes_patients] FOREIGN KEY

(

[patientID]

) REFERENCES [dbo].[patients] (

[patientID]

)

GO

ALTER TABLE [dbo].[treatment] ADD

CONSTRAINT [FK_treatment_patients] FOREIGN KEY

(

[patientID]

) REFERENCES [dbo].[patients] (

[patientID]

)

GO

So I am not sure What the difference is betwen the scripts?

|||

Maybe your default collation is not set to SQL_Latin1_General_CP1_CI_AS

I noticed in the 2000 script it is being specified all the way down. That might need to be specified in your 2000 instance. Try adding the collation statement to your columns in the 2005 script and see.

|||There is an easy way to solve the problem.

Open the Microsoft SQL Management Studio, then in "Object Explorer" right click on your Database->Tasks->Generate Scripts

In the Wizard

Script Window Click Next, Select You DB, Click Next and in the Choose

Script Option Step, Change the value of "Script for Server Version"

from "SQL Server 2005" to "SQL Server 2000" and go on.

When you click "Finish" button, your script will SQL 2000 compatible.

Good luck.

|||I tried this and the first script is a product of SQL 2005 and their acript generator. I made sure it was SQL 2000 compatible and it will not run in a SQL 2000 query analyzer. Strange!|||

On the script side, I looked more closely and I think the (IGNORE_DUP_KEY = OFF) syntax is incorrect. I believe you either have IGNORE_DUP_KEY specified or it is absent (which is the equivalent of OFF).

Another way you could accomplish your goal is to set your database to a 2000 version format, make a backup, and send it to your hosting provider to restore on their server. That solution should at least solve any script problems.

Run the following command against your database in SQL Management Studio and then create your backup.

sp_dbcmptlevel 'MyDatabaseName', 80

Hope that helps.
Hugh

|||

While generating the Script

We have to select option

Script for Server version as SQL Server 2000

|||

Created the databse with compatibility level set to sql200.

restored my client database from sql2005

i run the command "sp_dbcmptlevel 'MyDatabaseName', 80"

backup the database

everyrhing was ok.

I go to the enterprise manager of my sql2000 and restore the backed up database and this is the error i got.

"Too many backup devices specified for backup or restore; only 64 are allowed. Restore Database is terminating abnormally."

|||Has anybody found useful input on the 64 backup device limit? Same problem here moving a SQL 2005 db to SQL 2005 or 2000.|||

Hi Byrnie,

In my case I have SQL2005 running on my laptop. I needed to move the database onto my server which is currently running SQL 2000. On the laptop and in SQL Server Management Studio I selected the import/export Wizard. Using the wizard I was able to export my SQL2005 tables across to the SQL2000 server. I have not yet completed the process and have just started the job. I will have to verify the data as soon as the job has completed. This is the first time I am contributing anything to a forum. I hope it helps

|||Hi frnds,

I have done the process of Converting SQL 2005 Database into SQL 2000 Database.

1.Create Database in SQL Server 2000 which is the name into SQL 2005.
2.From SQL 2005 Mgmt Console Studio , from Database - tasks - Generate Script
-then select Database -Script for Server Version - Change it from SQL Server 2005 to SQL Server 2000
3. Do the process as per wizard.
4.We can run that Script into SQL Query Analyzer 2000 for that selected database where you want to move it.

Its working fine.I got whole database table creation and whole relationship which was made into SQL Server 2005.

Gr8t.. thanks for your help.

Convert SQL 2005 to SQL 2000

I started a project using SQL 2005 and now the customer has decided they can't go to 2005 yet so I need to convert it back to 2000. I didn't use any new features of 2005. How do I move it back to SQL 2000?Hi Steve,

Well, backup of 2005 doesn't restore on SQL 2000. However, you can generate SQL Script from objtecs and run into SQL Server 2000 Database.

Follow this steps:

1. Create new database in SQL 2000
2. Genarete script from objtects on the SQL 2005
3. Execute this script on the SQL 2000

If you have data, use bcp utilities to export and import.

Nilton Pinheiro|||

I am have problems with the syntax on the sql05 scripts. They are not running in 2000.

Has anyone else had problems?

|||socalmp, can you give some examples? Hard to say without them.|||

I have a db I imported into sql05 and now I need to transfer that db to a hosting company using sql2000.

I go right click on db >Tasks > generate scripts > and a wizard pops up to walk thru the settings for the script. I turn everything to false except script foreign keys, primary keys and unique keys because I have some relationships in the tables. The script version is sql2000 and the behavior is to generate create statements only. this is what I get:

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [patients](

[patientID] [int] IDENTITY(1,1) NOT NULL,

[last] [text] NULL,

[first] [text] NULL,

[dob] [datetime] NULL,

[gender] [text] NULL,

[sexuality] [text] NULL,

[ethnicity] [text] NULL,

[job] [varchar](50) NULL,

[company] [varchar](50) NULL,

[homephone] [varchar](50) NULL,

[homephone2] [varchar](50) NULL,

[mobile] [varchar](50) NULL,

[businessphone] [varchar](50) NULL,

[streetadd] [varchar](50) NULL,

[state] [text] NULL,

[zip] [nvarchar](50) NULL,

[country] [varchar](50) NULL,

[email] [varchar](50) NULL,

[email2] [varchar](50) NULL,

[webpage] [varchar](50) NULL,

[im] [varchar](50) NULL,

[reffered] [varchar](50) NULL,

[type] [varchar](50) NULL,

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

[patientID] ASC

)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [treatment](

[patientID] [int] NOT NULL,

[treatmentdate] [datetime] NULL,

[product] [varchar](50) NULL,

[amount] [numeric](18, 0) NULL

) ON [PRIMARY]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [notes](

[patientID] [int] NOT NULL,

[notes] [varchar](50) NOT NULL

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[treatment] WITH CHECK ADD CONSTRAINT [FK_treatment_patients] FOREIGN KEY([patientID])

REFERENCES [patients] ([patientID])

GO

ALTER TABLE [dbo].[notes] WITH CHECK ADD CONSTRAINT [FK_notes_patients] FOREIGN KEY([patientID])

REFERENCES [patients] ([patientI

When You run this in query analyzer I get this error:

Line 29: Incorrect syntax near '('.

And that is from this line:

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

I have tried many times with no success to get the script wizard to make a script compatible with SQL2000. My t-sql skills need improvement obviously, but I don't know why this has to be so difficult. Enterprise manager seemed easier to work with then the new sql05. I am sure I just need to get up to speed with its features

Any suggestions? I am trying to migrate a db from sql05 to sql 2000 using Query Analyser or csv import wizard only. I was able to previoulsy generate scripts from enterpirse manager to create the db with Query Analyser.

|||

Here's a script from Sql2000 made with enterprise manager and it ran just fine in the query anaylzer:

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_notes_patients]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)

ALTER TABLE [dbo].[notes] DROP CONSTRAINT FK_notes_patients

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_treatment_patients]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)

ALTER TABLE [dbo].[treatment] DROP CONSTRAINT FK_treatment_patients

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[notes]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[notes]

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[patients]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[patients]

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[treatment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[treatment]

GO

CREATE TABLE [dbo].[notes] (

[patientID] [int] NOT NULL ,

[notes] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL

) ON [PRIMARY]

GO

CREATE TABLE [dbo].[patients] (

[patientID] [int] IDENTITY (1, 1) NOT NULL ,

[last] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[first] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[dob] [datetime] NULL ,

[gender] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[sexuality] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[ethnicity] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[job] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[company] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[homephone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[homephone2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[mobile] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[businessphone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[streetadd] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[state] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[zip] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[country] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[email] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[email2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[webpage] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[im] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[reffered] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[type] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

CREATE TABLE [dbo].[treatment] (

[patientID] [int] NOT NULL ,

[treatmentdate] [datetime] NULL ,

[product] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[amount] [numeric](18, 0) NULL

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[patients] WITH NOCHECK ADD

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

[patientID]

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[notes] ADD

CONSTRAINT [FK_notes_patients] FOREIGN KEY

(

[patientID]

) REFERENCES [dbo].[patients] (

[patientID]

)

GO

ALTER TABLE [dbo].[treatment] ADD

CONSTRAINT [FK_treatment_patients] FOREIGN KEY

(

[patientID]

) REFERENCES [dbo].[patients] (

[patientID]

)

GO

So I am not sure What the difference is betwen the scripts?

|||

Maybe your default collation is not set to SQL_Latin1_General_CP1_CI_AS

I noticed in the 2000 script it is being specified all the way down. That might need to be specified in your 2000 instance. Try adding the collation statement to your columns in the 2005 script and see.

|||There is an easy way to solve the problem.
Open the Microsoft SQL Management Studio, then in "Object Explorer" right click on your Database->Tasks->Generate Scripts
In the Wizard Script Window Click Next, Select You DB, Click Next and in the Choose Script Option Step, Change the value of "Script for Server Version" from "SQL Server 2005" to "SQL Server 2000" and go on.
When you click "Finish" button, your script will SQL 2000 compatible.
Good luck.
|||I tried this and the first script is a product of SQL 2005 and their acript generator. I made sure it was SQL 2000 compatible and it will not run in a SQL 2000 query analyzer. Strange!|||

On the script side, I looked more closely and I think the (IGNORE_DUP_KEY = OFF) syntax is incorrect. I believe you either have IGNORE_DUP_KEY specified or it is absent (which is the equivalent of OFF).

Another way you could accomplish your goal is to set your database to a 2000 version format, make a backup, and send it to your hosting provider to restore on their server. That solution should at least solve any script problems.

Run the following command against your database in SQL Management Studio and then create your backup.

sp_dbcmptlevel 'MyDatabaseName', 80

Hope that helps.
Hugh

|||

While generating the Script

We have to select option

Script for Server version as SQL Server 2000

|||

Created the databse with compatibility level set to sql200.

restored my client database from sql2005

i run the command "sp_dbcmptlevel 'MyDatabaseName', 80"

backup the database

everyrhing was ok.

I go to the enterprise manager of my sql2000 and restore the backed up database and this is the error i got.

"Too many backup devices specified for backup or restore; only 64 are allowed. Restore Database is terminating abnormally."

|||Has anybody found useful input on the 64 backup device limit? Same problem here moving a SQL 2005 db to SQL 2005 or 2000.|||

Hi Byrnie,

In my case I have SQL2005 running on my laptop. I needed to move the database onto my server which is currently running SQL 2000. On the laptop and in SQL Server Management Studio I selected the import/export Wizard. Using the wizard I was able to export my SQL2005 tables across to the SQL2000 server. I have not yet completed the process and have just started the job. I will have to verify the data as soon as the job has completed. This is the first time I am contributing anything to a forum. I hope it helps

|||Hi frnds,

I have done the process of Converting SQL 2005 Database into SQL 2000 Database.

1.Create Database in SQL Server 2000 which is the name into SQL 2005.
2.From SQL 2005 Mgmt Console Studio , from Database - tasks - Generate Script
-then select Database -Script for Server Version - Change it from SQL Server 2005 to SQL Server 2000
3. Do the process as per wizard.
4.We can run that Script into SQL Query Analyzer 2000 for that selected database where you want to move it.

Its working fine.I got whole database table creation and whole relationship which was made into SQL Server 2005.

Gr8t.. thanks for your help.

Convert SQL 2005 to SQL 2000

I started a project using SQL 2005 and now the customer has decided they can't go to 2005 yet so I need to convert it back to 2000. I didn't use any new features of 2005. How do I move it back to SQL 2000?Hi Steve,

Well, backup of 2005 doesn't restore on SQL 2000. However, you can generate SQL Script from objtecs and run into SQL Server 2000 Database.

Follow this steps:

1. Create new database in SQL 2000
2. Genarete script from objtects on the SQL 2005
3. Execute this script on the SQL 2000

If you have data, use bcp utilities to export and import.

Nilton Pinheiro|||

I am have problems with the syntax on the sql05 scripts. They are not running in 2000.

Has anyone else had problems?

|||socalmp, can you give some examples? Hard to say without them.|||

I have a db I imported into sql05 and now I need to transfer that db to a hosting company using sql2000.

I go right click on db >Tasks > generate scripts > and a wizard pops up to walk thru the settings for the script. I turn everything to false except script foreign keys, primary keys and unique keys because I have some relationships in the tables. The script version is sql2000 and the behavior is to generate create statements only. this is what I get:

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [patients](

[patientID] [int] IDENTITY(1,1) NOT NULL,

[last] [text] NULL,

[first] [text] NULL,

[dob] [datetime] NULL,

[gender] [text] NULL,

[sexuality] [text] NULL,

[ethnicity] [text] NULL,

[job] [varchar](50) NULL,

[company] [varchar](50) NULL,

[homephone] [varchar](50) NULL,

[homephone2] [varchar](50) NULL,

[mobile] [varchar](50) NULL,

[businessphone] [varchar](50) NULL,

[streetadd] [varchar](50) NULL,

[state] [text] NULL,

[zip] [nvarchar](50) NULL,

[country] [varchar](50) NULL,

[email] [varchar](50) NULL,

[email2] [varchar](50) NULL,

[webpage] [varchar](50) NULL,

[im] [varchar](50) NULL,

[reffered] [varchar](50) NULL,

[type] [varchar](50) NULL,

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

[patientID] ASC

)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [treatment](

[patientID] [int] NOT NULL,

[treatmentdate] [datetime] NULL,

[product] [varchar](50) NULL,

[amount] [numeric](18, 0) NULL

) ON [PRIMARY]

GO

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE TABLE [notes](

[patientID] [int] NOT NULL,

[notes] [varchar](50) NOT NULL

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[treatment] WITH CHECK ADD CONSTRAINT [FK_treatment_patients] FOREIGN KEY([patientID])

REFERENCES [patients] ([patientID])

GO

ALTER TABLE [dbo].[notes] WITH CHECK ADD CONSTRAINT [FK_notes_patients] FOREIGN KEY([patientID])

REFERENCES [patients] ([patientI

When You run this in query analyzer I get this error:

Line 29: Incorrect syntax near '('.

And that is from this line:

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

I have tried many times with no success to get the script wizard to make a script compatible with SQL2000. My t-sql skills need improvement obviously, but I don't know why this has to be so difficult. Enterprise manager seemed easier to work with then the new sql05. I am sure I just need to get up to speed with its features

Any suggestions? I am trying to migrate a db from sql05 to sql 2000 using Query Analyser or csv import wizard only. I was able to previoulsy generate scripts from enterpirse manager to create the db with Query Analyser.

|||

Here's a script from Sql2000 made with enterprise manager and it ran just fine in the query anaylzer:

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_notes_patients]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)

ALTER TABLE [dbo].[notes] DROP CONSTRAINT FK_notes_patients

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_treatment_patients]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)

ALTER TABLE [dbo].[treatment] DROP CONSTRAINT FK_treatment_patients

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[notes]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[notes]

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[patients]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[patients]

GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[treatment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[treatment]

GO

CREATE TABLE [dbo].[notes] (

[patientID] [int] NOT NULL ,

[notes] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL

) ON [PRIMARY]

GO

CREATE TABLE [dbo].[patients] (

[patientID] [int] IDENTITY (1, 1) NOT NULL ,

[last] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[first] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[dob] [datetime] NULL ,

[gender] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[sexuality] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[ethnicity] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[job] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[company] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[homephone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[homephone2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[mobile] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[businessphone] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[streetadd] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[state] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[zip] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[country] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[email] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[email2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[webpage] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[im] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[reffered] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[type] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

CREATE TABLE [dbo].[treatment] (

[patientID] [int] NOT NULL ,

[treatmentdate] [datetime] NULL ,

[product] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,

[amount] [numeric](18, 0) NULL

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[patients] WITH NOCHECK ADD

CONSTRAINT [PK_patients] PRIMARY KEY CLUSTERED

(

[patientID]

) ON [PRIMARY]

GO

ALTER TABLE [dbo].[notes] ADD

CONSTRAINT [FK_notes_patients] FOREIGN KEY

(

[patientID]

) REFERENCES [dbo].[patients] (

[patientID]

)

GO

ALTER TABLE [dbo].[treatment] ADD

CONSTRAINT [FK_treatment_patients] FOREIGN KEY

(

[patientID]

) REFERENCES [dbo].[patients] (

[patientID]

)

GO

So I am not sure What the difference is betwen the scripts?

|||

Maybe your default collation is not set to SQL_Latin1_General_CP1_CI_AS

I noticed in the 2000 script it is being specified all the way down. That might need to be specified in your 2000 instance. Try adding the collation statement to your columns in the 2005 script and see.

|||There is an easy way to solve the problem.

Open the Microsoft SQL Management Studio, then in "Object Explorer" right click on your Database->Tasks->Generate Scripts

In the Wizard

Script Window Click Next, Select You DB, Click Next and in the Choose

Script Option Step, Change the value of "Script for Server Version"

from "SQL Server 2005" to "SQL Server 2000" and go on.

When you click "Finish" button, your script will SQL 2000 compatible.

Good luck.

|||I tried this and the first script is a product of SQL 2005 and their acript generator. I made sure it was SQL 2000 compatible and it will not run in a SQL 2000 query analyzer. Strange!|||

On the script side, I looked more closely and I think the (IGNORE_DUP_KEY = OFF) syntax is incorrect. I believe you either have IGNORE_DUP_KEY specified or it is absent (which is the equivalent of OFF).

Another way you could accomplish your goal is to set your database to a 2000 version format, make a backup, and send it to your hosting provider to restore on their server. That solution should at least solve any script problems.

Run the following command against your database in SQL Management Studio and then create your backup.

sp_dbcmptlevel 'MyDatabaseName', 80

Hope that helps.
Hugh

|||

While generating the Script

We have to select option

Script for Server version as SQL Server 2000

|||

Created the databse with compatibility level set to sql200.

restored my client database from sql2005

i run the command "sp_dbcmptlevel 'MyDatabaseName', 80"

backup the database

everyrhing was ok.

I go to the enterprise manager of my sql2000 and restore the backed up database and this is the error i got.

"Too many backup devices specified for backup or restore; only 64 are allowed. Restore Database is terminating abnormally."

|||Has anybody found useful input on the 64 backup device limit? Same problem here moving a SQL 2005 db to SQL 2005 or 2000.|||

Hi Byrnie,

In my case I have SQL2005 running on my laptop. I needed to move the database onto my server which is currently running SQL 2000. On the laptop and in SQL Server Management Studio I selected the import/export Wizard. Using the wizard I was able to export my SQL2005 tables across to the SQL2000 server. I have not yet completed the process and have just started the job. I will have to verify the data as soon as the job has completed. This is the first time I am contributing anything to a forum. I hope it helps

|||Hi frnds,

I have done the process of Converting SQL 2005 Database into SQL 2000 Database.

1.Create Database in SQL Server 2000 which is the name into SQL 2005.
2.From SQL 2005 Mgmt Console Studio , from Database - tasks - Generate Script
-then select Database -Script for Server Version - Change it from SQL Server 2005 to SQL Server 2000
3. Do the process as per wizard.
4.We can run that Script into SQL Query Analyzer 2000 for that selected database where you want to move it.

Its working fine.I got whole database table creation and whole relationship which was made into SQL Server 2005.

Gr8t.. thanks for your help.