Im working at a new development plattform with PDI installed on it.
The plattform remains stable, but Im struggling with a problem since the moment we started to work on it and is related with the PDI behavour on some Oracle SQL queries. The problem is documented here: https://forums.pentaho.com/threads/53201-KETTLE-and-Oracle-s-NLS_DATE_FORMAT/
The subject of my question is:
I need to change the odbc jar file on /lib folder of PDI folders (change odbc10.jar to odbc6.jar) and I dont know how to do it. It can't be as simple as delete the wrong file and put the new one. I suppose that somewhere on PDI configuration there must be a setting pointing to the wrong odbc10.jar and I must set it with the name of the new driver that PDI must use (odbc6.jar). I'm not sure if this setting is neccesary or not. As I'm not admin on this server, I can´t on my own, change the file and test it, I need to open a IT Ticket and ask for the right department to do it and I dont wan't anyone loose their time with wrong instructions.
I hope you could explain me how to change this driver please.
Please..could any of you guys explain how to do it?
Yes, it's as simple as that. If you don't feel confident, instead of deleting the odbc10.jar change the name to odbc10.jar_old or something like that, so PDI doesn't pick this other version of the odbc jar file, so you have a backup of the file quickly available.
Related
I have installed SQuirreL client to open my file database. I have file named "database.h2.db" and I want to read its content. Well, that's first time I work with database like that. All I need to do is simple change some data in it. I'm not working with Java and not building any project, just edit something in database, probably 1-2 records. So here I am.
First you will need to add the H2 driver to your SQuirrel installation directory. You do this by downloading the h2 jar file here: http://www.h2database.com/html/download.html and copying it to the lib folder of your SQuirrel installation. (At the time of writing the links to the JAR file are broken. You can also download the enire H2 zip file, it includes the jar file somewhere. Named something like h2-1.4.200.jar.
Restart SQuirrel and go to Drivers. There should now be checkmarks next to the H2 options instead of red x'es.
Create an alias, select one of the H2 Drivers (doesn't actually matter wich one). Fill out the URL like this: jdbc:h2:C:\path_to_your\database.h2.db. Set User Name to sa. Connect.
Sidenote: I know OP asked this in 2017. Yet answering for other people looking to do the same.
I have created database project in visual studio 2013 from existing database. Then I have done lot of changes in database project like modify stored procedures, post deployment script, table structure, etc . Now database project is ready to deploy. But I am worry if any script fails then How I can retain the original state though it build properly.
Please suggest that if any query fails then I want ROLLBACK the all changes that I have made in database project.
Firstly you need to trust your tools and either believe they will work or find other tools.
While you are building the trust I would add a create backup to the pre-deployment script or run a backup before you deploy then if anything goes wrong you can restore and figure out what went wrong.
As David said to roll-back, you would get the previously deployed dacpac and generate a new deployment script from that but fixing forward is almost always the correct thing to do rather than rolling back to a previous version.
ed
Have you been checking your changes into version control? If so, all you need to do is to revert back to the last known good version.
Or... simply work out why it's failing now and fix the root cause?
I used Db projects some time ago and as far as I remember the deploy script was wrapped in a transaction. It is possible to generate sql script without executing it. That setting was somewhere in DB project settings. You can take a look inside that script and make sure that it'll rollback on error.
Doing a backup would still be a recommended practice especially when you deploy to production.
when working on important scripts I developed a habit of always starting a transaction and commenting out the commit.
If you accidentally run it, it won't take effect. The commented out commit would only come out when the thing was done.
While this answer indicates that you CAN revert in source control (Assuming SSDT at this point) it would be nice to get a pointer to the exact process to do this. On a file by file basis the history works the same but how to revert the entire database at once isn't immediately obvious.
I am trying to make a sqlite dump with SchemaSpy.
I got SchemaSpy up and running and was able to properly dump a MySQL database.
Now I have an .sqlite file (from an iOS application) and a sqlite driver from Christian Werner (http://www.ch-werner.de/javasqlite/overview-summary.html). An example over here explains how to work with that but to be honest - I don't understand what to do.
Is there someone who knows how I can use SchemaSpy on Windows? It is not necessary for me to use the GUI tool, though.
I also ran into this problem but finally made it work. You need the DLL for the SQLite library.
You can download it here, and then you can put it on system32 folder of your windows installation (C:\Windows\System32 for example)
Lastly, don't forget to specify the exact JDBC driver path:
java -jar… -dp "D:\SchemaSpy\driver\j2sdk1.4.2_03\jre\lib\ext\sqlite.jar" …
I'm the author of one of the articles you mentioned.
You need to compile the schemaspy JDBC driver. It was written for UNIX but someone sent the author notes on building it in a Windows environment. But there is a set of files for windows prebuilt with the sqlite.jar and .dll you need. Once you've got that on the classpath its straightforward.
If this is all too much for you, you can always fire up the sqlite3 CLI and use the .schema command to dump the tables, and set them up in a database you do know how to connect to. Or set up and Ubuntu VM ;)
I realize this is an old question, but for the record it's possible to make SchemaSpy use the Xerial SQLite JDBC driver, without a huge amount of difficulty, by rolling a new .properties file for it, following the instructions on http://schemaspy.sourceforge.net/dbtypes.html
All you really need to do is copy the existing sqlite.properties, renaming it to something like sqlite-xerial.properties and change the relevant lines; for example:
driver=org.sqlite.JDBC
description=SQLite-Xerial
driverPath=sqlite-jdbc-3.7.2.jar
The Xerial driver doesn't need the JNI DLL file and also has the benefit of picking up any configured FK relationships correctly - at least with the SQLite 3 database I've tested it against.
It does throw up some warnings when referencing table or column names that are also keywords, but that may be SchemaSpy's fault for not wrapping them in []. Or schema designers' faults for using keywords as table and column names :)
I do wonder why you need to get the sqlite driver. Just tell SchemaSpy your DB type is sqlite and you shall be okay. Something like
java -jar schemaSpy.jar -t sqlite -db <your file> -o <output>
It's usually best to grab the latest beta version of SchemaSpy. The invocation should be similar to running against MySQL except you specify your database type with -t sqlite and point the "database" to your .sqlite file.
The SQLite drivers use JNI for their implementation, so you'll need to make sure sqlite_jni.dll is in your PATH. To temporarily add it to your PATH in a Windows command prompt:
set PATH=%PATH%;directoryContainingTheJniDll
I love Oracle SQL Developer so I find myself using it a lot to complete my daily tasks. The thing is that my collection of custom snippets only keeps growing so I though it'd be interesting to learn how to backup them.
Before asking blindly I did a bit of work trying to figure out how. I've performed a search within the application's folder by "snippet" and found the following file:
oracle.sqldeveloper.snippet.jar
which quite probably contains my beloved pieces of code. I could just save that file hoping the best, but why not doing it the right way and perhaps being able to, say, only backup the ones and I've created, avoiding the ones that came out-of-the-box, et cétera?
Any suggestion would be really appreciated!
On my WinXP machine, I found my User Snippets at:
C:\Documents and Settings\eddie\Application Data\SQL Developer\UserSnippets.xml
PS: Replace eddie with your username.
Agreeing with Eddie Awad, just copy the xml file. And for windows7 the sqldeveloper User-Snippets file can be found here:
C:\Users[username]\AppData\Roaming\SQL Developer\UserSnippets.xml
If you use SQL Developer on Mac OS X, then the snippets can be found in ~/Library/Application Support/SQL Developer/UserSnippets.xml
Are you running on Windows? Check your "C:\Documents and Settings\\Application Data\SQL Developer" directory for a UserSnippets.xml file, it contains all user defined snippets.
Also, check the online help for "Location of User-Related Information" topic. It has location of files that hold other user defined info.
-Dave
Why not create a package on the Oracle server for daily maintenance that way it's stored with your DB and in your DB backups?
EDIT: I do this and find it even easier to use them later on when performing routine maintenance tasks. Being able to call a packaged procedure is really, REALLY handy sometimes.
Agreeing with Spyder -
C:\Users\[username]\AppData\Roaming\SQL Developer\UserSnippets.xml
is the place. But I only found this after creating my first new Snippet.
After that, I was able to edit the xml to add new snippets and new categories. Once a change is made to the xml, SQLDev has to be relaunched. (And since it's an xml, I'm going to see if I can save it to Git to share amongst my team when I get a minute...)
For SQL Developer 3.2.20.09 on OS X Mountain Lion (10.8.*), the snippet file is located in ~/.sqldeveloper/UserSnippets.xml.
On OS-X Yosemite (10.10.5) I found the current UserSnippets.xml for the current SQL Developer ( Version 4.1.0.19 ) also in
~/.sqldeveloper/UserSnippets.xml
I'm developing a simple database app in visual studio (c# for Windows) using an access backend.
That's all fine until I try to open the database file from within access, when all the reocords get deleted.
Could anyone explain why this is please?
Did you add the database to your solution? Select it and check the Copy Local (aka Copy to Output Directory) setting in the Properties window. Make sure it isn't set to Copy Always,
We need more information. You say that when you open the database from within access, "all the records get deleted". The way the question is phrased implies that some process is running as part of opening the database, e.g., an autoexecute macro. Do you really know that is what is happening? Or are you really just saying that "when I open the database file from access, the records are not there". If the latter, then something is happening along the lines of what cletus suggests.
This is an old question and I don't know if the original poster is still around, but something that didn't occur to me at the time I originally read the question was that perhaps the C# app is using a transaction to insert the data and is not committing it. If that were the case, the data would be visible in the C# app and would not be there when you opened the file in Access. On the other hand, the data wouldn't be there in a new session of the C# app, either, so this might not be the issue.