Error Migrating from Orient DB 1.1 to 2.2 - orientdb

We are currently using orient db 1.x which supports local storage. Now since it is deprecated we have decide to move to orient db 2.2 and move the database to plocal storage. I am using below steps to migrate the db:
Export the database in Orient DB 1.1
Run console.bat
connect local:../databases/mydb admin admin
export database mydb.export
Import the database in Orient DB 2.2
Run console.bat
create database plocal:../databases/mydb admin admin
import database mydb.export ( I have tried all possible permutations of different option of Orient DB)
After this step I get this error: "OIndexException: index with name dictionary already exists"
To resolve this I tried dropping the index using this command: drop index dictionary
I have again tried to import using this command: import database mydb.export . This time the import is successful.
I then disconnected and exited from the orient db console.
Now the problem is whenever I am trying to connect to this db using orient db console or GUI, I get below error:
com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage ..databases/mydb' with mode=rw
java.lang.IndexOutofBoundsException: Index: 23, Size: 23
For resolving this, I have gone through many tutorials here and there. But I cannot resolve it. Any leads from anyone on this issue would certainly help.

You should try upgrading it step by step, starting from 1.3.x
See Compatibility Matrix.

Related

Running pymongo to save data in local mongoDB database

I was trying to save data from jupyter notebook in Visual Studio Code into my local mongoDB database. Previously, I had multiple databases in my local mongoDB server. However, after running the pymongo code, all the existing databases got deleted and only the new database that was created in the python code exists.
Is there a reason because of which this has occurred? How can I resolve it?
Here's the code I had used for the same:
# Making a Connection with MongoClient
client = MongoClient("mongodb://localhost:27017/")
# database
db = client["stocks_database"]
# collection
company= db["Company"]
db.list_collection_names()
company.insert_one({"index":"Sensex","data":'abc'})

You have specified a database that is not empty, please specify an empty database

I'm trying to connect to an RDS cluster in AWS that's an Aurora PostgreSQL database. It's a brand-new database that I created along with the instances that I have Jira deployed to. However, when I try to connect to the instance from the Jira configuration screen I get this error
You have specified a database that is not empty, please specify an empty database.
I haven't touched this database at all, why is it giving me this error? I have one read and one write database in my cluster and the "hostname" is the endpoint for my write database, which is what the docs say. Could this be an issue with the Jira version I'm using?
This is the download link I'm using in my user-data script to install Jira. I'm also using PostgreSQL version 12.11
https://www.atlassian.com/software/jira/downloads/binary/atlassian-servicedesk-4.19.1-x64.bin
I switched to a different PostgreSQL version and now it's working.
PostgreSQL version 12.11 was giving me the error and switching to version 13.7 works as expected.

Is it possible to import HR schema in a postgresql database? I can't seem to find a way to do it

I tried to restore using pgadmin 4 and selected directory but i'm getting this kind of error

Datagrip - PostgreSQL connection to Heroku not showing tables

I connected to my Heroku PostgreSQL database with Jetbrains Datagrip. Authentication was successful, I didn't need to specify advantage properties when connecting, when I filled host, db, username and password, Test connection was successful.
When I write query to console, everything works, for example:
SELECT * FROM users
find all users in my database.
I have problem, when I want to see tables in my database structure. They don't appear. In project tree, I can see only Database_name -> schemas -> public -> key_id_seq (image: Project tree structure). When I click on synchronize button, I get an error:
[42703] org.postgresql.util.PSQLException: ERROR: column t.relhasoids does not exist
Position: .
Error encountered when performing Introspect database *db_name* schema public (details): ERROR: column t.relhasoids does not exist
Position: .
ERROR: column t.relhasoids does not exist
Position:
Am I doing something wrong? Thank you.
Datagrip updated to version DataGrip 2019.3.3, Build #DB-193.6494.42, built on February 12, 2020, Now working :)
Try using "Introspect using JDBC metadata". This fixed it for me when (I think) I had a version mismatch between postgresql server and DataGrip client.
Under your connection settings -> Options tab -> check Introspect using JDBC metadata
According to https://www.jetbrains.com/help/datagrip/data-sources-and-drivers-dialog.html#optionsTab :
Switch to the JDBC-based introspector.
To retrieve information about database objects (DB metadata), DataGrip
uses the following introspectors:
A native introspector (might be unavailable for certain DBMS). The
native introspector uses DBMS-specific tables and views as a source of
metadata. It can retrieve DBMS-specific details and produce a more
precise picture of database objects.
A JDBC-based introspector (available for all the DBMS). The JDBC-based
introspector uses the metadata provided by the JDBC driver. It can
retrieve only standard information about database objects and their
properties.
Consider using the JDBC-based intorspector when the native
introspector fails or is not available.
The native introspector can fail, when your database server version is
older than the minimum version supported by DataGrip.
You can try to switch to the JDBC-based introspector to fix problems
with retrieving the database structure information from your database.
For example, when the schemas that exist in your database or database
objects below the schema level are not shown in the Database tool
window.
My case was different here. But I was getting the similar error:
An error has occurred:
01:15:21 PM: Error: ERROR: column rel.relhasoids does not exist
LINE 1: ...t_userbyid(rel.relowner) AS relowner, rel.relacl, rel.relhas...
I was using pgadmin 3 to connect to Heroku hosted Postgresql. Then I configure pgadmin 4. The error didn't show on it. For installing pgadmin 4, I used docker approach.
docker pull dpage/pgadmin4
docker run -p 5050:80 -e "PGADMIN_DEFAULT_EMAIL=XXXX#Xmail.com" -e "PGADMIN_DEFAULT_PASSWORD=thirumal" -d dpage/pgadmin4
Now, open the browser and navigate http://localhost:5050/.

Orient db import data

I am trying to do export/import in orient db 1.7.4 community edition between to different orient db servers running same version.
I did export database dbone which created dbone.json.gz file.
connected to other server created a new database and ran import database dbone.json.gz
it terminated with below error.
Error on importing database 'dbthree' from file: dbthree.json.gz
Error while removing cluster '10'
E:\Installs\orientdb-community-1.7.4\orientdb-community-1.7.4\databases\dbthree\e.0.ocl: The process cannot access the file because it is being used by another process.
This exception:
The process cannot access the file because it is being used by another process.
Means you've a console or server open that locks the database.