Article Overview:
This article will cover how to configure your Virtuoso journey (running via the Bridge client) with your database server using the appsettings.json
file.
Problem Statement:
You need to correctly set up appsettings.json
to connect Virtuoso to different supported databases (SQL Server, PostgreSQL, MySQL, Azure CosmosDB, Oracle).
Solution:
Steps to Configure:
-
Locate
appsettings.json
:-
Identify the
appsettings.json
file within your Virtuoso installation.
-
-
Modify Configuration Based on Database:
Microsoft SQL Server:
{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } }, "Urls": "http://10.18.0.55001", "AllowedHosts": "*", "SQLAPIConfig": { "Connector": "MSSQL", "ConnectionString": "Server=localhost;Initial Catalog=dbName;Persist SecurityInfo=False;UserID=userId;Password=ComplexPassword@123;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;Connection Timeout=30;" } }
PostgreSQL:
{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } }, "Urls": "http://10.18.0.55001", "AllowedHosts": "*", "SQLAPIConfig": { "Connector": "POSTGRESQL", "ConnectionString": "Host=localhost; Database=dbName; Username=userId; Password=pwd;TrustServerCertificate=True;" } }
MySQL:
{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } }, "Urls": "http://10.18.0.55001", "AllowedHosts": "*", "SQLAPIConfig": { "Connector": "MYSQL", "ConnectionString": "server=localhost;uid=userId;pwd=pwd;database=dbName" } }
Azure CosmosDB:
{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } }, "Urls": "http://10.18.0.55001", "AllowedHosts": "*", "SQLAPIConfig": { "Connector": "COSMOSDB", "ConnectionString": "AccountEndpoint=https://sqlapi.documents.azure.com:443/;AccountKey=YOUR_ACCOUNT_KEY;Database=dbName" } }
Oracle:
{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } }, "Urls": "http://10.18.0.55001", "AllowedHosts": "*", "SQLAPIConfig": { "Connector": "ORACLE", "ConnectionString": "Data Source=localhost;User Id=userId;Password=pwd;" } }
-
Parameters to Update:
-
Replace
localhost
,dbName
,userId
,pwd
, and URL (http://10.18.0.55001
) with values specific to your database server environment.
-
-
Save Configuration:
-
Save the changes in
appsettings.json
.
-
-
Restart Bridge Client:
-
Restart the Virtuoso Bridge client to apply changes.
-
Example:
-
Scenario: You want to configure Virtuoso with PostgreSQL.
-
Solution:
-
Update the
appsettings.json
PostgreSQL section with actual host, database, username, and password, then save and restart the Virtuoso Bridge client.
-
Comments
0 comments
Please sign in to leave a comment.