Single class to illustrate loading data… import java.sql.*; import java.util.*; public class loadSnowflake { public static void main(String[] args) throws Exception { Class.forName(“oracle.jdbc.driver.OracleDriver”); Class.forName(“com.snowflake.client.jdbc.SnowflakeDriver”); Properties properties = new Properties(); properties.put(“user”, “showard”); properties.put(“password”, “*****”); properties.put(“account”, “rcaccount#”); properties.put(“schema”, “PUBLIC”); Connection connection =…
Author: Steve
Who installed which packages when
Just a quick how-to this morning… # for id in $(yum history list all | grep showard | awk ‘{print $1}’ | head -1); do echo “****************************************************”; yum history info ${id}; done **************************************************** Loaded plugins: product-id, rhnplugin, search-disabled-repos, security, subscription-manager…
Using Cisco Packet Tracer to setup a simple routed network
This is the first in a series of posts that will show how you can learn about networking by using the free Cisco Packet Tracer software program. C:\>tracert 172.16.1.51 Tracing route to 172.16.1.51 over a maximum of 30 hops: 1…
Android – Log network SSID’s and DBM
Technically, this could be used to trilaterate over time and heatmap where associates spend their time, as well as what activity occurs where. To do this, we would need the coordinates of all AP’s in the given store. The endpoint…
Browsers and Cache-Control headers
Chrome and Microsoft Edge both have odd rules for this. If you reload a tab, the browser completely ignores the directive and requests the content, anyway. If you copy the URL to a new tab and request it, it honors…
ELK simple POC
I tried using the getting started guide, and knew I was in trouble when they had me downloading shakespeare.json. Why does every IT person think that other IT people are “cultured” and would be interested in Shakespeare as a datasource…
Cloudflare – Adding DNS TXT record
A DNS TXT record is used to associate arbitrary text with a given domain. Often, it is used to validate that a given domain is who they claim to be. For example, when signing up for google services, and you…
Improving batch inserts into MySQL
We had a custom class to copy data from Oracle to MySQL at AWS. It was sending each statement individually, even though we batched them. import java.sql.*; public class test { public static void main(String args[]) throws Exception { Class.forName(“com.mysql.jdbc.Driver”);…
Running admin commands on secondary mongodb server
You have to let your session know that reading this information from a non-primary server is OK (literally)… -bash-4.1$ mongo rs1:SECONDARY> show dbs 2018-02-01T10:37:58.457-0500 E QUERY [thread1] Error: listDatabases failed:{ “operationTime” : Timestamp(1517499476, 1), “ok” : 0, “errmsg” : “not…
Spinlocks, does Oracle use them?
I often write simple C programs to better understand how a given enterprise software program works. Latches in the Oracle database are “in memory locks that protect critical sections of code”. Oracle kernel developers decide that a given section of…