I have an Access 2007 database with linked tables in a SQL 2005 database, and I want to create a local copy of the tables for testing purposes. It seems that this can be done in Access by copying the linked tables and pasting them with structure and data as local tables. If the local tables are then modified in the Access database, will the original linked ones in the SQL database be affected in any way?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Copy tables from linked to local
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Copy tables from linked to local
- This topic has 15 replies, 5 voices, and was last updated 14 years, 8 months ago.
AuthorTopicMurgatroyd
AskWoody LoungerOctober 19, 2010 at 8:56 pm #472425Viewing 12 reply threadsAuthorReplies-
RetiredGeek
AskWoody_MVPOctober 19, 2010 at 9:02 pm #1250738The local copy will have no effect on the linked table. I’d give the local table a very different name so you don’t accidentally confuse the two.
-
WSjohnhutchison
AskWoody LoungerOctober 19, 2010 at 11:19 pm #1250745Depends what you want to test, but once you make the local tables, any actions that change data will still be referring to the original linked data.
I think it would nbe easier to make a new Access back-end, and import the tables into that. Then you could switch back-ends, between the real one and the test one.
-
Murgatroyd
AskWoody LoungerOctober 20, 2010 at 1:40 am #1250748 -
WSjohnhutchison
AskWoody LoungerOctober 20, 2010 at 2:26 am #1250754I don’t see any contradiction between our answers.
You can copy the linked table (tblPeople) for example and name the copy (tblPeople_Local) The two tables are independent, and you can change anything you like in tblPeople_Local and it will have no effect on tblPeople.
But
Anything in your database that makes changes to tblPeople will still do so. Any forms bound to tblPeople will still be bound to it. Any queries will still be bound to it. Any code designed to change tblPeople will still change it.
So my question is :What sorts of things do you want to test?
For testing purposes you need things to work on tblPeople_Local, but when you have finished testing you need them to go back to working with the linked tblPeople. I am suggesting two different back ends as a way of doing that. That would allow you to revert to testing mode any time you like.
-
WSpatt
AskWoody LoungerOctober 20, 2010 at 2:51 am #1250755I have an Access 2007 database with linked tables in a SQL 2005 database, and I want to create a local copy of the tables for testing purposes. It seems that this can be done in Access by copying the linked tables and pasting them with structure and data as local tables. If the local tables are then modified in the Access database, will the original linked ones in the SQL database be affected in any way?
Why dont you copy the SQL Server database to a test SQL Server database.
Then just relink from one to the other, then no need for Access BE’s or changing of table names.
-
Murgatroyd
AskWoody LoungerOctober 20, 2010 at 4:14 pm #1250828Thanks for your further replies.
John, when you said:
– “once you make the local tables, any actions that change data will still be referring to the original linked data”,
– I read this as:
– “once you make the local tables, any actions [on the local tables] that change data will still be referring to the original linked data” [which is what I wanted to avoid],
– whereas it seems that you meant:
– “once you make the local tables, any actions [on the linked tables] that change data will still be referring to the original linked data [which is expected].However, the reason for making the copy of the original database is because some records need to be modified or deleted in the copy, which will be moved to a development system and tested there, while the original will continue to be used on a production system.
As I am more familiar with Access than with SQL Server, my original question was about using Access to copy the tables into an Access database rather than using SQL server to copy the database and re-linking Access to the copy. Regarding the latter method, is there a simple way to make a copy of a database using SQL Server 2005 Management Studio?
-
WBell
AskWoody_MVPOctober 20, 2010 at 4:48 pm #1250833…. Regarding the latter method, is there a simple way to make a copy of a database using SQL Server 2005 Management Studio?
Yes, there are actually several. One way is to do a backup of the production database, create an empty new test database and then restore the production database into the test database. Another way is to use the Import/Export tool where you create an empty test database and then import tables from the production database into the test database. You will need to play with the Mgmt Studio a bit to understand how it works, and you will also need to be aware that the Import process generally does not include the primary and foreign keys. Hope this helps.
-
-
Murgatroyd
AskWoody LoungerOctober 20, 2010 at 8:01 pm #1250863Thanks for your reply. Creating a separate test database by restoring a backup to a different destination with a different name sounds like a good method, as it should avoid disrupting the production database. Can you direct me to a step-by-step procedure for doing this in SQL Server 2005 Management Studio?
-
WBell
AskWoody_MVPOctober 21, 2010 at 5:45 pm #1251084This MSDN article tells you how to backup a database. This MSDN article tells you how to restore a database backup to a new database – presumably your test database.
-
Murgatroyd
AskWoody LoungerOctober 21, 2010 at 7:12 pm #1251099Thanks for your reply. I have a production Access front end linked to the production SQL database, and I want to link a test copy of the same Access front end to the test copy of the SQL database so that I can continue to use the same relationships, queries, etc. in the test setup.
How do I make the test copy of the Access front end connect to the test copy of the SQL database – is there a setting that I can change, or do I need to add the test copy of the SQL database as a new data source in ODBC and re-link all the tables in the test copy of the Access front end?
-
WBell
AskWoody_MVPOctober 22, 2010 at 6:33 am #1251150It is possible to modify your production database so that it will switch back and forth between the test and the production version of the backend, but it involves writing a bunch of code to relink the tables. In any event you will need to create a new ODBC data source for the test version of the SQL Server backend. I usually just copy the production Access frontend, make some visual forms changes so I know I’m working in the test version when I open it, and then relink the tables (using the linked table manager) in the test frontend to the test SQL Server backend database.
-
WSpatt
AskWoody LoungerOctober 22, 2010 at 5:08 pm #1251351It is possible to modify your production database so that it will switch back and forth between the test and the production version of the backend, but it involves writing a bunch of code to relink the tables. In any event you will need to create a new ODBC data source for the test version of the SQL Server backend. I usually just copy the production Access frontend, make some visual forms changes so I know I’m working in the test version when I open it, and then relink the tables (using the linked table manager) in the test frontend to the test SQL Server backend database.
Adding to what Wendell has said, i tend to change the database Title that is displayed at the top of the Access instance you are running. This Title i keep blank for the current system, but i put TEST in caps when using the test system.
-
-
Murgatroyd
AskWoody LoungerOctober 24, 2010 at 5:11 pm #1251603Thanks for your reply. I created test copies of the SQL Server backend and the Access frontend, and a new ODBC data source representing the test backend, and re-linked the tables in the test Access front end by ticking the “Always prompt for new location” option in the linked table manager and selecting the new data source for all tables. This all seems to have worked OK. However, is there a way to re-link all the tables in one step; i.e., to select all the tables and then select the new data source once rather than for each table individually?
Also, when viewing a table in SQL Server 2005 Management Studio, how do I refresh the view to reflect changes made in Access? I tried the Refresh options on the View menu and on the table right-click menu, but the view was not refreshed, although it was refreshed when I closed and reopened the table.
-
WBell
AskWoody_MVPOctober 24, 2010 at 6:06 pm #1251614In the linked table manager, you can tell it to select all tables, and as long as all of your tables are linked identically, then the re-link with a new data location will only prompt you once. However, if you have any linked tables where the linking information is different, then you will be prompted for the ODBC database source for each table – which can be a major pain if you have a hundred or more tables as many of our databases do. But once you get them all linked correctly, then the process is pretty smooth. If you have several data sources, there are some third-party addins that may make you life easier.
On checking to see if the data has been changed, I normally do that in Access, as you can do filters and such that are much easier in Access. In SQL, you may want to create a query if you are trying to check selected records. But if you open the table to view records, it doesn’t normally refresh to show you new or changed records, and you do have to close and reopen it.
-
Murgatroyd
AskWoody LoungerOctober 24, 2010 at 8:52 pm #1251626Re the linked table manager: it is only prompting for the new source once now; not sure why it prompted for every table the first time.
Re refreshing the table view: noted thanks; I normally do work in the Access front end but just wanted to double-check in SQL server that the test frontend was updating the test backend, rather than the production one.
Many thanks for your help.
Viewing 12 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Unable to update to version 22h2
by
04om
19 minutes ago -
Windows 11 Insider Preview Build 26100.4482 (24H2) released to Release Preview
by
joep517
7 hours, 27 minutes ago -
Windows 11 Insider Preview build 27881 released to Canary
by
joep517
7 hours, 30 minutes ago -
Very Quarrelsome Taskbar!
by
CWBillow
17 hours, 42 minutes ago -
Move OneNote Notebook OFF OneDrive and make it local
by
CWBillow
20 hours, 26 minutes ago -
Microsoft 365 to block file access via legacy auth protocols by default
by
Alex5723
9 hours, 12 minutes ago -
Is your battery draining?
by
Susan Bradley
2 hours, 19 minutes ago -
The 16-billion-record data breach that no one’s ever heard of
by
Alex5723
3 hours, 11 minutes ago -
Weasel Words Rule Too Many Data Breach Notifications
by
Nibbled To Death By Ducks
1 day ago -
Windows Command Prompt and Powershell will not open as Administrator
by
Gordski
8 hours, 23 minutes ago -
Intel Management Engine (Intel ME) Security Issue
by
PL1
8 hours, 36 minutes ago -
Old Geek Forced to Update. Buy a Win 11 PC? Yikes! How do I cope?
by
RonE22
1 hour, 15 minutes ago -
National scam day
by
Susan Bradley
8 hours, 8 minutes ago -
macOS Tahoe 26 the end of the road for Intel Macs, OCLP, Hackintosh
by
Alex5723
4 hours, 17 minutes ago -
Cyberattack on some Washington Post journalists’ email accounts
by
Bob99
2 days, 1 hour ago -
Tools to support internet discussions
by
Kathy Stevens
14 hours, 3 minutes ago -
How get Group Policy to allow specific Driver to download?
by
Tex265
1 day, 16 hours ago -
AI is good sometimes
by
Susan Bradley
2 days, 8 hours ago -
Mozilla quietly tests Perplexity AI as a New Firefox Search Option
by
Alex5723
1 day, 22 hours ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
3 days, 8 hours ago -
June KB5060842 update broke DHCP server service
by
Alex5723
3 days, 7 hours ago -
AMD Ryzen™ Chipset Driver Release Notes 7.06.02.123
by
Alex5723
3 days, 11 hours ago -
Excessive security alerts
by
WSSebastian42
2 days, 2 hours ago -
* CrystalDiskMark may shorten SSD/USB Memory life
by
Alex5723
3 days, 20 hours ago -
Ben’s excellent adventure with Linux
by
Ben Myers
11 hours, 7 minutes ago -
Seconds are back in Windows 10!
by
Susan Bradley
3 days, 8 hours ago -
WebBrowserPassView — Take inventory of your stored passwords
by
Deanna McElveen
2 days, 1 hour ago -
OS news from WWDC 2025
by
Will Fastie
1 day, 11 hours ago -
Need help with graphics…
by
WSBatBytes
2 days, 16 hours ago -
AMD : Out of Bounds (OOB) read vulnerability in TPM 2.0 CVE-2025-2884
by
Alex5723
4 days, 12 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.