Introduction
When managing multiple Geobank sites that initially started with the same profiles, it's common to find that valuable table modifications have been made on one site that you'd like to replicate on others. There's a way to selectively copy tables if both the source and destination profiles connect to the same SQL Server database.
Problem
Directly overwriting entire profile files (.gmp) is not a viable solution due to the significant risk of losing all pre-existing data and tables in the destination profile(s). Currently, the system does not have a feature for partially copying data or tables from one profile to another.
Solution
This solution requires all sites to connect to the same SQL Server. The process uses the Source profile's sync database as a common medium to transfer a table from the Source to the Destination profile.
Steps
- Prepare the SQL Server Connection
- Ensure the Source and Destination profiles can connect to the SQL Server. This connection can be an existing or newly created one specifically for this task.
- Ensure the Source and Destination profiles can connect to the SQL Server. This connection can be an existing or newly created one specifically for this task.
- Create a Temporary Sync Database (if needed)
- If the source profile does not have a sync database containing the necessary tables, or you do not want to modify its existing sync database, create a temporary one dedicated to this transfer task.
- If the source profile does not have a sync database containing the necessary tables, or you do not want to modify its existing sync database, create a temporary one dedicated to this transfer task.
- Add Table from Database
- In the destination profile, use the "Add table from database" feature to connect to the temporary sync database (or the source profile's existing sync database if it contains the needed tables).
- Return to the same location and find your new connection (in our example, we refer to it as "Temp_for_Copy_Tables").
- In the destination profile, use the "Add table from database" feature to connect to the temporary sync database (or the source profile's existing sync database if it contains the needed tables).
- Locate and Copy the Table
- Navigate to the temporary database connection and find the specific table you want to copy. Don't worry about prefixes like "1_" – these are auto-generated by Geobank numbers used to distinguish between profiles.
- Expand the table options using the dropdown arrow and select "Copy Table To".
- Select the destination profile where you want the table to reside.
- Navigate to the temporary database connection and find the specific table you want to copy. Don't worry about prefixes like "1_" – these are auto-generated by Geobank numbers used to distinguish between profiles.
- Rename the Copied Table (Optional)
- Once the table is copied to the Destination profile, you may rename it to remove the prefix (e.g., "1_") if desired.
- Once the table is copied to the Destination profile, you may rename it to remove the prefix (e.g., "1_") if desired.
- Cleanup
- If the sync database was created temporarily for this task, remove it once the copying process is complete.
Notes
- This method assumes direct access to the SQL Server or database by both profiles. If such access is not feasible, the alternative would be to manually create or alter tables in the Destination profile.
- Always ensure you have backups of all profiles and data before attempting any changes.
- The process requires a basic understanding of navigating SQL Server and the respective database management interfaces for the profiles.
Troubleshooting
- Connection Issues: If you encounter connection problems between your profiles and the SQL Server, verify the connection settings and ensure that the SQL Server allows connections from your profiles.
- Table Copy Errors: Check that the table you are trying to copy does not have dependencies that are not met in the Destination profile. Copy any necessary dependencies before the main table.
This guide should help you effortlessly copy tables between profiles in SQL Server, maximising the utility of your data across multiple sites or profiles without data loss.
Want to learn more?
Online Help Manuals - Click here for the latest version
Learning Management System - Click here to login or here to request access
Comments
0 comments
Please sign in to leave a comment.