I was wondering if an API exist that would allow me to dump a synergy database through java. I can create an excel report through IBM Rational Change but it would be nice if there was a way to just send a CCMDB query to the server through java and generate a CSV or XML file and have it dumped locally. Any body know of a possible way to do that?
I would doubt that something exists publicly. You can always call a command line ccm query from java and parse the output. I am working on a Python script that will do something similar, but it will be highly specific to my project DB setup (which is a mess).
Related
I am trying to process the SQL server log file (XEL) in Java and convert into other format like JSON. I am not able to find any documentation on How to read XEL files and there are no library that can be used to read the XEL file.
Any pointers will be helpful. Thanks in advance
Indeed, I tried to search for a library to parse XEL format file in Java, but failed. I think a workaround solution to satisfy your needs may should be considered by you.
Here is some workaround solutions in my mind.
There are some tools to help parsing XEL format file, such as Log Parser 2.2 and Read-DbaXEFile function of PowerShell Module sqlcollaborative/dbatools. For Log Parser 2.2 usage, please refer to the blogs How to parse SQL Server Error Log with Log Parser 2.2 and Microsoft’s Log Parser Utility: Swell ETL. For function Read-DbaXEFile, please see its source code https://github.com/sqlcollaborative/dbatools/blob/master/functions/Read-DbaXEFile.ps1.
There is a nuget package named XELite in C#, which be cross platform library to read XEvents from XEL files or live SQL streams.
Considering for your scenario, I think you can try to the two workaround solution to parse XEL format files stored in Azure Storage first within Azure Functions in C# or PowerShell with Blob Trigger, or within Azure Data Factory with a Custom activity, to extract these data what you want for further data processing in Spark.
I have an embedded system using a python interface. Currently the system is using a (system-local) XML-file to persist data in case the system gets turned off. But normally the system is running the entire time. When the system starts, the XML-file is read in and information is stored in python-objects. The information then is used for processing. My aim is to edit this information remotely (over TCP/IP) even during process. I would like to use JAVA to get this done, and i have been thinking about something to share the objects. The problem is, that I'm missing some keywords to find the right technologies to get this done. What i found is SOAP, but i think it is not the right thing for this case, is that true? I'm grateful for any tips.
As I understand, you are using XML file to store start up configuration
And my assumptions on your interface between Java & Python apps
You want your Java application to retrieve objects over Python interface
And process them locally and send it back to Python interface to reload config ?
So, depending on your circumstances, you can workout something with the following
Jython
Pickle (if you have no restriction on startup config file format or can afford to do conversion)
https://pypi.python.org/pypi/Pyro4
Also you can get some ideas from here:
Sharing a complex object between Python processes?
You should ask your python application to open a XML-RPC socket which clients can connect on. This could let an outside application to execute an endpoint, which would manipulate your python object values in someway. There are several good choices for Java XML-RPC libraries, including the amazing org.apache.xmlrpc library.
I have an Excel with some macros. The data is currently sourced manually. In order to automate the report, I need to source the data directly from Oracle database. Unfortunately, this cannot be done, as it is a production database and passwords cannot be shared with anyone.
The next best possible approach is to connect via the Java layer. How can I connect VBA with a Java service?
Any conceptual starting points will also be appreciated.
There is a very nice API from Apache called POI for processing Microsoft documents. http://poi.apache.org/
The other approach is to use OLEDB driver for Excel which will allow you to read data from Excel exactly as you will do from any database using JDBC.
Interop between different technologies likes this is commonly achieved with a combination http and xml.
It's a long time since I saw this done so the technologies might be out of date but you can create a ADO record set from XML.
Excel can make a http call to a Java server that returns the xml. This xml can then be used to create a record set for Excel to consume just as if that record set were obtained directly from the database.
I have a standalone Java application capable of replaying a time series of data records. Communication with the server is performed using a bespoke binary wire protocol over TCP/IP.
We have a requirement to be able to easily import data records from this application into MS Excel / Access and I am interested in the recommended way to do this.
One idea we're exploring is to write a web "wrapper" service (also in Java) that will communicate with the underlying server and then translate the binary data into a more friendly text format for consumption by Excel / Access. However, the drawback here is that we lose any type information associated with each field in a given record.
I've briefly looked into writing custom ODBC / OleDB drivers but this seems complex and is probably overkill for what we're trying to achieve.
Can anyone recommend any other approaches?
How about xlloop? http://xlloop.sourceforge.net/
Uses an Excel plugin to connect to a function server, where you can create your own functions.
You may connect with an Access Database via the JDBC/ODBC Bridge driver.
From your previous comments I assume that you need to serve dynamic/changing data. If that is the case then take maybe the IRtdServer interface and this article referring to Excel. Its a COM Interface so you probably will need something like Com4j
I am making a desktop application in java and using MSAccess in data base.
I want that if i run the setup of the application the database should be created on client machine because there can be different client using the application and how can i create the setup?
is there any tools available for this free of cost?
please explain me in detail..
thanks
Java 6 (enhanced for desktop application work) comes with a built-in database called JavaDb (formerly IBM's Derby). That will do what you want.
Here's a set of guides and tutorials on how to use it.
I would suggest that when your application first starts, it checks for the presence of the created database, and if it doesn't exist, it builds the database (via the appropriate SQL). I've used this approach before and it works quite well.
I prefer nullsoft. Take a look at Open Source Installers Generators in Java
#pratap: database should be created on client machine..
Add an empty access database to your setup.
Have a look at SQLite, which is used by Mozilla (Firefox stores all bookmarks and history in a database) and several other major applications.
When you say
access in database
do you mean Microsoft Access or access the data in a database.
I would advise against MS Access if that is the case. If not, you could either use the JavaDB or HSQLDB and the use SQL scripts to create the database. As a summary
Package the application in one of the installers (InnoSetup or NSIS are good ones)
When installing, extract all the files in proper folders
Execute the SQL scripts before first running the application to ensure the database is setup, you can do other housekeeping tasks along with this step (refer to installer documentation for after-install steps)
Your application is good to go
In the last distribution of NetBeans I used, there was a wizard to create such application. The application used the Java Persistence API to store the Data.
My option is HSQLDB since it's fast, reliable and easy to use.
In the documentation it's explained how to use the standalone database mode, this is primarily used for unit testing but it fits your case too. The good thing with this is that you just connect to the file based database without any special set up and if the files doesn't exist, they're created.
I would second the posters who recommend JavaDB.
It is absurdly easy to adminster from inside your application. Whats more because everything is native Java you dont get the char->unicode little-endian->big-endien and all the other conversion malarky you normally get when reading SQL into java.
The one tip is that with JavaDB is prepare your SQL statements. Prepared statements get cached and the resulting access program (similar to an access plan but actually a jvm program) is reused, the programs for "executed' statements are not cached.
If you are really set on MSAccess then I would suggest you package an "default.mdb" file with all your required tables defined and your classifcation tables populated. If the user's table does not exist then simply copy over the default .mdb file and open that.
I recommend the H2 database because it is simple, fast, pure Java, and small. See this page for how H2 compares to other Java databases, including those mentioned here in other answers. It has many features Derby/JavaDB and HSQLDB do not.