How do I connect JetBrains DataGrip to CockroachDB Serverless? - jetbrains-ide

I'd like to use JetBrains DataGrip with CockroachDB Serverless.
How do I create a connection? I get errors that look like this:
[08004] FATAL: codeParamsRoutingFailed: missing cluster name in connection string.

Use the following configuration to connect to CockroachDB Serverless from JetBrains DataGrip (or other JetBrains IDEs).
The key tricky part is that you need to add the cluster name to the options parameter in the Advanced tab, as shown here. Replace cluster-name-1234 with your cluster name and ID, as shown on your CockroachDB Serverless Connect screen.

Related

Thingsboard: change of database

I have installed thingsboard on Linux. initially it was using Cassandra database, but now i have changed it to postgresql. But the issue is that both the thingsboard and postgresql are not running. The only error in postgresql log file is "Incomplete startup Packet" and thingsboard log file has "all hosts tried query failed(tried: /127.0.0.1:9042)" error.
I have stopped the Cassandra service and also configured the thingsboard.yml file to use postgresql database.
How to fix this issue.
Without knowing more log details, I suggest to fresh install a new ThingsBoard+PostgreSQL instance and migrate the Cassandra db to the new instance using the REST API feature of ThingsBoard, this way you avoid the corruption of PostgreSQL.
The steps are:
Install a new instance of ThingsBoard and PostgresSQL
Retrieve data via REST API from old instance
Send data via MQTT or other supported protocols to new instance
You can find a script which does this automatically in this repo.
I am not sure but In my experience that you should check up as below.
install PostgreSQL on your server.
create database like thingsboard inside postgreSQL.
configure for using PostgreSQL in thingsboard.yml
Run installation script again
https://thingsboard.io/docs/user-guide/install/linux/#memory-update-for-slow-machines-1gb-of-ram

Looking for a good Cassandra GUI Client Tool

Kindly suggest a good client GUI tool for Cassandra or Please Share the download link of the DataStax DevCenter old version (V1.6.0). Currently we are using cqlsh to connect Cassandra. I couldn't find a better GUI for Cassandra.
Found (and tested) description how to connect using only open-source via DBeaver:
https://javaresolutions.blogspot.com/2018/04/opensource-db-ui-tool-for-cassandra-db.html
Download dbeaver (Community Edition)
Download cassandra jdbc jar files: http://www.dbschema.com/cassandra-jdbc-driver.html (Downloading and Testing the Driver Binaries section have links to binary and source)
extract cassandra jdbc zip
run dbeaver
go to Database > Driver Manager
click New
Fill in details as follow:
Driver Name: Cassandra (or whatever you want it to say)
Driver Type: Generic
Class Name: com.dbschema.CassandraJdbcDriver
URL Template: jdbc:cassandra://{host}[:{port}][/{database}]
Default Port: 9042
Embedded: no
Category:
Description: Cassandra (or whatever you want it to say)
click Add File and add all of the jars in the cassandra jdbc zip
click Find Class to make sure the Class Name is found okay
click OK
Create New Connection, selecting the database driver you just added
Here is the only open source and running example I found
https://github.com/Kindrat/cassandra-client for ready to run jar, you can use https://github.com/ozkanpakdil/cassandra-client/releases/download/v0.0.0/cassadra-client-0.0.0-0-exec.jar I built in my linux mint, GUI looks little bit demo like but I connected to my local cassandra and saw a table and data in the UI.
Not open source options below, I tested 2 of them and they are working, I can suggest datagrip which works fast and nice.
https://www.jetbrains.com/datagrip/download/#section=linux
https://www.mongodbmanager.com/download <<-- idi not test this one
https://razorsql.com/download.html
You may also look to the Cassandra interpreter in the Apache Zeppelin. The upcoming 0.9.0 release (0.9.0-preview2 is already available) contains a lot of changes in supporting Cassandra.

Changing internal database to external JDBC in Atlassian crowd

I have installed Atlassian crowd using the internal database method on Centos 6. Installation went successfully and now i want to use external database (mysql) using JDBC. I cant find the option to accomplish that. How can i do that?
See Atlassian's documentation for how to Migrate to Another Database:
This guide applies to situations when you may need to migrate Crowd to another database.

Is there any way to migrate the built-in usergrid db

I've been running usergrid-stack commit 08f26cc865c96185d11990bf622730beff59971a for a while using the built-in cassandra db.
I need to migrate to another server and thought I'd take the chance to update.
I tried copying the folder standalone/target/tmp to the new installation but doing so gives me the error below.
null; Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=Cannot create property=hinted_handoff_throttle_delay_in_ms for JavaBean=org.apache.cassandra.config.Config#6b7b9f29; Unable to find property 'hinted_handoff_throttle_delay_in_ms' on class: org.apache.cassandra.config.Config
Invalid yaml; unable to start server. See log for stacktrace.
Is there any way to migrate the db to a newer version?
If not, is there at least a way to migrate the db using the old version?
iirc hinted_handoff_throttle_delay_in_ms is a setting from Cassandra 1.1 which was removed in Cassandra 1.2 so you might need to edit the conf file (cassandra.yaml) and remove this setting.

Subsonic: Is it possible to use the oledb provider

When I set up a connection for Subsonic 3.0.0.4 to connect to an Oledb sql provider using the T4 Templates I get the following error: Keyword not supported 'provider' Can Subsonic access a database using OleDb? If so. How?
Which dbms do you want to use?
Since SubSonic 3 uses System.Data.Common for accessing data, it should be possible to use it with every dbms that supports ADO.net (I belive there is a OleDbProvider for ado).
But if you use a DBMS that is not supported by subsonic you have write your own DataProvider and an OleDb.ttinclude template file.
The beste starting point is to look at an existing provider:
https://github.com/subsonic/SubSonic-3.0/tree/master/SubSonic.Core/DataProviders/MySQL
https://github.com/subsonic/SubSonic-3.0-Templates/tree/master/TemplateProviders
Creating your own Provider shouldn't be to hard at all. I would use a Copy&Paste approach from an existing provider and modify everything that causes some errors.
I would use the standard SQL to LINQ Entity spaces but I have to connect to a database for a client through their application server's specific OLEDB provider. Apparently it's doing extra work after the standard OLEDB SQL commands are sent to the server. So LINQ as far as I understand is out. I built my own CRUD classes, but it's a pain doing it this way. I just want a tool that can build the standard classed so I don't have to create the layer myself.
It's MS SQL Server 2005 on the other end.

Resources