I am using postgres 9.5. Suppose my system postgres got downgraded into 9.2. Will my old database works with newly installed postgres as it is?(backword compatibility) Or do I have to do some manual operations?
In other words, say I have a postgres database works with the latest version. Can I use the same database in other systems which run other supported versions of postgres (but not the latest)?
There is no supported way to downgrade PostgreSQL to a lower major release.
You will have to pg_dumpall with 9.5 and then try to install the dump in 9.2.
There will be error messages if the 9.5 dump uses features that were not present in 9.2 yet. In that case, edit the dump and fix it for 9.2.
Between major releases of postgresql, you will have to export your tables and database structure to older postgres version via pg_dump and pg_dumpall utilities. Then use the older version. This is the safest way.
If downgrading is done between minor releases, then just replacing the executables when the server is down and restarting the server will be sufficient, as the data directory remains unchanged between minor releases.
Related
I want to update MariaDB 10.3.n to 10.5.5.
In my investigation, I have found that I have to upgrade its version by version. for example version 1 to 2, 2 to 3, and so on.
Can I upgrade it directly from 10.3.n to 10.5.5 in windows and Linux?
Documentation says
You should be able to trivially upgrade from ANY earlier MariaDB version to the latest one (for example MariaDB 5.5.x to MariaDB 10.5.x), usually in a few seconds. (...)
Upgrades are normally easy because:
All MariaDB table data files are backward compatible
The MariaDB connection protocol is backward compatible. You don't normally need to upgrade any of your old clients to be able to connect to a newer MariaDB version.
The MariaDB slave can be of any newer version than the master.
So, I'd say that your investigation kind of failed.
Read the documentation
Backup first!
Then upgrade
I upgraded MariaDB old version 10.3.n to new version 10.5.5. It is working fine, without any problem, error or crash.
I am trying to restore database from PostgreSQL Version 11 into PostgreSQL Version 10.
I am using Windows 7 (32-bit) so I can't use the latest PostgreSQL Version. So I am using PostgreSQL Version 10.
But I am taking backup from database of PostgreSQL Version 11.
Because of which I am getting error:
pg_restore: [archiver] unsupported version (1.14) in file header
So, is there any way I can restore my database in PostgreSQL Version 10.
It would be really helpful if any can show me a way out.
Use pg_restore from the newer version to create a plain SQL dump file. Then restore to the older version from that dump file. Depending on what features you are using, the dump file may need to be manually edited before it will restore successfully.
I am trying to write a script to connect to all version's of oracle database starting from the latest to the oldest version of database.
I tried myself with cx_oracle library found like it needs a client library in the local to connect to remote database like if I download the latest version then it will work up to latest few versions not all.
Also tried with Sqlalchemy connection which is also using cx_oracle libraries.
Please do guide me if am doing anything wrong? I would also like to hear if there are any other ways to connect to the database using PYTHON
cx_Oracle 6 and higher already support connecting to any Oracle database from 9i all the way up to 18c depending on the client that you are using. cx_Oracle requires Oracle Client libraries at least at 11.2. You can see the interoperability notes here. Since anything earlier than 11.2 is no longer supported anyway, that should be adequate in almost all circumstances.
You can also use ODBC to connect to the database but that won't perform as well as cx_Oracle does.
I have an 11.2 Oracle database client on my corporate Windows 7 laptop and use cx_Oracle to connect to databases from version 9.2 to 12.2 without any difficulty.
The other way I connect to databases of all versions is to wrap Python around the Linux version of Oracle's sqlplus utility. This way I do not need to install cx_Oracle and can run with an older Oracle client and the version of Python that comes with the Linux distribution. In my case I am running on Redhat 6 which comes with Python 2.6. I connect to databases from version 8.1 to 12.2 in this way.
I have a blog post about how I run sqlplus from Python on Linux: https://www.bobbydurrettdba.com/2016/11/04/running-sqlplus-from-a-python-script/
Bobby
Why does Redgate compare for Oracle show NONEDITIONABLE for objects?
We have installed Oracle 12C locally on a windows machine to dry run database scripts before running them on the main Oracle 12C database on a Unix machine.
After running the scripts on the local version we run Redgate Schema compare and find that some of the Views and Triggers don't match. Upon further review the only difference between the two is the word "NONEDITIONABLE". This is not part of the our script and we are unsure how this was added to the local version of the object.
CREATE OR REPLACE FORCE NONEDITIONABLE
When researching EDITIONING we thought that maybe it was because the local Oracle install wasn't a portable database (PDB), so we changed our install, and confirmed that the EDITIONS_ENABLE was 'Y' for the user.
We are restoring a dump of the main to our local, and it appears to only be the objects that existed previously. Any new objects do not experience this issue.
I was never able to find a good solution in the local 12C version install. I finally used the restored 12C version to create by own backup, which I downgraded to the 11.2 version for Oracle Express. Once I restored the downgraded version the comparison and ran the scripts I no longer experienced an issue with the compare.
I have been asked to develop my new application with Postgres 10.0. Before this, I have been developing applications with MsSql and was quite easy even. I searched for the Version 10.0 but didn't find any downloadable link. The latest version that i came across was Postgres 9.2 and 9.3 beta
Can anyone help me to find the right version. I had read few posts on Stackoverflow such as this one Postgres 10.0 -Arcgis but don't know Arcgis is postgres database or is it the other DB engine same as Postgres and SQL Server.
What i want is to know whether Postgres version 10.0 ( free or paid) is available or not?
There is no PostGre - there is PostgreSQL which is also sometimes called Postgres.
There is no version 10. The current version is 9.2.4 with 9.3 being the next version planned (due some time in 2013).
ArcSDE/Arcgis seems to be a GIS system that can work on top of PostgreSQL.