Orient db import data - orientdb

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.

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'})

Connecting to PostgreSQL Data Source in SQL Server Import Export Tool

I'm trying to setup an easily-replicable (or even manual and I do it once a month or so) process for moving data from a large Azure PostgreSQL database to a more manageable Azure SQL database for end users that are most familiar with SQL Server. I've successfully connected to the PostgreSQL database via PGAdmin, so I know all my connection string info.
I started by installing the latest ODBC driver from here.
I then used a connection string which was given to me from the Azure portal, filled in the proper database name and password, and attempted to use the following drivers:
PostgreSQL ODBC Driver(UNICODE)
PostgreSQL ODBC Driver(ANSI)
I am getting the following error with either of them:
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
What step am I missing in this process? Or how best can I troubleshoot this?
After more research, I attempted to add the ODBC driver here:
And got the following error (I'm not sure why Tableau is relevant to this?):
Thank you.

Error Migrating from Orient DB 1.1 to 2.2

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.

restore database gives error UnsupportedOperationException

I'm following this less than precise tutorial Data Mining The City
I've create the database from the studio and it shows in my
databases folder as "soufun_db".
I downloaded the soufun.zip file into the directory db that I
created in the orientdb folder
Then I connect to the"soufun_db" database from the console
"CONNECT remote:localhost/soufun_db admin admin"
Then I run my restore database command
"RESTORE DATABASE /home/mustafa/Desktop/orientdb-community-2.1.0/db/soufun.zip
Output is:
"Restoring database database /home/.../soufun.zip
Error: java.lang.UnsupportedOperationException: restore"
BACKUP and RESTORE operations are supported only via plocal connection.
http://orientdb.com/docs/last/Console-Command-Restore.html

Google Cloud MySql Instance An unknown error occurred when importing

I created a mysql instance and everything is running on it. I used the process outlined in the cloud sql import to create a mysqldump file from my local production mysql instance running on windows.
mysqldump --databases xxxxx -uroot -p --hex-blob --default-character-set=utf8 > d:\database_file_feb2_2014.sql
Uploaded the file to the cloud storage and every time I try to import I get a Unknown error.
Things I have checked.
1) Made sure the USE database; command was in the file after the
CREATE DATABASE IF NOT EXISTS databasename;
command.
2) Made sure i was using the --hex-blob command.
created a export of smaller test db which was only 4.5MB instead of the 6GB file i was trying to import. Ran the first few lines from the sql prompt which ran fine.
Still unable to isolate at which line the import is breaking or Why
When I try to view the log from the old console, I get "An error has occurred. Please retry later."
I have dumped the whole instance and recreated the instance and still get the same error.
Origin OS: Windows Server 2003 R2
Running Mysql 5.1
Any advise on how I can troubleshoot this and move forward.
Thank you