Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 5 of 5 total |
Adding a table to a database. |
Thu, Aug 13 2015 9:35 PM | Permanent Link |
Jeff Cook Aspect Systems Ltd | Hi
For some reason that I can't fathom, I have a table that is missing from a database. A couple of weeks ago it was definitely there. I can't think of anything that would cause it to vanish. Not a big table, not backed up as it was just a trial thing being used in developing some ideas. If I look in the database folder, then I can see the table's constituent parts and see that they were last modified 3 August - 10 days ago. If I use EDBMgr, then the table doesn't show. Is there a way to add a table (preferably with the data) into the database - presumably the Catalog. Like reverse engineering a table that isn't in a database and then using the SQL to add it. TIA Jeff -- |
Fri, Aug 14 2015 3:27 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Jeff
>For some reason that I can't fathom, I have a table that is missing from >a database. A couple of weeks ago it was definitely there. I can't >think of anything that would cause it to vanish. Not a big table, not >backed up as it was just a trial thing being used in developing some ideas. > >If I look in the database folder, then I can see the table's constituent >parts and see that they were last modified 3 August - 10 days ago. If I >use EDBMgr, then the table doesn't show. The only sane, none malicious, way I can think of for this to happen is for an older version of the catalog to be restored. DROP TABLE would get rid of the data, corruption of the catalog would probably mean you couldn't access anything. But just because I can't think of a mechanism doesn't mean there isn't one! >Is there a way to add a table (preferably with the data) into the >database - presumably the Catalog. Like reverse engineering a table >that isn't in a database and then using the SQL to add it. Not that I know of. The single biggest change from DBISAM in my opinion was the move to a catalog. All (well almost all) the metadata is stored in the catalog. If the catalog is gone so is the structure information. If you know the structure, or have a backup of the catalog with it in, you can try copying the table files to one side, recreating the table in the catalog and then copying them back. It may not work though. Roy Lambert |
Fri, Aug 14 2015 3:55 AM | Permanent Link |
Adam Brett Orixa Systems | Jeff
You are in a strange place. The I've never seen the behaviour you describe. After taking a backup (and probably also just making a physical copy of all your files for safety's sake) I would just try calling CREATE TABLE with the exact structure of the table you have on-disk. Once the table is in the catalog, try closing & reopening the session and see whether it now points to the data you have on-disk. If the on-disk data has been deleted, try copying over the physical file as per Roy's suggestion, or perhaps try calling RESTORE DATABASE XXX TABLES YYY and only list the problem table in YYY. I would also try calling BACKUP DATABASE and RESTORE DATABASE and see whether the restored version contains the "invisible" table files or not. ... I get the feeling Tim will want to see a copy of your database once he wakes up, to figure out what is going on! |
Fri, Aug 14 2015 12:03 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jeff,
<< For some reason that I can't fathom, I have a table that is missing from a database. A couple of weeks ago it was definitely there. I can't think of anything that would cause it to vanish. Not a big table, not backed up as it was just a trial thing being used in developing some ideas. If I look in the database folder, then I can see the table's constituent parts and see that they were last modified 3 August - 10 days ago. If I use EDBMgr, then the table doesn't show. >> What is the date/time stamp on the database catalog (edbdatabase.edbcat) ? My guess is that something was executed that dropped the table from the catalog, or the catalog was replaced with an older copy. If the former, then you can restore the old catalog from the edbdatabase.edbcat.old file. Tim Young Elevate Software www.elevatesoft.com |
Sun, Aug 16 2015 9:14 PM | Permanent Link |
Jeff Cook Aspect Systems Ltd | On 15/08/2015 4:03 a.m., Tim Young [Elevate Software] wrote:
> Jeff, > > << For some reason that I can't fathom, I have a table that is missing from a database. A couple of weeks ago it was definitely there. I can't think of anything that would cause it to vanish. Not a big table, not backed up as it was just a trial thing being used in developing some ideas. > > If I look in the database folder, then I can see the table's constituent parts and see that they were last modified 3 August - 10 days ago. If I use EDBMgr, then the table doesn't show. >> > > What is the date/time stamp on the database catalog (edbdatabase.edbcat) ? My guess is that something was executed that dropped the table from the catalog, or the catalog was replaced with an older copy. If the former, then you can restore the old catalog from the edbdatabase.edbcat.old file. > > Tim Young > Elevate Software > www.elevatesoft.com Thank You Tim. Roy and Adam How the table came to be missing from Catalog may have to remain a mystery - EDBMgr's SQL History doesn't show it dropped, data has been added using EDBMgr and I have only one reference in my little test program and that's just TEDBQuery that queries the table. However, the problem is solved following Tim's suggestion of recovering the Catalog from .OLD. Cheers Jeff |
This web page was last updated on Tuesday, May 7, 2024 at 06:25 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |