Category: Database
Cross-platform SQL Client
In case you’re looking for a SQL client that is cross-platform, lightweight, and free SQL client, check out: I use it on a Mac. It’s easy to use and feels “new.”
Mongo DB: Iterate through a MongoCollection
This is specifically for Mongo 3.x, where MongoCollection is preferred over DBCollection. Adding for personal archiving. MongoCollection<Document> mongoCollection = getMongoCollection(databaseName, collectionName); FindIterable<Document> documents = mongoCollection.find(eq(COLUMN, "lastName")) .sort(ascending("lastname")); for (Document document : documents) { … }
Oracle: How to select less or greater than with dates
Coming from a Microsoft/SQL Server world but now into Open Source/Oracle, I didn’t know what the syntax was, so here’s how: select * from table where column < to_date(‘6/21/2014 21:50:0′,’mm/dd/yyyy HH24:MI:SS’); select * from table where column > to_date(‘6/21/2014 21:50:0′,’mm/dd/yyyy HH24:MI:SS’); Hope this helps someone out there. Cheers!
soapUI Error: “ERROR:com.eviware.soapui.support.SoapUIException: Failed to init connection for drvr [oracle.jdbc.driver.OracleDriver]
I was encountering the following error in soapUI when one of the test steps was to check the database. com.eviware.soapui.support.SoapUIException: Failed to init connection for drvr [com.microsoft.sqlserver.jdbc.SQLServerDriver], connectionString [jdbc:sqlserver://server:port;databaseName=DB name;user=username;password=#####] The issue was because my soapUI installation didn’t have the appropriate ODBC jar file. 1. Get it from Oracle 2. Place it in your $SOAPUI/bin/ext…
MySQL: “Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (38)”
To fix it, try the following: 1. In the terminal, run ‘touch /tmp/mysql.sock’. 2. Restart mysql.
Reset MySQL Password on OS X Lion
In case you forgot or didn’t set the password for “root,” do the following: 1. Create a file called mysql-init with the following entries (I placed mine in my home directory): UPDATE mysql.user SET Password=PASSWORD(‘MyNewPass’) WHERE User=’root’; FLUSH PRIVILEGES; 2. Make sure mysqld is not running (i.e. terminal > ps -ef | grep mysql) 3.…