Moving from Microsoft Access 2007 to Sql Server 2005 - vb.net

I have MS Access 2007 Databases and VBA modules associated with it.
I Now want to upgrade my project so as to use Sql Server 2005 and Vb.net using visual studio.net.
Can any one suggest Complete details on the transfer without much hassle or data loss.?
Thanks In Advance

Per RBarry's answer...the data migration to SQL Server is easy using the SQL Server Migration wizard. Then you will have a working microsoft access application (probably but maybe it will require polishing and tweaking).
To convert the front end (ui) to vb.net there might be a converter but even if there is one you would likely have to do a lot of it manually anyway. So you treat the access version like a prototype and you start building your app in vb.net by hand.
Seth

Start with the Ms-Access SSMA site: http://www.microsoft.com/sqlserver/2005/en/us/migration-access.aspx
I am not aware of a migration guide specifically for Access -> SqlSever, however, there is a very extensive Oracle -> SqlServer Migration Guide that you could easily cherry-pick for a project plan.

I use SQL Server to import data from Access databases. Be aware that it won't import your keys or relationships- you'll need to recreate those.
Your VBA code is specific to Access. You'll need to rewrite it in VB.NET.
The Access queries are probably going to cause you the most trouble. Simple ones can be converted with the Upsizing Wizard, but the more complex ones will have to be rewritten in SQL.
Also note SQL Server objects follow different naming conventions. An Access table is typically prefixed with tbl, SQL tables typically aren't named with a prefix.

Related

Converting an Access database to SQL

I am a programmer and am wanting to undertake a project of converting an Access database to an SQL database.
Is this pretty easy to do? Can I just use a tool to create all the tables with the same names and 'copy' over the data?
I know that Access has built in reporting features. Does SQL have these reporting features? If not, is it easy to create them?
You just need to import your access to sql server database.
Check this tutorial:
Importing Microsoft Access 2007 Database Tables into SQL Server
Regards
MS Access is not a database at all, by default, it uses the Jet or ACE database to store data, but Access will also work perfectly well with data stored in a number of other databases, MS SQL included. There is no need to change from an MS Access front-end when you are moving the tables to a new back-end. SQL Server does not have all the user-interface and reporting tools that MS Access has, it is a database, not "a rapid application database development and reporting tool"
Try this one its free from microsoft.

Creating SQL statements for creating tables in SQLce database

I'm starting to learn database, and I will work with SQLce. Is there some type of library that can assist in creating the proper SQL statements for creating tables etc? (Not for query of the database, as I plan to use LINQ). I'm not thinking an MS library, but some amateur project maybe..
You want to download SQL Server Management Studio Express. The SSMS tools let you connect to SQL CE as well as the full blown SQL Server databases, and best of all it's free. You can create your tables via the GUI, and then instead of saving the table, you could have it show you the SQL script instead and learn that way. Everything you do in the GUI executes T-SQL behind the scenes and you have the option of saving all that SQL and running it yourself.
See this stackoverflow question here too for some more details.

Change of code if Database is changed (form Access to SQL Server)

