I have two separate Spring Boot Services (A and B) which are using the same database. 'Service A' updating one of the tables in the database. Then it will trigger the stored procedure.
Is there any way to invoke directly Service B's method using that stored procedure?
Related
How can I call a stored procedure using nodeJS and typeORM, database mysql
I have no idea how to do this
I create a simple Spring Boot application. Running the app shows a JSON employee table in the browser, but when I check MySQL database with the command-line or MySQL Work-bench, a table employee table is generated, but no content.
Running the app from IntelliJ doesn't give me any error:
Take a look at my code on github:
demo
You have only static data you are not using Jpa method for save that's why it's not saving in database table.
I gonna create
Spring Boot MVC / JPA / Data CRUD project - simple REST service. Put in container
Store some data in mysql DB. Put in a separate container
use docker compose to up 1 & 2 together
Use a circuit breaker pattern (Hystrix?): #Retry & fallback methods while store to DB
Gonna use Spring Initializr
For that purpose I need to use:
Spring Web
Spring Data JPA
Options in Spring Initializr.
The question is: do a I need to use MySQL Driver: MySQL JDBC and R2DBC driver. option? Or mysql in separate container will be ok?
As this was explained in a comment, this entry has "Driver" in its name to indicate that this component is the "client part" to make sure your app can communicate with a MySQL server (be it in a separate container, a local instance on your machine or wherever).
start.spring.io is not providing services in any form. When it embeds something in the app itself, the entry has "Embedded" in its name to indicate that.
I have a database called IND_DB (running on SQL Server 2008 R2) which has a table called MyTable. When there is any update in MyTable, a trigger is fired. The trigger updates another table called RemoteTable located on another server (SQL Server 2008 R2) & database. The trigger calls a stored procedure located on the remote server and updates a table on the remote server.
In order to accomplish this I have created a linked server between two servers. I have set the following properties of the link server:
RPC: TRUE
RPC OUT: TRUE
I have confirmed the MSDTC is running in both server. The firewall is not blocking the transaction.
Now when the trigger is fired, following error is shown:
No Row Updated.
The data in row 1 was not committed.
Error Source: .NET SQLClient Data Provider.
Error Message: Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The problem is that I can execute remote stored procedure in a query analyzer but the same remote stored procedure won't run in trigger.
I have access to a SQL view on say a server called vuk030 and i wish to write and run a stored procedure on a server called vuk386. My question is how to write the sql to access the data in the view on vuk030 as it has a username and password.
the vuk030 server is sql server 2005 and the vuk386 is 2008
The best way is to set up a linked server from vuk030 to vuk386 and enabling RPC over the linked server to make it possible to run stored procedures.
Setup linked server:
http://msdn.microsoft.com/en-us/library/aa560998(v=bts.10).aspx
RPC:
http://msdn.microsoft.com/en-us/library/ms186839(v=sql.105).aspx