By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,210 Members | 1,490 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,210 IT Pros & Developers. It's quick & easy.

Importing Access database into Sql Server Express

P: n/a
[Note: originally posted this on microsoft.public.sqlserver.programming
but had no luck there...sorry if you're seeing this twice]

Some facts:

1) I have an Access database (.mdb file) sitting on my harddrive.
2) I have Visual Studio 2005, Sql Server Express, and Sql Server
Management Studio Express.
3) I do *not* have Microsoft Access.

What I'm trying to do:

I simply want to import the Access database into Sql Server Express. In
other words, I want to end up with a Sql Server Express database that
has all the same tables, keys, and relationships as the Access database
as well as all the data from it. I can live without the queries stored
in the Access database, but those would be nice too.

What I've tried so far:

I'm able to connect to the Access database using the "Linked Servers"
features in Management Studio Express. From there, I was able to write
some simple Transact-SQL queries to find out what tables are in the
Access database and copy them, one at a time, into a Sql Server Express
database.

This is definitely a good start, but it doesn't take care of the
primary keys or foreign keys. There appear to be procedures for those
as well (sp_primarykeys, sp_foreignkeys), but I keep thinking there
must be an easier way.

Which brings me to...

Questions:

Without having to buy additional software/tools, can I import this
Access database without a lot of programming? If so, how?

Thanks in advance,

-Dan

Feb 14 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
TTBOMK you can use the DTS wizard in MS-Sql 2000 to do what you want,
and you can save your specifications in a file which can be run from
code. Is the DTS wizard available in SQL Express.? Dunno!

The self-code? What's a lot of programming? I haven't done this but I'm
thinking it would take more then one hour, possibly two, if you know
your way around JET, Ms-SQL and ADO or similar technology. If you
don't, it might take a long along time.

Feb 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.