I am trying to migrate from Access Database to SQL server database. Do I need to make changes (for saving, reading, deleting etc. data) to my code as well?
I understand I need to change connection but what about code?
Thanks
Furqan
For the most part, Access SQL Queries are very similar to SQL Server Queries. Therefore, unless you're using Access-specific constructs such as Val, CInt, etc in your queries, you can safely migrate to SQL Server.
It is recommended though, that you thoroughly test the program after migration lest you run into 'strange' errors.
I'm sure the conversion will require some time and troubleshooting. For one, Access through version 2007 uses VBA for the back-end code and SQL Server's programming is quite different from VBA. Developer's transitioning from Visual Basic 6 (very similar to VBA) to VB.NET ran into quite a few challenges.
Also, keep in mind that SQL Server is best used as the back-end storage engine. The user interface is typically written in a .NET language using Visual Studio. SQL Server (at least through 2005 -- I haven't used 2008) doesn't have user interface components like a File Open dialog box.

Export MS Access Database to SQL Server 2008 Express

Is there an easy way to export a MS Access Database backend (Tables & relations) into an SQL Server database, so that it then can be used as a backend for a tailored application written in C# using Entity Framework?
The Access Database contains at least 50 tables and the export should not ruin its structure and relations.
Microsoft SQL Server Migration Assistant for Access
As Gabriel indicates using the SSMA is the best solution for upsizing the tables, indexes and relationships in Access. Then I'd suggest working on the Access front end, containing the queries, forms, reports, macros and VBA code so it works with the SQL Server data storage. This won't take very long by comparision to rewriting the app.
Then you may find you don't need to rewrite the application in another environment. This assumes that the tables are properly normalized and clean. Even then it may be simpler to do some cleanup in that respect in Access.
The Microsoft SSMA link in the comment from 2010 only worked when I chose NOT to register. Also, here is an updated link to the MS SSMA executable.
There are Upsizing Wizard for Access to do the migration to MSSQL 2008.
Goto [Database Tools] menu and click on [SQL Server] icon, then proceed the migration with the wizard.

Automatically Generate SQL from existing MS Access table

I've just designed a large database by playing around in MS Access. Now that I'm happy with the design, I need to be able to generate this same database (tables, relationships, etc.) from code.
Rather than hand-writing the SQL CREATE statements (which will be long, tedious, and error-prone process), I was wondering whether there was a shortcut. I seem to recall from my limited exposure to MySql that I was able to export an entire database as an SQL statement that can then be run in order to regenerate that database.
Do you know of a way to do this in MS Access, either through the GUI, or programmatically?
I just found and tried out this tool: jet-tool. It seems to work well for Access 2010.
For free for 30 days (then $30) you can give DBWScript a go, looks like its what you are asking for, although not in native Access GUI or programmatically
The quick and dirty, easy, perfectly legitimate way to do this is just copy the .mdb file. Empty out the data if you need to - usually there are static tables that are handy to leave populated, however.
I use a free utility called MDB Viewer Plus (http://www.alexnolan.net/software/mdb_viewer_plus.htm).
Launch it, open your db, then select your table.
On top menu, select "Table > Generate SQL - CREATE".
I don't know what tools you have on your development machine, so this may or may not be helpful.
You can easily transfer your Access database to Microsoft SQL Server using the Upsizing Wizard.
The express edition of SQL Server is available for free > here.
You will also want to get the free Management Studio Express.
Using these free graphical-based tools you can easily generate the SQL statements to re-create the database. You will have the Create statements you are looking for and they will be placed in a text file.
The Bullzip is very good to this. Very simple. See bullzip Access to MySQL for example
It is possible export any tables to SQL or migrate automatically.
Access to MySQL is a small program that will convert Microsoft Access Databases to MySQL.
Wizard interface.
Transfer data directly from one server to another.
Create a dump file.
Select tables to transfer.
Select fields to transfer.
Transfer password protected databases.
Supports both shared security and user-level security.
Optional transfer of indexes.
Optional transfer of records.
Optional transfer of default values in field definitions.
Identifies and transfers auto number field types.
Command line interface.
Easy install, uninstall and upgrade.
The thing that you're mentioning in MySQL is sql dumping. Very useful feature. If you want to migrate the database to mysql, here's a helpful article.
http://www.kitebird.com/articles/access-migrate.html#TOC_4
I have been using for years a tool called database.net from https://fishcodelib.com/Database.htm
I generally use it on client's site as a portable version of SSMS (drop and run), but it can handle a multitude of RDBMSes, including Access.
Connect to your mdb/accdb, right click any table, choose SCRIPT AS, Create, and you're done.
If you right click Tables header, you can select multiple tables to generate, but I think it's a feature of the paid version.
I have no acquaintance with them, just a happy client.
I found an easy way to go:
Export-> ODBC Database
and then retrieve the SQL form there (e.g via pgadmin on postgres)
Compare'Em
http://home.gci.net/~mike-noel/CompareEM-LITE/CompareEM.htm
The free version creates VBA while the $10 pro version gives you DDL statements.