Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread Catalog and data files copy
Thu, Oct 4 2018 2:16 PMPermanent Link

Jose Eduardo Helminsky

HPro Informatica

Hi

I am new to ElevateDB (coming from DBISAM) and I understand the idea of  config and catalog but:

My questions:

1) If I have 2 databases with one or more tables with the same structure can I copy the file EDBDat to another database via CTRL+C/CTRL+V ?

2) When the version of catalog does not allow me to open the tables ?

3) The database path is saved in config file and the tables structure are saved in catalog file. Am i right ?

4) If I just copy catalog and data files without config to another folder, if I create another config with the same settings the application will work ok ?

5) Why sometimes I receive the message the database can´t be opened for shared access ?

For now that is it.

Thanks in advance

Eduardo
Fri, Oct 5 2018 3:19 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Jose

You'll need Tim for definitive answers

>1) If I have 2 databases with one or more tables with the same structure can I copy the file EDBDat to another database via CTRL+C/CTRL+V ?

It depends SmileyIn the early days this would just not work but Tim has revised the checking now so its possible sometimes. What I did since I had this need early on was to use EXPORT & IMPORT to move data

>2) When the version of catalog does not allow me to open the tables ?

This is really a repeat of the first question. I'm not sure if the rules have been fully (or even partially) documented for anyone other than Tim.

>3) The database path is saved in config file and the tables structure are saved in catalog file. Am i right ?

I don't think so. My understanding is that the config file contains the tables in the database Configuration:

DataTypes Table
Collations Table
Modules Table
TextFilters Table
WordGenerators Table
Migrators Table
MigratorParams Table
LogEvents Table
Backups Table
Updates Table
ServerSessions Table
ServerSessionLocks Table
ServerSessionStatistics Table
Users Table
Roles Table
UserRoles Table
Databases Table
DatabasePrivileges Table
Jobs Table
Stores Table
StorePrivileges Table
Files Table


the catalog file contains the tables

Tables Table
TablePrivileges Table
TableColumns Table
TemporaryTables Table
Constraints Table
ConstraintColumns Table
Indexes Table
IndexColumns Table
Triggers Table
TriggerColumns Table
Views Table
ViewPrivileges Table
ViewColumns Table
TemporaryViews Table
Procedures Table
ProcedurePrivileges Table
ProcedureParams Table
Functions Table
FunctionPrivileges Table
FunctionParams Table
Dependencies Table
SchemaObjects Table
SchemaDifference Table

Look in the on-line help for more information.


>4) If I just copy catalog and data files without config to another folder, if I create another config with the same settings the application will work ok ?

Possibly, possibly not. The easiest way is to copy everything then issue a number of ALTER DATABASE db PATH newpath statements

>5) Why sometimes I receive the message the database can´t be opened for shared access ?

Most likely is that you're trying to access two the same data using two different config files.

Roy
Fri, Oct 5 2018 10:26 AMPermanent Link

Adam Brett

Orixa Systems

Jose

The best way to do this (in my opinion) is to use the EDB manager "reverse engineer" tools to create a CREATE SCRIPT for your database.

You can then run this script in a session linked to the new location and all the necessary files will be created.

Personally I try not to "hack" ElevateDB in the way you are describing, ie copying and pasting ANY files (tables, catalogs ...) as it is too easy to end up with a mix-match between versions, which does not make EDB very happy!
Fri, Oct 5 2018 11:22 AMPermanent Link

Jose Eduardo Helminsky

HPro Informatica

Roy and Adam

Thanks for the answers.

Most of my questions is to just to be sure about it.

About hacking ElevateDB is not what I want. I have already copied some tables using "insert into table select * from olddb.table" and it works like expected. It is also to be sure if I can or can´t do this even though this is not a correct way to do this.

Regards
Eduardo
Mon, Oct 8 2018 10:56 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

José,

In addition to what others have already said, my short answer to your questions is NO Smiley
What I mean is, some of those things might be possible, but don't do it.
DBISAM is "file" oriented - a table was self-contained in a file, whilst in EDB it's not.
You will be happier Smileyif you forget the files and always look at the next abstraction level in EDB and always consider Tables as the basic unit instead of files, because a Table is no longer a file and it can't be for many reasons - referential integrity, triggers, stored procedures, jobs, database synchronization, etc. You can still copy tables, move them around, copy data between databases, backup and restore and export and everything, just not messing with files.
Just forget files exist in EDB, except where they are really needed that is backup/restore, import/export and database synchronization.

--
Fernando Dias
[Team Elevate]



Ă€s 19:16 de 04/10/2018, Jose Eduardo Helminsky escreveu:
> Hi
>
> I am new to ElevateDB (coming from DBISAM) and I understand the idea of  config and catalog but:
>
> My questions:
>
> 1) If I have 2 databases with one or more tables with the same structure can I copy the file EDBDat to another database via CTRL+C/CTRL+V ?
>
> 2) When the version of catalog does not allow me to open the tables ?
>
> 3) The database path is saved in config file and the tables structure are saved in catalog file. Am i right ?
>
> 4) If I just copy catalog and data files without config to another folder, if I create another config with the same settings the application will work ok ?
>
> 5) Why sometimes I receive the message the database can´t be opened for shared access ?
>
> For now that is it.
>
> Thanks in advance
>
> Eduardo
>
Tue, Oct 9 2018 6:16 AMPermanent Link

Jose Eduardo Helminsky

HPro Informatica

Fernando

After some hours using ElevateDB I can handle with this changes without any problems.

Thanks for reply.
Tue, Oct 9 2018 2:26 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Eduardo,

<< 2) When the version of catalog does not allow me to open the tables ? >>

I'm not sure if this is the "version" that you're referring to, but the version (the internal EDB version) of the catalog will never prevent you from being able to open a given table.  However, the *structure* of a table within the catalog may prevent you from being able to open a table if the table has a different checksum for the basic structure than what is stored in the catalog.  The basic structure is anything that affects the layout of the data on disk, such as columns, indexes, block/page sizes, etc.

<< 3) The database path is saved in config file and the tables structure are saved in catalog file. Am i right ? >>

Correct.  Just think of the config file as a place where database path mappings are stored, and you'll be fine.  The config file is *more* than that, of course, but it's a good starting point.

<< 4) If I just copy catalog and data files without config to another folder, if I create another config with the same settings the application will work ok ? >>

Yes.  The config file doesn't even need the same settings, as far as the database/store paths are concerned.  In terms of user security, however, the config file should match what you're using otherwise you'll have orphaned users/roles/privileges in your catalog(s).

<< 5) Why sometimes I receive the message the database can´t be opened for shared access ? >>

https://www.elevatesoft.com/supportfaq?action=view&category=edb&question=cannot_lock_database

Tim Young
Elevate Software
www.elevatesoft.com
Image