Can I setup two Fuseki instances using the same database directory? - fuseki

I need to have a public read only instance to query data using the port 3030 and a private read and write instance to add and update data using the port 3031. Both instances are only accessible throw a web server using distinct domains and port 80. Also, the private instance provides access using an HTTP user/password.
My question is about concurrency: Has Fuseki support to concurrently access to a directory database using two server instances?

I found the answer in the Fuseki documentation:
Multiple applications, running in multiple JVMs, using the same file
databases is not supported. There must be a single JVM controlling the
database directory and files.
Use Fuseki to provide a database server for multiple applications.
Fuseki supports SPARQL Query, SPARQL Update and the SPARQL Graph Store
protocol.
So, the answer is that multiple instances using the same database are not supported.

Related

Linked Servers in SQL Database Managed Instance

In a SQL Server Managed Instance I have 2 databases (for security reasons both databases have different logins). I need the possibility to allow one database to look into the other one. In a local SQL Server I was able to create a Linked Server to realize this. But this seems not to work using the Managed Instance.
Can someone give some hints how to achieve this?
Managed Instance supports linked servers (unless if they use MSDTC for some distributed writes). Make sure that you add logins for remote server:
EXEC master.dbo.sp_addlinkedsrvlogin #rmtsrvname=N'PEER',#useself=N'False',#locallogin=NULL,
#rmtuser=N'$(linkedServerUsername)', #rmtpassword='$(linkedServerPassword)';
If it still doesn't work put the exact error message. This might be Network security Group blocking the port, VNets that are not peered, etc.

AWS DynamoDB + multiple Titan servers: Is this setup possible?

I want to create a web application which is using a graph database hosted as part of the Amazon Web Services (AWS). As far as I understand, to use a Graph database with AWS DynamoDB as storage backend, you need to run a Titan server. Such a server can be set up on an EC2 instance.
Now, to remain scalable, I will eventually want to deploy multiple such instances behind (a couple of) load balancers. The question that arises is:
Can multiple Titan DB instances work with the same, shared storage backend (such as DynamoDB)?
Yes. Titan Server is a Gremlin Server, which is based on Netty. You configure it with a graph properties file which points to your storage backend (DynamoDB) and indexing backend (optional). As long as you use the same graph properties file for each Titan Server, it should work as your described architecture.

Transaction, multiple databases, different servers: MSDTC or any other option

I am working on a client-server application and using LINQ to SQL to perform databases operations, 1 databases is on server and multiple clients will connect to it and there will be sync of databases records as well, Trying to manage a transaction with multiple datacontext and multiple databases but getting error on MSDTC service that it is not configured, before I go to configure I want to ask Is the MSDTC the only option? It will not be available in shared hosting then what type of hosting i should be looking for?
Any other thing I need to check before I go to MSDTC configuration? Is this service required only on server or must be configured on each client machine?

Dynamically switching receive locations between database servers

Using BizTalk I need to read data from one of two databases that are hosted in Unix using ODBC.
The data is replicated between the databases and if one of the databases does not respond I need to switch to the other. There is no load balancer or anything so I need to be able to do the switch on the BizTalk server.
I was thinking of creating two receive locations, one for each database server, only one of them enabled and then have a Windows service that periodically tries to make a connection to one of the database servers and if there is an exception, call a powershell script that disables the receive location for the server that does not respond and enable the other receivelocation.
Is there a better solution for this?
I would solve this as follows:
In Biztalk create a single http receive location.
Create a windows service
In the windows service poll the first database, if it does not respond poll from the second database
Have the Biztalk service post the information to the http receive location
You need to consider what happens if you read the same data twice, once from the main database and once from the backup.

Multiple connections on a single .mdf database (ASP.net) SQL Server

I'm trying to place a .mdf database on a Computer A and access it simultaneously on Computer B but I'm having an error that says I cannot access the mdf file because it's being used by another process.
The setup is, the database is hosted on a Public folder in Computer A. I have Visual Studio running on both computers, and Computer B accesses the database on Computer A.
Computer A Connection path string:
C:\Users\Public\database.mdf
Computer B Connection path string:
\192.168.254.8\Public\database.mdf
Is there some sort of setting that I do not know of to enable multiple access on a db? Or this is not possible?
EDIT:
Let me rephrase my question, sorry.
There are two computers connected via a network, and I want to access one Visual Studio solution/project website. I wanted to do this as a demonstration, is it possible?
You should have an instance of SQL Server (even express) running on the host machine.
All requests from the clients should use the standard mechanisms for connecting to that server instance. In other words, they won't run their own copy of SQL Server, instead they will connect to the instance running on the host machine.
Simultaneous or direct access to Database files under any DBMS control either a very bad practice or simply impossible.
Use proper DBMS tools to access the data.
And yes - its possible to access Web site project for demo.
Install SQL Server on the host machine (the one that you want to keep your database on).
Then in Visual Studio, use the "Server Explorer" to locate the remote instance of the database. From there, you can utilize the remote instance of SQL Server in your connection string, thus allowing you to connect multiple computers to a single database.
Using two instances of SQL Server to connect to the single .mdf file is a very bad practice.
Instead of specifying the MDF file in your connection string (which, I believe, uses a form of User Instancing), you should use SQL Server Management Studio (SSMS) to attach the MDF. Then connect to SQL Server, rather than to the MDF.
You may need to move the MDF and LDF files to a place where the SQL Server identity can access them, rather than keeping them in your VS project.
Most projects keep scripts to create the DB in their VS project, but not the binary MDF itself.
When you deploy, the process is similar: use SSMS to attach the MDF on your server.
Yes, If 2 or More Computers are connected by networks like LAN You can access the Database Database1.mdf (say) from another SQL Server by entering its user name / Password /by Visual studio connection.
Disadvantages:
If more than 7~8 systems are accessing same Database same time System response slows down and Hangs up or may result error like connection pool exceeded or Device not responding..
In Big Companies they use Huge Multi-core & Multi-Processer based sever which will respond faster.
Overcome: while writing Applications Use Connection Open and Close Particularly while executing the SQL queries in other time it should be closed.
Best Programer uses Transaction instead of using normal methods. Transaction Makes Every User Access Database With valid and successful Execution of queries. These Queries (Transaction Queries) mainly executes on client machine and later updates the same over Main server when it got Time slot for it(synchronize).

Resources