OrientDB - How to configure OSystem database path? - orientdb

Since 2.2.0, OrientDB now has a system database named OSystem. I'm looking for a way to configure the path to this database independently from other databases? Is this possible? Can I do this at runtime with environment variables?
Thanks!

This is currently not supported.
However, I'll try to add support for this in an upcoming release.
Thanks for the suggestion.
-Colin
OrientDB LTD
The Company behind OrientDB

I've done some tests, trying to set different paths in orientdb-server-config.xml properties, but after every server start OrientDB checks for OSystem DB presence, and if there is no one, it will automatically create it in default /databases/ folder:
2016-06-17 15:13:26:738 INFO {db=OSystem} Creating the system database 'OSystem' for current server [OSystemDatabase]

Related

EF Core 3.1 using Authentication=Active Directory Integrated

[Update 1]
I could make it work using the following connection string
Server=tcp:mydatabaseserver.database.windows.net,1433;Initial Catalog=mydbname
and implementing an interceptor as mentioned in this article.
This proves that Azure is correctly configured, and the problem is somewhere in the application (maybe a missing package?).
Anyway, I would still like to be able to change the connection string and switch between AAD authentication and sql authentication, without additional logic in the application.
[/Update 1]
I'm using EF Core 3.1.4 on an Azure WebApp, and I would like to use the Azure AD identity assigned to the application for authentication, but I run into the following exception:
ArgumentException: Invalid value for key 'authentication'.
Microsoft.Data.Common.DbConnectionStringBuilderUtil.ConvertToAuthenticationType(string keyword, object value)
This is the connection string:
{
"ConnectionStrings": {
"Admin": "Server=tcp:mydatabaseserver.database.windows.net,1433;Initial Catalog=mydbname;Authentication=Active Directory Integrated"
}
}
I initialize the context using the following code:
var connectionString = this.Configuration.GetConnectionString("Admin");
services.AddDbContext<NetCoreDataContext>(builder => builder.UseSqlServer(connectionString));
The Microsoft.Azure.Services.AppAuthentication package is also imported (version 1.5.0)
Active Directory Integrated wasn't working for me in .NET Core 3.1 but it works now ever since I installed the NuGet package Microsoft.Data.SqlClient (I installed version v2.0.1). It now works with the following connection string:
"MyDbConnStr": "Server=tcp:mydbserver.database.windows.net,1433;Database=MyDb;Authentication=ActiveDirectoryIntegrated"
Note: it also works if I have spaces between the words like this:
"MyDbConnStr": "Server=tcp:mydbserver.database.windows.net,1433;Database=MyDb;Authentication=Active Directory Integrated"
And it also works if I include escaped quotes like this:
"MyDbConnStr": "Server=tcp:mydbserver.database.windows.net,1433;Database=MyDb;Authentication="Active Directory Integrated""
Finally, note that there are additional properties which can also be used in the connection string:
;User ID=myruntimeuser#mydomain.com;Persist Security Info=true;Encrypt=true;TrustServerCertificate=true;MultipleActiveResultSets=true
Welcome to the Net frameworks/runtimes hell.
Currently ActiveDirectoryIntegrated and ActiveDirectoryInteractiveauthentication options are not supported for NetCore apps.
The reason is that starting with v3.0, EF Core uses Microsoft.Data.SqlClient instead of System.Data.SqlClient. And the most recent at this time version of Microsoft.Data.SqlClient (also the preview versions) supports these two options only for NET Framework.
You can see similar question in their issue tracker Why does SqlClient for .Net Core not allow an authentication method 'Active Directory Interactive'? #374, as well as the documentation of the SqlAuthenticationMethod enum - ActiveDirectoryIntegrated (emphasis is mine):
The authentication method uses Active Directory Integrated. Use Active Directory Integrated to connect to a SQL Database using integrated Windows authentication. Available for .NET Framework applications only.
With that being said, use the Authentication workaround, or wait this option to be eventually implemented for Net Core.
Upgrading the Nuget packages:
Microsoft.EntityFrameworkCore and Microsoft.EntityFrameworkCore.SqlServer to 6.0.1 and using Authentication=Active Directory Managed Identity in the connection string helped me resolve the issue.
UPDATE
If you use azure msi, pls read this document.
https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-connect-msi
PRIVIOUS
Your problems maybe not configure in portal. You can follow the offical document to finished it, then try again.
First, you need to create SQL managed instances which maybe cost your long time. Then u need to configure Active Directory admin and your db. When you finished it, you will find ADO.NET(Active Directory password authentication) in your SQL database ->Connection strings in portal. You can copy and paste it in your code to solve the issue.
I have tried it by myself, and it works for me. For more detail, you can see this post.

