I need to create a connection between ##MongoDB## and ##SQL Server## where I want to replicate a subset of my Database from SQL Server into MongoDB. Can anyone suggest for feasibility of the same and how ?
Right now I am using symmetricDS for the replication but unable to...
Please suggest if symmetricDS is able to serve for this purpose.
Here is how you target MongoDB:
http://www.symmetricds.org/doc/3.8/html/user-guide.html#_mongodb
If you need more flexibility than straight table to table mapping, then you would write your own data loader using the MongoDatabaseWriter as a pattern.
https://github.com/JumpMind/symmetric-ds/tree/0c5cc1c24b42a64405f4b79c3cb6b594a35467f2/symmetric-client/src/main/java/org/jumpmind/symmetric/io
Got an easy way around for the Data Exchange from SQL to MongoDB using:
SQLtoMongo C# Tool
KNIME Analytics Platform (way easy to implement - Opensource)
But still looking for something with triggers to easily replicate the things.
Related
Does PostgreSQL provide change tracking feature like that on SQL Server.
this is what I basically want. I want to move my data after few minutes intervals to other database. for this I just want to fetch changed data only in PGSQL through change tracking like that of SQL Server change tracking. What is the best way to achieve this?
It's not so easy with PostgreSQL. You can use WAL’s aka Write Ahead Logs or triggers. May be the best approach will be using a external library like https://debezium.io
I'm trying to achieve the same goal. This is what I found surfing the Internet. There are few possible approaches:
Streaming replication (ships a binary change log to a standby server)
Slony (uses triggers to accumulate DML changes into tables that are periodically shipped to standby servers)
Logical changeset logging
Audit trigger 91plus
I want to practice some SQL locally on specific tables that I have.
What I need is simply to take a table, upload it to a software I can run SQL on and work with it. nothing more. no servers, no other users.
I tried a few different products but just can't find one that allows this option without creating a server and setting up connections.
Please help :)
Thanks!
I think something like SQLite would work well for your purpose. SQLite is serverless
You can then use a shell or DOS prompt to create a db for it, create your table(s) for the db, and then upload your data to the table(s).
https://www.sqlite.org/quickstart.html
sql fiddle, maybe this is what are you looking for.
In my use case, ElasticSearch is already configured and has data that can be queried via REST API. I'm wondering if there is a way to write SQL statements that can query this data that ElasticSearch is already configured on.
Example, configure an adapter to ElasticSearch in MS SQLServer and use linkedserver to connect and run normal SQL statements.
I have read about the "river", but it seems to do the opposite of what I'm looking for. Any pointers will really help.
SQL Server is a relational database. It operates with tables in common. Posting requests to some URI is very unusual work for SQL Server. And there is no standard mechanism to do this.
What can you do:
Write a CLR-function to send post-requests
Map result json to some table (it can be difficult, because Elastic Search is document-oriented and SQL Server is not)
So, as for me, this way is very complicated. I advice to use some hand-written service to operate with DB and Elastic Search, and don't try to put all logic to SQL Server.
Something like Elasticsearch-SQL plugin might be of interest to you.
This won't allow you to use it as a linked server in MSSQL, but it will allow whatever application you have, to send SQL queries to the sql API on your ElasticSearch server and get results.
Example:
http://localhost:9200/_sql?sql=select * from indexName limit 10
i need some help.
I am trying to fetch data which is in table format in SQL Database and my Database is in server.So can anybody tell me a procedure how to do this in efficient way.
Thank you
Generally the most common approach is encapsulate the database by an REST API (see http://en.wikipedia.org/wiki/Representational_state_transfer).
However, you could look for an SQL Connection SDK provided by the manufacturer of your SQL Server. There is also an ODBC SDK for iOS you can take a look at.
I'm trying to log hibernate activity (only dml operations) to an sql script file.
My goal is to have a way to reconstruct the database from a given starting point to the current state by executing the generated script.
I can get the sql queries from log4j logs but they have more information than the raw sql queries and i would need to parse them and extract only the helpful statements.
So i'm looking for a programatic way, maybe by listening the persist/merge/delete operations and accessing the hibernate-generated sql statements.
I don't like to reinvent the wheel so, if anybody know a way for doing this i would appreciate it very much.
Thanks in advance
Generally the best way to do this is to just turn on logging on your SQL server. All the major RDBMSes support logging all the SQL statements that they run. This has the added advantage of catching things that happened outside of Hibernate.
You could also try to use NHProf which will intercept/record hibernate traffic to the database and dump it into an XML file. You might have to parse the file by hand, but all the information will be there.
You could also hook at the JDBC level directly and record the JDBC statements that are performed.
P6Spy is a great tool to inspect what's going on. It can log the queries, though I don't know if you can replay them as is.
I'm sure there are other such tool (or at worse you could try subclass the DataSource, Connection and PreparedStatement implementation of your choice to do that yourself).