can logstash read data from a database stored in a server and not a sqlite db file?
If yes, how should I edit the "input" section of the conf file for logstash?
No, it can't currently because there are no inputs for SQL servers other than sqlite. If you want, you can write your own input plugin for any SQL server.
There is a tutorial here:
http://logstash.net/docs/1.4.2/extending/
Related
I am trying to load data in Oracle database from BCP files.
The Oracle database server is located on remote machine. In my control file I have added path to BCP file as - load data INFILE 'C:\path\to\bcpFile.txt'. This does not work if BCP files are not on same machine as DB server. One option I found is to create network mapping on my windows machine to the linux DB server. But this has manual overhead. I learned we can use LOAD DATA LOCAL INFILE to fetch data files, I would like see an example for this.
Install the full Oracle Client which includes SQL Loader on your Windows Computer
SQL Loader is included with full Oracle Client installs.
Once installed, make sure your infile section properly references your datafile using the correct syntax.
With the path you provided, this section would look like this:
INFILE 'C:\path\to\bcpFile.txt'
SQL lite created by using the following code
Database db = Database.openOrCreate("test.db");
Its creates the database, after that we created tables on this database. We need to know where is this test.db file stored?.
Note: we are using Net Beans IDE on windows 10 system for our development.
Thanks in advance
This is discussed in the SQL section. You need to use getDatabasePath before opening the database to replace the file with a premade file which I assume is the use case you are aiming at.
We can get the .db file from the path "C:\Users\Admin.cn1\database".
I have an requirement. I have a text file.
data will be dump into that file always.
Whenever there is an update in that text file . The same should update in SQL Server as well.
Is that possible??
SQL agent jobs with integration service packages is not recommended .. any other way.
You can write your own f.ex. .NET application / windows service with file watchdog and monitor file content changes.
EDIT:
In SSIS you can also try to use File Watcher Task:
Handling file access locks while file is being built
Out of curiosity, why using SSIS and SQL Server Agent is not recommended?
Can I read a XML file from remote server such as
http://dealer.somedomain.com/data/inventory.xml
I need read and get data from this remote XML file and update some local tables.
I use SQL Server 2005.
Thanks in advance.
Your task can be split into two sub-tasks.
Downloading the file over HTTP to your local PC (to a temporary folder).
Importing the XML file into SQL Server.
You can use SSIS for both. Once you look for "SSIS downloading over HTTP" or "SSIS downloading from website" you will find many tutorials for file download.
For the second step you will need data import, there are plenty tutorials as well, here is just an interesting pick.
You can find ready solutions including data download and import all-in-one, like here.
I am using Liferay with Apache Tomcat and hsql. I need to locate the database file that is used. According to hsql documentation there should be a file lportal.data in the directory data/hsql, but there isn't one.
The hibernate database consists of 4 files.
The .script file contains the data as SQL, the .log that last actions that took place, the .properties the configuration and the .lck is the db lockfile.
These are the database, hsql has nothing like one big .data file. All other constructs that are typical for a database are generated and only in memory.
Connection line jdbc:hsqldb:file:/D:/Coding/liferay-portal-6.1.0-ce-ga1/data/hsql/lportal for Squirrel SQL Client (Liferay on Apache Tomcat)