How to downgrade QuestDB from 6.1 to 6.0.9? - questdb

I tried to upgrade my QuestDB instance from 6.0.9 to 6.1 and the new version failed to on few tables with error in the logs
2021-10-28T22:34:26.1289079Z E i.q.c.m.EngineMigration failed to upgrade table path=XXXX
Now I cannot query / write few tables in 6.1. How can I downgrade back to 6.0.9. When I run 6.0.9 I got error for another half of my tables
Metadata version does not match runtime version [expected=422, actual=424]
How can I downgrade to back to 6.0.9?

6.1 had an issue to upgrade some tables. To downgrade a_table back to 6.0.9 you need to go to quest_root/db/a_table directory and rename files
meta.v422 to meta overwriting existing file
_txn.v422 to _txn
You also need to delete file quest_root/db/upgrade.d
After that if you start QuestDB 6.0.9 a_table will be operational

Related

Connect to Sybase database from Django

I tried to connect to Sybase database from Django using sqlanydjango, but
I have stuck. One answer saying that
sqlany-django is no longer maintained; it was last updated in May 2016.
What is the other possibility to connect to Sybase database?
OS Ubuntu 18.04
django 2.2.4
Sybase is no longer maintained and it's not supported by Django. I recommend using one of the supported databases:
PostgreSQL
MariaDB
MySQL
Oracle
SQLite
Personally, I would recommend using PostgreSQL - I think it's the most advanced database. If you use it, I would recommend using version 13, since version 14 is still new and I think it's not officially supported by Django yet. It's always a good practice to use the previous major release. Also with Django, I recommend upgrading to the latest major release only about 4 to 6 months after its initial release. So for today, this means using Django 3.2 (latest minor release, currently 3.2.11).
You can use django-environ to define the database you are using in settings.
You could use the freetds module. GitHub repository was active 5 days ago, it aims to provide support for sybase and MSQL Server.
I used it with MSQL
You can download it from there, and installing with the instruction on this link (Sybase python module website)
Then you can test your installation using these steps
You can also try different Django version.
If this doesn't show anything wrong, and Django still won't connect to your DB, you can try to edit Django's source files so the ImproperlyConfigured exception doesn't raise (REALLY REALLY RISKY, DO A BACK UP OF YOUR DB) or migrate your Sybase to a supported database.
You can use pyodbc.
To install this.
Pip install pyodbc
import pyodbc
cnxn = pyodbc.connect(‘DRIVER={Devart ODBC Driver for ASE};Server=myserver;Port=myport;Database=mydatabase;User ID=myuserid;Password=mypassword;String Types=Unicode’)
For reference:-
https://medium.com/#sharma.jayant1992/best-way-to-connect-python-with-sybase-database-76445713efaf

How to install multiple sitecore 9.0 instance in different CM servers with single database?

I am installing Sitecore 9.0 instance in 2 CM servers. I have successfully installed Sitecore 9.0 instance in first CM server with the database on a different server.
But when I try to install a new Sitecore 9.0 instance in the second CM server it is trying to create a new database. But I want both my Sitecore instance to use the same database created during the first Sitecore 9.0 instance creation.
Please find below the PowerShell commands used to install Sitecore 9.0
Invoke-SitecoreInstall –Path ‘D:\Sitecore\Sitecore 9.0.1 rev. 171219 (WDP XM1 packages)\XM1 Configuration files 9.0.1 rev. 171219\sitecore-solr.json’
Invoke-SitecoreInstall –Path ‘D:\Sitecore\Sitecore 9.0.1 rev. 171219 (WDP XM1 packages)\XM1 Configuration files 9.0.1 rev. 171219\sitecore-XM1-cm.json’
You can't easily skip the database creation step in sitecore-XP1-cm.json, but as a quick solution you can simply change the SqlDbPrefix parameter when running the installation script on the second CM instance. As a result it will still create another set of databases what you can delete later. And on the successful completion of the Sitecore installation script you will need to change the connection strings on the second CM in ../App_Config/ConnectionStrings.config to point it the databases you want to use.

Install Drupal 8.x PostgreSQL

Tell me, how to install Drupal 8.1.9 or 8.2.0 with PostgreSQL? Interestingly, in earlier versions, when the installation was attended by a selection of PostgreSQL. In newer versions this is even no mention
Alternative database engines such as SQLite and PostgreSQL are still available in Drupal 8. However, only the available engines are shown.
If you install the correct PDO module for your PHP environment (e.g. php70-pdo-pgsql) you should have that engine available to you:
You can also use phpinfo() to tell if PostgreSQL support is correctly enabled. You will find the following statement there if it is:
PDO Driver for PostgreSQL => enabled
remove the commented code extension=pdo_pgsql from php.ini file and then start the setup you will see the postgreSQL database option

Not able to start WSO2 ESB 4.0.3 in linux box

I have started wso2 4.0.3 in my local and tested It is working fine.
But same version I have installed in linux box,server not started it is showing below error. I used this command to start: nohup sh wso2server.sh
ERROR - DatabaseUtil Database Error - Table "UM_DIALECT" not found;
SQL statement:
SELECT COUNT(UM_ID) FROM UM_DIALECT WHERE UM_TENANT_ID=? [42102-140]
org.h2.jdbc.JdbcSQLException: Table "UM_DIALECT" not found; SQL statement:
SELECT COUNT(UM_ID) FROM UM_DIALECT WHERE UM_TENANT_ID=? [42102-140]
It should be working fine if you are using fresh binary pack (zip). Are you using different type of database other than H2? (H2 is the default database shipped with the binary pack)
if you are getting this error again, please start sever with -Dsetup option.
Ex : wso2server.sh -Dsetup
Thanks,
Chamara Silva
It happen because your WSO2 ESB is missing previous data from the previous database.
You can find your carbon database in
$wso2dir\repository\database\WSO2CARBON_DB.h2.db
Maybe there are files that missing or can't be copied to your linux environment (not only your carbon database but also other configuration files). Based on #ChamaraS's answer, i also suggest you to using fresh binary pack or create a backup pack with your custom configuration.
ps: i am just curious if you used Filezilla to transfer those files (face same problem here)

sqlite3 error when updating to django 1.4

I have created a new virtual environment so that I can update my code from django1.3 to django1.4. The django1.3 environment has no issues with the sqlite version and database I am using. The Django1.4 version gives me a error of:
DISTINCT ON fields is not supported by this database backend
I am not finding any information on changes to the new version that might cause this. Does anyone know why it might work fine in 1.3 and not 1.4?