I noticed sometimes my iPad takes FOREVER to sync. Specifically, my ipad takes forever to backup before it starts syncing. I recently stopped syncing it to my macbook pro and began syncing it on a windows 7 system - iTunes has been behaving awesome for me on Windows, contrary to frequent opinion. At first, I was careful, and only ever used my iPad cable... but it's just a USB cable, so eventually I slipped and starting using my iPhone cable.
I'm not sure what's special about the iPad cable, aside from combined with the iPad charger it is a higher power charger, but it appears that backing up your iPad (even when it has practically nothing on it - as I recently cleaned mine out) can take ages if you use the wrong cable. Facepalm. It took some reading up on this to realize what I as doing wrong. It's a double facepalm for this even being an issue - I am not sure why an iPhone 3G or 4 cable would cause slow syncing...but it looks like it does. In my case it's slow backing up...like 30 mins to an hour when nothing has even changed. Problem solved though - use the iPad cable.
Thursday, November 18, 2010
Wednesday, November 17, 2010
Oracle: How to find the service name of a database instance (SID)
At work I ran into a surprising issue. It's hard to find a service name for an Oracle database when all you know is the SID if you don't know exactly where to look. Hard, even for large, corporate Oracle deployments with DBAs you can ask. I found it hard to believe, but we've had issues several times now where it has been difficult for customers to determine a service name for their oracle database instance. Now, of course our application lets you enter SID or Service Name and handles URL formats for you and everything - that is not the problem. The problem is when administrative work needs to be done. It usually isn't an oracle DBA handling administrative tasks for our software at a customer site, since the DBAs are a precious resource.
Now, first a quick refresher:
SID - System Identifier uniquely identifying a database instance. Each database instance has an SID - one and only one.
Service Name - An alias to one or more INSTANCES (useful for clustering, failover, without changing end-user configurations) - introduced in Oracle 8.
One SID could have a hundred service names pointing to it if you wanted to...but I'm pretty sure at a minimum it will have one. When you create an instance, Oracle makes you name them both. The 10g Configuration Assistant on Windows has a field named Global Database Name, which maps to Service Name. The SID is
frequently, but not always, the same as the initially specified Global Database Name.
After the creation of a database instance, Oracle tools refer strictly to the SID - after all, that is the name of the instance you'd be configuring. Since Service Name is just an alias, you wouldn't configure the character set or memory options of an alias.
Why do I care what the service name is if I have the SID?
Because knowing it lets me avoid relying on properly configured tnsnames.ora on each client machine. Sometimes, tnsnames.ora files appear to be controlled by a dark magic - the same tnsnames.ora file works fine on one machine, but fails inexplicably on another client machine. Sometimes TNS doesn't work right - and for a Java application that's going to be using JDBC, needing to configure tnsnames.ora is unnecessary work. For the command line tools like SQLPLUS and the import/export tools, you can use the EZCONNECT URL format and avoid TNS completely. There's a catch - EZCONNECT only accepts Service Names.
So, how do you determine the service name? Here's one way...
This assumes you have access to the oracle server. Provided you do, simply use the command:
This will print out various status information, as well as a compact listing of configured service names and which instances they point at. You could also use lsnrctl services for slightly more verbose services output - but depending on how many service names and instances there are, it may be harder to look at.
It's kind of anti-climatic, but that simple command ended the confusion. I thought Service Name was preferred (as it is more flexible than directly specifying the SID), but apparently it isn't always the case.
Now, first a quick refresher:
SID - System Identifier uniquely identifying a database instance. Each database instance has an SID - one and only one.
Service Name - An alias to one or more INSTANCES (useful for clustering, failover, without changing end-user configurations) - introduced in Oracle 8.
One SID could have a hundred service names pointing to it if you wanted to...but I'm pretty sure at a minimum it will have one. When you create an instance, Oracle makes you name them both. The 10g Configuration Assistant on Windows has a field named Global Database Name, which maps to Service Name. The SID is
frequently, but not always, the same as the initially specified Global Database Name.
After the creation of a database instance, Oracle tools refer strictly to the SID - after all, that is the name of the instance you'd be configuring. Since Service Name is just an alias, you wouldn't configure the character set or memory options of an alias.
Why do I care what the service name is if I have the SID?
Because knowing it lets me avoid relying on properly configured tnsnames.ora on each client machine. Sometimes, tnsnames.ora files appear to be controlled by a dark magic - the same tnsnames.ora file works fine on one machine, but fails inexplicably on another client machine. Sometimes TNS doesn't work right - and for a Java application that's going to be using JDBC, needing to configure tnsnames.ora is unnecessary work. For the command line tools like SQLPLUS and the import/export tools, you can use the EZCONNECT URL format and avoid TNS completely. There's a catch - EZCONNECT only accepts Service Names.
So, how do you determine the service name? Here's one way...
This assumes you have access to the oracle server. Provided you do, simply use the command:
lsnrctl status
This will print out various status information, as well as a compact listing of configured service names and which instances they point at. You could also use lsnrctl services for slightly more verbose services output - but depending on how many service names and instances there are, it may be harder to look at.
It's kind of anti-climatic, but that simple command ended the confusion. I thought Service Name was preferred (as it is more flexible than directly specifying the SID), but apparently it isn't always the case.
Booklist updated, no Tuesday post
No Tuesday post, but I did spend time working on a longer post that just isn't quite ready yet. Sleep is more important...
I did update my bookshelf the other night though. Eventually I'll better separate it into a recommendation section, what I've read, and my current queue of books awaiting reading. I often have bigger eyes purchasing books than I do reading, so I always have a long backlog.
I did update my bookshelf the other night though. Eventually I'll better separate it into a recommendation section, what I've read, and my current queue of books awaiting reading. I often have bigger eyes purchasing books than I do reading, so I always have a long backlog.
Monday, November 15, 2010
Stumbleupon is neat
A coworker recently told me he finds some really cool stuff using Stumbleupon. Now, I had heard of Stumbleupon before, but I had never tried it. I'm not sure why. The concept is cool.
I gave it a spin today, and here's my experience so far. Account sign up? Fairly easy, though it did kind of nag me to use a facebook account and import some friends or something. Once that was setup, it was fairly straightforward.
So far I've found a couple of really cool links, after telling it I liked ~35 things, and disliked 5, and skipping a few.
I gave it a spin today, and here's my experience so far. Account sign up? Fairly easy, though it did kind of nag me to use a facebook account and import some friends or something. Once that was setup, it was fairly straightforward.
So far I've found a couple of really cool links, after telling it I liked ~35 things, and disliked 5, and skipping a few.
- 28 Rich Data Visualization Tools - some really cool graph and chart tools
- UX Movement - a great site about user experience. I'm already learning some useful things, like better ways of presenting form data and search buttons.
Sunday, November 14, 2010
November month in Writing: Week 2 summary
I was able to broadly stick to my writing plan last week, as well as converted a couple of my drafts into finished posts. I read just shy of the first 50 pages of "Release It!", and I am enjoying it so far. Every weekday post was scheduled for 8:00AM. This doesn't appear to make a difference when you have no readership :) I need to write some meatier posts that I can submit to Dzone - that does makes a difference.
I failed at pursuing a Hudson / Opera issue that has plagued me. I'll restate the goal for this week... I just need to go through history, merge some modifications to prototype.js into prototype 1.6, then create a patch file and see if anyone is willing to take my patch for a spin (as well as stage it in my environment for a while).
As for general week's news:
Oracle and Apple Announce OpenJDK Project for Mac OS X - the future of Java on OS X seems assured now. Cool.
Mozilla released Firefox 4 Beta 7 - this added JIT to their Javascript engine, and it's now faster than everything except Opera 11 alpha at Javascript. Woot - I was beginning to think IE9 would be faster, but I am glad to see Firefox 4 gain some serious speed. Competition is good, and it is my #2 browser.
Gold Nanoparticles Could Transform Trees Into Street Lights - this is just amazing. I spotted this on twitter and then later on engadget...
No specific ideas for topics this week yet...we'll see what happens.
I failed at pursuing a Hudson / Opera issue that has plagued me. I'll restate the goal for this week... I just need to go through history, merge some modifications to prototype.js into prototype 1.6, then create a patch file and see if anyone is willing to take my patch for a spin (as well as stage it in my environment for a while).
As for general week's news:
Oracle and Apple Announce OpenJDK Project for Mac OS X - the future of Java on OS X seems assured now. Cool.
Mozilla released Firefox 4 Beta 7 - this added JIT to their Javascript engine, and it's now faster than everything except Opera 11 alpha at Javascript. Woot - I was beginning to think IE9 would be faster, but I am glad to see Firefox 4 gain some serious speed. Competition is good, and it is my #2 browser.
Gold Nanoparticles Could Transform Trees Into Street Lights - this is just amazing. I spotted this on twitter and then later on engadget...
No specific ideas for topics this week yet...we'll see what happens.
Saturday, November 13, 2010
muCommander - the ultimate cross platform utility
Despite NTFS supporting very long path names, Windows frequently has issues with long filepaths. Sometimes you need to bring in another tool for the job.
My favorite tool for dealing with long filepaths is muCommander. It is a Java app that mimics the traditional "Norton Commander" user interface. Java uses the API in Windows that supports longer filepaths, so muCommander has no trouble dealing with extra long file paths. It's not just for Windows, though - it's available on a lot of platforms.
muCommander is much more than a better file explorer, too. It has built in support for loads of protocols:
It can even open and edit zip files in-place.
My favorite tool for dealing with long filepaths is muCommander. It is a Java app that mimics the traditional "Norton Commander" user interface. Java uses the API in Windows that supports longer filepaths, so muCommander has no trouble dealing with extra long file paths. It's not just for Windows, though - it's available on a lot of platforms.
muCommander is much more than a better file explorer, too. It has built in support for loads of protocols:
Virtual filesystem with support for local volumes, FTP, SFTP, SMB, NFS, HTTP, Amazon S3, Hadoop HDFS and BonjourYou mean I can have my local filesystem on one side, and an SFTP session on the other? Awesome.
It can even open and edit zip files in-place.
Plus - it has a sweet logo.
muCommander is an awesome utility to keep in your toolbox.
Friday, November 12, 2010
Replacing Notepad with Notepad2
I've been using Notepad2 as a light-weight replacement for the notepad.exe that comes with Windows for several years. Let's face it, the original notepad.exe falls short on many levels - no auto-tab, no multi-line tabbing/untabbing, poor line endings support to start... I've always felt it was inferior to even the old MS-DOS EDIT, which is a pretty sad statement. In comes Notepad2, fixing all of its shortcomings while remaining lightweight, and adding some other nice features as well.
It's always been somewhat of a pain to perform the replacement to Notepad2, since notepad.exe is considered a protected operating system file in XP and Windows 7. Fortunately, Kai Liu wrote an installer that does this for you automatically! I just learned about this this week and figured I would share.
To download the installer, just go to http://code.kliu.org/misc/notepad2/ and scroll to the bottom, "Custom Notepad2 Builds", for both 32-bit and 64-bit machines.
It's always been somewhat of a pain to perform the replacement to Notepad2, since notepad.exe is considered a protected operating system file in XP and Windows 7. Fortunately, Kai Liu wrote an installer that does this for you automatically! I just learned about this this week and figured I would share.
To download the installer, just go to http://code.kliu.org/misc/notepad2/ and scroll to the bottom, "Custom Notepad2 Builds", for both 32-bit and 64-bit machines.
Subscribe to:
Posts (Atom)