Apache Polygene connect with MongoDB EntityStore

I'm using Apache Polygene (Qi4j) 2.1 and I'm trying to use the MongoDB entity store with multiple nodes and replicaSet.
my current configuration in my mongodb.booking.store.properties file is:
hostname=localhost
port=27017
nodes=192.168.1.100:27017, 192.168.1.101:27017, 192.168.1.102:27017
database=example
collection=example
I get back the following error:
org.qi4j.api.value.NoSuchValueException: Could not find any visible ValueComposite of type [com.mongodb.ServerAddress] in module [config]
But when I remove the nodes property from the above file, then it all works fine and the connection with mongo is successful.
How can I use multiple nodes and replicaSet?
This was an unfortunate release of the MongoDB extension, and there is no good answer to initialize this configuration from properties files.
Polygene 3.0 was released in July 2017 and this particular issue was solved. See https://issues.apache.org/jira/browse/POLYGENE-172

Differentiate between production, staging and test environments in Websphere Commerce

I am new to a WebSphere Commerce Enterprise v6.0 environment that has already been set up. I was wondering what would be the most definitive way for me to determine which servers are used as Production, which are used as Staging and which are used for Testing?
To my knowledge, WCS has so far not included a DB entry or a script that can return the nature of a WCS server. If there is IBM will need to clearly document it.
The best way to find out in [out-of-the-box] WCS installations what is the nature of a WCS server is probably a query like this:
SELECT CASE
WHEN count(1)>0 THEN 'STAGING'
WHEN count(1)=0 THEN 'PRODUCTION'
END AS WCS_TYPE
FROM STAGLOG WHERE STGPROCESSED = 1;
(Note: A simpler check could just rely on the existence of the STAGLOG table, but I've seen many WCS servers that have this table without being a Staging server.)
The other option is to add a proprietary/custom system property or WCS server.
Non-staging will never have staging triggers.
select * from syscat.triggers where trigschema = CURRENT_SCHEMA and trigname like 'STAG%';
It depends on how you set it up [http://www.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.admin.doc/tasks/tsscreatestagingserver.htm]
To find from DB if the environment is LIVE or STAGING is to query the STAGLOG table.
If we find entries in STAGLOG table, then that is a STAGING environment. This entries are created by TRIGGERS for Staging Database tables.
In LIVE we will not be having entries in STAGLOG table.

Glassfish datasource implementation different then vendor (postgresql)

I am trying to create a jdbc connection to a postgresql database. I would like to use a datasource. In the documentation of postgresql is stated that one should not use their own implementations of the datasource, but use the implementations of org.apache.commons.dbcp instead. The SharedPoolDatasource looks perfect to me.
The jdbc driver must be postgresql. Glassfish v3.1 offers the opportunity to create a jdbc connection pool. I would like to use that one, but do not know how to make the connection between the commons datasource implementation and the jdbc driver. When I fill in the document on the glassfish server that particular field blanks out forcing me to use the postgresql datasource implementation.
Is this impossible to achieve or do I have to enter data manually in config files? So far I did not have any luck nor feedback. Exceptions should appear in the server.log, but the server.log currently does not show anything (it did show exceptions deploying jsf and ejb applications).
Should be possible....
1. Create a new JDBC Connection Pool:
2. Choose your desired Datasource Implementation Class:
You'll have to setup the details for databasename, user and password in the additional properties tab.
3. Create a new JDBC Resource:

WSO2 Data Services Server - Adding a new Database support

How do I add new Database support (MongoDB) in 2.6.3 version of WSO2 Data Service Server.
You can use DSS (2.6.3) with any database type if the database connectivity is exposed via JDBC. In other words, if your preferred database type exposes a JDBC driver/adapter for the users to connect to it via JDBC then you can use DSS to expose your data stored in your data store as a web service. Similarly, if MongoDB too has a JDBC adapter you wouldn't have any (or too many :) ) issues integrating that with DSS. However, there are some exceptions when it comes to exposing flat files such as google spreadsheeets, excel sheets, csv files as DSS uses the relevant client APIs such as Google gdate client API, Apache POI, etc to connect to those datasources and extract data. However, if we consider the general case is you need to have an adapter or a similar mechanism to connect to your datasource via JDBC.
But in the upcoming version of DSS (v3.0.0), it is planned to introduce custom datasource support so you can easily write an adapter to any datasource and use it with DSS.
Regards,
Prabath
I am not sure about this, but I suppose that if is not supported by default you can always download the jar library for MongoDB and put it in CARBON_HOME\repository\components\lib and restart. For example for mysql I have the mysql-connector-java-5.1.7-bin.jar in that folder.
Hope this help