|
Posted by Daniel Manes on 02/14/06 21:41
[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
[Back to original message]
|