Linking to SQL Server Databases
In a system where you store your data solely in Access tables, the Access Database Engine supplies all data retrieval and management functions and handles security, data validation, and enforcement of referential integrity.
In a system where Access acts as a front end to client/server data, the server handles the data management functions. It's responsible for retrieving, protecting, and updating data on the back-end database server. In this scenario, the local copy of Access is responsible only for sending requests and getting either data or pointers to data back from the database server. If you're creating an application in which Access acts as a front end, capitalizing on the strengths of both Access and the server can be a challenging endeavor.
You might ask why you would want to convert your database to a client/server application. The reasons include the following:
- Greater control over data integrity
- Increased control over data security
- Increased fault tolerance
- Reduced network traffic
- Improved performance
- Centralized control and management of data
Scenarios in which you may need to upsize include the following:
- Large number of simultaneous users (more than 10-15)
- Large volume of data (tables with more than approximately 100,000 rows)
- Increased need for security (payroll data and such)
Link to SQL Server Data
If you store your data in SQL Server, you will need to link to it from your Access database. The steps that follow show you how to link from an Access database to a table stored on a SQL Server:
- Select ODBC Database from the Import & Link group on the External Data tab of the Ribbon. The Get External Data - ODBC Database dialog appears.
- Select Link to the data source by creating a linked table and click OK. The Select Data Source dialog appears.
- Select the Machine Data Source tab. The dialog appears.
- Click New. A warning may appear indicating that you are unable to create System DSNs. If the warning appears, click OK to dismiss the dialog. The Create New Data Source Wizard appears.
- Click Next. The wizard appears.
- Select SQL Server or SQL Server Native Client 10.0 (depending on which version of SQL Server you are accessing), and then click Next.
- Click Finish to launch the Create a New Data Source to SQL Server Wizard.
- Supply a name and optional description for the data source.
- Designate the name of the SQL Server you want to connect to. (You might need to contact your system administrator to obtain this information.)
- Click Next. The wizard appears.
- Indicate the type of security you will use to log on to the server. (Again, you might need to contact your system administrator for this information.)
- Click Next. The wizard appears.
- Change the default database to point at the SQL Server database that you want to link to.
- Click Test Data Source to test your connection to the SQL Server database. A dialog appears confirming that the test was successful.
- Click OK to close the dialog, and OK again to close the wizard. Your data source appears in the list of available data sources.
- Click OK to select the new data source and begin the process of linking to the tables within it. The Link Tables dialog appears.
- Select the tables you want to link to and click OK. The process completes and the tables appear in the Navigation Pane with globes, indicating that they are using ODBC to connect to the SQL Server. You can now treat the tables like any other linked tables.
In this tutorial:
- Sharing Data with Other Applications
- What Is External Data?
- Looking at Supported File Formats
- Exporting to an Excel Spreadsheet
- Exporting to ASCII
- Importing from Another Access Database
- Importing ASCII Data
- Linking to Tables in Another Access Database
- Linking to Another Type of Database
- Linking to SQL Server Databases
- The Linked Table Manager