Copying a database in Progress 4GL - progress-4gl

I am Using AppBuilder.In that if I am trying to connect to Sports2000 database.Even though there is a option to create a database its prompting to copy a database.Can I know the reason?

I'm not an app-builder user but I would imagine that it is creating a new db by copying an existing db. The standard candidates would be "sports", "sports2000" or "empty".

You can connect a database from the AppBuilder using Tools -> Database connections -> Connect.
You cannot connect to databases in the OpenEdge installation directory. These are only used as templates to create new databases.

When you create a new DB, you have option to start with:
Empty - to create a new empty DB
Copy from - copy DB Schema from other DB, such as sports, sports2000 or other existing DB.

Related

Copy data from Postgres DB (GCP Project A) to another Postgres DB (GCP Project B)

I would be happy to get your help / feedback re data load.
Goal:
Load source data from a Postgres database, which is located in GCP project A to another Postgres database, which is located in GCP project B.
Challenge:
Get a connection (I have an IAM account with sufficient rights to run a COPY TO / COPY FROM command) to the Postgres DB in GCP Project A and copy the table either to a CSV or create a dump that can be used in order to be inserted to another Postgres DB in GCP Project B.
How do I connect to the database (e.g. if I create a key, where shall I store the json keyfile and would that approach even be feasible?) with this IAM email account?
Other ways I've researched were to use psycopg2 (thus I could use the function cursor.copy_expert (which doesn’t need any superuser right or Postgres user credentials and copy the data), but I didn’t succeed in connecting to the database with psycopg2 due to challenges with cloud proxy.
Another idea was to use pg_dump or gcloud sql export csv.
I would be curious if some of you were facing a similar challenge and how did you solve it and what might be the best way/practice
You can have a try out database migration service. You can set up a continuous migration configuration and use Cloud SQL for PostgreSQL.
Hello after a lot of searching I've come to these solutions:
If you have continuous copy, you need to use the database migration service, check this documentation.
If you have one shot copy:
you can restore your instance, see the bottom page of this documentation
you can create a bucket and backup your instance on it, then import it from the other project

restore specific db issue using pgbackrest

I have a question about how to backup a specific Database using pgbackrest:
the problem is when I tried to restore a selected db using --include-db option of pgbackrest i got just the selected db and built-in databases(postgres, template0 and template1) restored, and when i tried to connect another db after the restore I got this error :
**FATAL: relation mapping file "base/24581/pg_filenode.map" contains invalid data
Previous connection kept**
is there any solution that allows the restore of the whole db with the selected one without losing the other databases ??
Thank you
I don't think this is possible according to the documentation of Include Database option:
Include Database Option (--db-include) Restore only specified
databases. This feature allows only selected databases to be restored.
Databases not specifically included will be restored as sparse, zeroed
files to save space but still allow PostgreSQL to perform recovery.
After recovery the databases that were not included will not be
accessible but can be removed with the drop database command. NOTE:
built-in databases (template0, template1, and postgres) are always
restored.

Creating a connection in SQLDeveloper

I am new to Oracle databases(I am using Oracle Database 11g Express Edition) and sqldeveloper. I have this doubt
When creating a new connection in sqldeveloper what is actually happening?
Creating a new database or connecting to an existing databasE?
If I create multiple connections are they pointing to a single database or different databases, if the later then how to choose a database name while creating a connection
You are establishing a connection to user (i.e. schema) which resides in an (Oracle) database. One database contains many users, so - create one connection per user.
Creating a connection does NOT create a new database; it is done differently. I don't think that 11gXE offers that option; you'd need a Standard or Enterprise Edition.
No problem if you use multiple databases (most of us do). I prefer keeping them in TNSNAMES.ORA file, in a directory used by the TNS_ADMIN environment variable. Currently, there are 94 databases I have access to, each of them having many users.
In your case, 11gXE is (probably) installed on your own computer, and you'll use one of its users (HR?), so - just connect to it. If it is locked, you'll have to unlock it first, though - in that case, create connection to SYS (don't forget to connect AS SYSDBA), then
ALTER USER hr ACCOUNT UNLOCK;
ALTER USER hr IDENTIFIED BY hr;
and then create connection to "hr" whose password is now set to "hr" (all lower case).

DreamFactory install database name

DreamFactory installer (via php artisan) is prompting "Enter your database name:", not sure what database means, it wants me to set a brand new database name or a name for existing one?
You need to provide a database for DreamFactory to use to store its configuration options and users. This can be sqlite, mysql, postgres, or sql server (paid option.)
When you run the setup command you need to provide the database connection information for an existing database. If you don't have a database, you can choose the sqlite option instead of one of the others. sqlite is file based and requires no server infrastructure. The database will be created for you automatically in that case.

Why is my new PostgreSQL database not empty?

Whenever I create a new database from pgAdmin or using the command line (using CREATE DATABASE database_name), it's not empty.
It contains some tables that are part of a previous project I worked on.
I'm not yet very familiar with Psql so I don't know what I'm doing wrong.
You probably have created objects in the database template1.
Quote from the manual:
By default, the new database will be created by cloning the standard system database template1. A different template can be specified by writing TEMPLATE name. In particular, by writing TEMPLATE template0, you can create a virgin database containing only the standard objects predefined by your version of PostgreSQL. This is useful if you wish to avoid copying any installation-local objects that might have been added to template1.
So, anything that is in the template1 database will be copied over to the new database when you run create database.
Connect to the template1 database and drop all objects you don't want.