I wanted to be able to play music over Skype. I also wanted to be able to play my keyboard which is currently connected to a Komplete Audio 6 soundcard. I managed to get this working utilising the following setup with Virtual Audio Cable:

 

 

 

 

 

 

 

 

 

 

 

 

Here are the specific steps to be performed:

1. Create two VAC lines (Line 1 and Line 2) using Virtual Audio Cable’s Control Panel

 

 

 

 

 

 

 

 

2. Route Playback to Line 1

 

 

 

 

 

 

 

 

 

 

 

 

 

3. Route Keyboard Input to Line 2

 

 

 

 

 

 

 

 

 

 

4. Route Microphone to Line 2

 

 

 

 

 

 

 

 

 

 

5. Route Line 1 to Line 2

 

 

 

 

 

 

 

 

 

 

6. Route Line 1 to Headphones

 

 

 

 

 

 

 

 

 

 

 

 

 

7. Configure Skype Settings

I was running a PeopleSoft Application Engine process that I suspected was hogging the CPU on a Windows environment. I wanted to see whether this process was in fact the cause of the CPU intensive activities on the database.

Interestingly, I discovered that on a Windows environment, an Oracle instance is composed of one oracle.exe process with many different threads. Each thread represents either a background process (PMON, SMON, etc.) or a foreground user session. So, when you are running Oracle server on a Windows environment and encounter a situation where the server CPUs are nearing 100% utilisation, Task Manager only reveals that oracle.exe is taking up the CPU time. There are no details as to which specific thread or session is responsible for the high load.

Fortunately, I managed to find out which thread was responsible for the CPU hogging by downloading a tool (ProcessExplorer by sysinternals) that supports displaying threads within processes. You can download that here.

Process Explorer shows all the processes that are currently running. After double-clicking on the oracle.exe process, I was able to find the TID (Thread ID) that had the highest CPU utilisation. I then ran the following query in SQL Developer, substituting :1 for the TID that had the highest CPU utilisation.

[sourcecode language=”sql”]
select proc.spid TID, sess.username, sess.osuser,
sess.status, sess.sid, sess.program
from v$process proc, v$session sess, v$bgprocess bg
where sess.paddr = proc.addr
and bg.paddr(+) = proc.addr
and proc.spid in (:1);
[/sourcecode]

This query can be modified to include more columns to be displayed from v$session, v$process and v$bgprocess depending on your specific preferences.

I was also able to identify the specific SQL that the thread was running, by executing the following SQL and substituting :1 for the TID identified earlier:

[sourcecode language=”sql”]select sqlarea.*
from v$process proc,
v$session sess,
v$sqlarea sqlarea
where proc.addr = sess.paddr
and sess.sql_hash_value = sqlarea.hash_value
and proc.spid in (:1);
[/sourcecode]

I was interested to see a clean view of what the bind variables were for the currently executing SQL statement. I used the following query:

[sourcecode language=”sql”]
select * from v$sql_bind_capture
where sql_id = ‘<ENTER SQL_ID HERE>’;
[/sourcecode]

I then created indexes on columns in the SQL statements that I thought were problematic.

It’s also worth noting that if you really need to, you can kill the session by issuing the following command:

[sourcecode language=”sql”]ALTER SYSTEM KILL SESSION;[/sourcecode]

I use the following shutdown command to turn off my computer after a certain timeperiod:
[sourcecode language=”powershell”]
shutdown /s /t 3600
[/sourcecode]

/s means that we want to shutdown the pc
/t indicates a delay in the time that we want to shutdown/restart. In this case, we want the local pc to shutdown in 3600 seconds (1 hour).

Here’s a good reference for other options available to the shutdown command:
http://pcsupport.about.com/od/commandlinereference/p/shutdown-command.htm

I noticed that the AutoPlay feature stopped working for me some time ago. It may have something to do with the fact that I have virtualization software such as VMWare and Daemon Tools installed. I managed to re-enable the AutoPlay functionality by changing the following value in the registry:

The value was set to 255 (in decimal) or ff (in hexadecimal), meaning that AutoPlay was disabled for all devices. Once I set this value to 145 (the Windows 7 default value), and killed and restarted the explorer process (because I’m too lazy to restart the PC), AutoPlay started working again.

Some people have reported that the following has also helped them:

1. Start -> type “run” into the search box then [enter] -> run box is open, type “gpedit.msc”, [enter]
2. A new window is open. Navigate to Computer Configuration -> Administrative Templates -> Windows Components -> 3. AutoPlay Policies. Click on it.
4. On the right hand side, double click “Turn Off AutoPlay” and set it to “DISABLED”
5. Do the same to “Turn Off Autoplay for non-volume devices”

I like to enable Guest access at work so that I can easily share directories without having to worry about user security. Unfortunately in Windows 7 after enabling Guest access, I can now see the Guest account on the initial logon screen. Fortunately, you can remove this by performing the following:

1. In the run dialog (Windows + r), type “control userpasswords2” and then press enter.
2. Select the “Guest” user and press “Properties”
3. Select the “Group Membership” tab
3. Click on “Other” radio button (even though it may appear greyed out)
4. Change the dropdown for the Other radio button to “IIS_IUSERS”.

The Guest user should now be hidden from the welcome screen when you next logon.

Here are the security requirements that I often use for creating a Windows share for the Guest account (without a password):

Remove generic password restrictions

Control Panel > Administrative Tools > Local Security Policy > Account Policies
1.  Password Policy
   a. Minimum password age = 0
   b. Minimum password length = 0
   c. Password must meet complexity requirements = Disabled

Remove Guest restrictions for User Rights Assignment and Security Options

Control Panel > Administrative Tools > Local Security Policy > Local Policies
1. User Rights Assignment
   a. Deny Logon Locally (Remove Guest) – check this….don’t think this is required.
   b. Deny access to this computer from the network (Remove Guest)
2. Security Options
   a. Accounts: Guest account status = Enabled

Remove Guest password

Control Panel > User Accounts (Windows 7 – Click on the Manage other account link)
1. Click on Guest and remove the password (Windows 7 – you may not need to perform this step)

Note: Please be aware that this will allow anyone access to your Guest share, so be careful about the sharing permissions you set for the Guest user.

At my workplace, I’ve set up an FTP server so that colleagues from across the globe can download some files that I make available for them. I noticed that two people in the same office were downloading the exact same file (10 GB in size) except one was about 10% complete while the other was about 95% complete. I wanted to find out their computer hostnames – usually just an abbreviation of their real names – so that I could let them know that they were both downloading the same file.

I always knew about the ping and nslookup commands. But none these commands would always give me the correct hostname when supplied with an ip address.

For example:
ping - a <ip_address> 
nslookup -a <ip_address>

While these commands worked for fixed ip addresses, they never seemed to work for dynamic ip addresses, and would always return a dhcp-created hostname, rather than the actual hostname of the machine.

I was delighted when I discovered a command that worked for all cases:
nbtstat -A <ip_address>

This command actually gave me a list of all the network adapters that the host contained. The Local Area Connection adapter had the actual hostname that I was looking for.

I’d always used pushd to store the location of working directories when writing bat scripts. I didn’t realise that you could also use the pushd command to access unc paths:

This command creates a new drive for the share. You can use popd to remove the drive association with the UNC share.