1 migrating from access to sql server simon kingston, csu / nps nrgis

20
1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

Upload: kendall-wetherington

Post on 30-Mar-2015

217 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

1

Migrating from Access to SQL Server

Simon Kingston, CSU / NPS NRGIS

Page 2: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

2

Learning Goals/Agenda

• Differences between Access and SQL Server• Why Move from Access to SQL Server?• Important Installation Options for SQL Server 2005

Express (SSE)• How to Migrate Data from Access to SSE*

– Access Data Project (ADP) vs. Linked Tables– Case Study: NCCN – John Boetsch

• Objects in SSE / Managing the database with SQL Server Management Studio Express (SSMSE)*

• Sharing Data with SQL Server Express*• Scripting the database with the SQL Server

Database Publishing Wizard*• Questions/Convert your own Databases

*exercises

Page 3: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

3

SQL Server 2005 Editions

Edition Cost(Processor License)

DB Size RAM Features

Compact $0 4 GB +

Express $0 4 GB 1 GB ++

Developer $49 No limit 3 GB +++++*

Workgroup $3,899 No limit OS max +++

Standard $5,999 No limit OS max ++++

Enterprise $24,999 No limit OS max +++++

Page 4: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

4

SSE

• FREE!• Powerful database engine• Free management tool – SQL Server

Management Studio Express• Integrates with Visual Studio Express• Can act as a subscriber in replication• Easy upgrade to other editions of SQL

Server

Page 5: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

5

Differences Between Access and SSE

Feature Access SSE

Database type File-based Server-based

What’s included? Db engine + UI Db engine

SQL language Jet SQL T-SQL

Size limit 2 GB 4 GB

Constant use Not ideal Works well

Security Not easy More robust

Scalability Careful w/more More users

Development Easier More work

Page 6: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

6

• You have a multi-user database with concurrent users

• You need to interchange data with other databases

• You are having performance problems

• You need better security

• You have spotty network reliability

Why Move from Access to SQL Server?

Page 7: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

7

Installing SSE

Required• .NET Framework 2.0• SQL Server 2005 Express Edition with Advanced

Services*Optional• SQL Server 2005 Express Edition Toolkit• SQL Server 2005 Samples• SQL Server 2005 Books Online• SQL Server Migration Assistant for Access*• SQL Server Database Publishing Wizard*

*required for today’s exercises

Page 8: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

8

Installing SSE (continued)

• Key Installation Options– Not Everything is Installed by Default

• Replication• Full Text Search• Connectivity Components• Software Development Kit• Management Studio Express

– Authentication Mode• Windows Authentication or Mixed Mode

– Collation Settings

• SSE installs “secure by default”– Many features are turned off by default for security

Page 9: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

9

Migrating Data from Access to SSE

• Upsizing Wizard in Access

• SQL Server Migration Assistant (SSMA) for Access

• Importing from full-blown version of SQL Server Management Studio

Page 10: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

10

Exercise

• Start the exercise and go up to the end of the section on reviewing the upsized/migrated databases

• Let me know if you have any problems or questions during the exercise

Page 11: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

11

Access Data Project vs. Linked Tables

Access Data Project (ADP) Linked SQL Server Tables

Tables in SQL Server Tables in SQL Server

Action queries replaced by SQL Server stored procedures

Action queries remain in Access

Connect using OLEDB (Object Linking and Embedding Database)

Connect via ODBC (Open Database Connectivity) and Jet

Use ADO (ActiveX Data Objects) in VBA code

Use either DAO (Data Access Objects) or ADO in VBA code

Queries processed on server and results sent back

Queries processed in Access, so more network traffic

More complicated to implement

Requires fewer changes to queries, code, etc.

•when using Access 2000, 2002, or 2003 with SQL Server 2005 , you can’t make adds or changes to the SQL Server database objects from your ADP

Page 12: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

12

Case Study – NCCN – John Boetsch

Page 13: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

13

ADP or Linked Tables or Something Else?

• Start out using Linked Tables– Tends to be easier, esp. if you already have a front-end

developed in Access– Can be optimized to reduce network traffic, but if records returned

start to get too big, look into ADP– Use the SSMA for Access to migrate

• If you really want client/server, look into ADP– If you’ve already got a front-end in Access that uses ADO– If you don’t need local tables– Use the Upsizing Wizard to migrate

• Realize when it’s time to go with a web app.– Broad usage and you don’t want to distribute/install/support a

client application on many desktops

Page 14: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

14

Objects in SSE / Managing the Database with SSMSE

• Database• User• Schema• Table• Index• View• Stored Procedure• User-defined Function• Trigger

Page 15: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

15

Exercise

• Start the exercise at the section on Creating Objects in SQL Server using T-SQL and the SSMSE Interface and stop at the section on Sharing Data

• Let me know if you have any problems or questions during the exercise

Page 16: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

16

Configuring SSE to Share Data

• SSE runs as a Windows Service• SQL Server Configuration Manager

– Change networking protocol settings– Change SQL Service options

• SQL Server Surface Area Configuration– Use this tool to enable, disable, start, or stop

features, services, and remote connectivity

Page 17: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

17

Exercise

• Do the exercise section on Sharing Data

• Let me know if you have any problems or questions during the exercise

Page 18: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

18

Scripting the Database with the SQL Server Database Publishing Wizard

• Allows deployment of database to server by running script

• Allows database structure to be preserved in version control with application code

Page 19: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

19

Exercise

• Do the exercise section on Scripting the Database with the SQL Server Database Publishing Wizard

• Let me know if you have any problems or questions during the exercise

Page 20: 1 Migrating from Access to SQL Server Simon Kingston, CSU / NPS NRGIS

20

Links

• SQL Server 2005 Express Edition• SQL Server Migration Assistant for Access• SQL Server DB Publishing Wizard 1.1• Convert Jet SQL to T-SQL cheat sheet• Guide to Migrating from Access to SQL

Server 2005• Optimizing Access Applications Linked to

SQL Server• Transact-SQL (T-SQL) Reference