Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 4 of 4 total |
RESTORE table from 1 database into another ... what are the rules? |
Sun, Dec 4 2011 6:22 AM | Permanent Link |
AdamBrett Fullwell Mill | I have a database with some 'system' tables which contain useful resources.
When I make a product for a new customer I need most of these resources, but the other tables in the application will differ. I need a simple method for transferring data from 1 database to another. Usually I use EDBManager, and drag and drop the table icon into a SQL script to create an "insert" statement ... this is very useful & works. However, I would prefer to create a semi-permanent EDBBkp file with the required resources: --On database 1 BACKUP DATABASE "OldCustomer" AS "SystemComponents" TO STORE "BackUp" TABLES "SysResources", "SysTypes", "SysSearches", SysStatus" [etc.] Then I would like to be able call RESTORE on this back up file & restore these 2 tables to the new database. --On database 2 RESTORE Database Test FROM "SystemComponents" IN STORE "BackUp" However, when I do this it does nothing. I don't see any table objects appear in database 2. If I add the "INCLUDE CATALOG" keywords at the end of each statement I get the data I need, but I also get empty table structures for ALL the tables in database 1, not just the few tables listed in the BACKUP statement. Is there anyway around this? |
Sun, Dec 4 2011 9:31 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Adam
I don't think there's a way round it, but since John Hay demonstrated my lack of SQL expertise its only fair someone else can shoot me down here. The problem is that ElevateDB is centred around a catalog whilst DBISAM was centred around the table files. Without the entry in the catalog ElevateDB doesn't even believe a table exists I use export and import to move data from my live system to development for testing purposes but that doesn't create the tables merely populates them. As things stand I think you'll need something to create the table and something to populate it, or combine the two in a script. Roy Lambert [Team Elevate] |
Sun, Dec 4 2011 1:00 PM | Permanent Link |
AdamBrett Fullwell Mill | Thanks Roy,
Though I have used it elsewhere, I hadn't thought to use EXPORT & IMPORT ... as I've really only used them in the past to do things like pass tables to Excel files or other external formats & vice-versa. While this lacks the elegance of a single EDBBkp file containing a selection of tables, I only need 1 exported file per table ... which is pretty good. |
Mon, Dec 5 2011 6:35 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Adam,
<< If I add the "INCLUDE CATALOG" keywords at the end of each statement I get the data I need, but I also get empty table structures for ALL the tables in database 1, not just the few tables listed in the BACKUP statement. >> If you want just certain table structures to be backed up, then there isn't any way to do that in EDB. In general, the TABLES clause only applies to table data, not table structures/metadata. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, April 29, 2024 at 05:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |