Using pg_admin III and PostgreSQL 8.1 (both test and development) - postgresql

I want to backup Development and restore it in test and vice-versa.
So when I do a backup of the db (in PGAdmin III), it backs it up. But
when I restore it, all primary key information is gone and no data is
in the tables.
Any help would be much appreciated. Thanks.

pgAdmin uses the client programs pg_dump for making backups and pg_restore for restoring (it's only a GUI). Try to dump and to restore with these programs directly and see if you get any errors or warnings.
Offtopic: Support for version 8.1 ends this year, you should upgrade to a newer version.

Related

AWS RDS PostgreSQL Upgrade from 9.6.22 to 10.17

Good day. I just finished upgrading my AWS RDS database engine from 9.6.22 to 10.17. I used these steps to make the upgrade using the AWS Console:
Create snapshot of target database to upgrade
Restore snapshot
Upgrade the restored snapshot's (which is now a new instance) DB Engine version.
After I did all of this, everything seems fine but when I access the database, this warning message appears
WARNING: psql major version 9.6, server major version 10.
Some psql features might not work.
I did not continue on my testing because I want to know what is the meaning of this first. Because I am fairly new in AWS as a whole. Thanks!
The meaning is that just because you are connecting to an upgraded database on some machine run by Amazon, the PostgreSQL installation on your local machine was not magically updated. psql from version 9.6 doesn't know what metadata tables were changed in v10, what features were removed and so on.
It would be a good idea to install a more recent version of PostgreSQL on your machine. By the way, upgrading to v10 was not the smartest move, as that version will go out of support in less than a year. You should upgrade to the latest version that your service provider offers.
The client program psql you are using to connect to the database is from an older version than the database it is connecting to. Some of the introspection features might not work. For example, psql from 9.6 won't know how to do tab completion for commands that were added to the server after 9.6.
This is generally not a major problem for psql (unless the server wants to use SCRAM authentication), but for optimal experience it would be good to install a newer client. Other tools like pg_dimp might not with at all against a server newer than they are.

Migrate from db2 9.7 express-c to db2 11.5 developer

I have an old application handling data on a DB2 server (Linux version, 9.7 express-c) and I need to upgrade the server. I searched on the IBM site and I found that the last "free" version (11.5) is the only one available, but I cannot restore a backup taken from a 9.7 directly into the 11.5.
Is there any other way instead of using db2look and db2move?
Do anyone know if it's possible to find the 11.1 developer Linux version?
You can download the server-fixpack via https://www.ibm.com/support/pages/node/6427871
( IBM registration is required ),
This is an indirect way to IBM passport advantage website. It's important to choose the "DB2 Server Fix Pack" as distinct from other images. It is wise to always download the most recent fixpack for the release when using the Server-Fixpack, these fixpacks are cumulative and do not require the base version to be preinstalled.
You can get a trial license with it and just do the intermediate restore (from the v9.7 backup-image into a disposable Db2 v11.1 instance, then backup that database offline and copy the image to a place accessible to your Db2 v11.5 new instance.
You can then drop the v11.1 db2instance, and uninstall the Db2 v11.1 product.
Finally restore that Db2 v11.1 backup image into your Db2 v11.5 instance. This will upgrade the database to the Db2 v11.5 release, consider running db2updv115 afterwards, and revalidating all objects with SYSPROC.ADMIN_REVALIDATE_DB_OBJECTS etc.
Whether the above indirect method is quicker (or easier) than using db2move to export and load, will depend on the complexity of your database. Worth checking...if your Db2 v9.7 instance is still running of course.
Other methods are possible, if you want to spend $$ on recovery tools that extract data from backup images.

Enable stored procedures after database downgrade

I've recently upgraded/downgraded a database as stated on this link:
https://www-304.ibm.com/support/docview.wss?uid=swg21351101
Specifically, it was from db2 9.7.5 (32bit) to 9.7.6 (64bit) to 9.7.0 (32bit)
(license issues, bear with me). Now, after successfully restoring my backup to 9.7.0, I can't run any stored procedures.
On resolving the problem, It says:
Contact your DBAdmins and let them verify if the required stored
procedures are enabled on the DB2 database. The required stored
procedures are: JAVA Database Connectivity (JDBC) Open Database
Connectivity (ODBC)
Then I'm at a loss. How do I enable a procedure?
After upgrading or downgrading your DB2 instance you need to also upgrade or downgrade all databases in that instance. You do that by running the UPGRADE DATABASE command, as explained in the manual, which will create catalog tables, views, and other system objects appropriate for the version and fix pack level.

sonarqube 4 server migration

I'm trying to move a sonarqube 4.4 installation from one machine to another. What's more we would also like to change the database server from Oracle to Postgres 9.3.
What my plan was initially is that I would shutdown the sonar server, the database adminstrator would dump existing database, migrate it to postgres in the new server and I would zip the existing server installation and move it along to the new server. Then I would start the server.
However I've run into problems, even though sonarqube 4.4 booted fine, when I hit
http://new-server:9001/sonar4
I was getting a 404 response from sonar.
At some point I tried unzipping the server file anew in which case I managed to see the projects and the dashboards but no analysis data existed, even though last analysis time was available.
Any ideas or clues what am I missing?
Also, the driver in sonarqube for postgres is 9.1.xxx can I update this or should we use postgres 9.1 to make sure the driver is compatible with the database?
How is your ..\conf\sonar.properties? Normally, you should have changed:
sonar.jdbc.url=jdbc:oracle:thin:#localhost/XE
Did you use some tool to migrate Oracle to Postgress? I thought it was not possible.
Do not hesitate to ask for further precision.
Regards.

Migrating Postgresql 9.1 to 9.2 from an old server to a new server

In my old server, Postgresql 9.1 is installed and it contains a large scale of data. Now, I have got a new server and installed the latest version of Postgresql which is 9.2. I want to migrate the whole data from the old server to the new server. I looked at Postgresql documentation and there is a command to upgrade but it seems to explain upgrading in the same server. How could I approach for this matter?
I would be very careful about changing both hardware and major versions of PostgreSQL at the same time. If something goes wrong, it will greatly complicate figuring out what the problem is.
I do this as a two step process, first restore the database to the new server as the same version, then run pg_upgrade. That means you have to have both versions of the software installed on the new server simultaneously.
Dump the database with pg_dump and load it at the new server with psql. I think pg_upgrade is better as an in place procedure.