Archive

Archive for May, 2010

Windows 7 – NTFS reparse points

When I started deploying Windows 7 around the office, speed and specially extra memory where at the top of the pros list. Getting to use more than 3GB of RAM under a 64-bit OS was out there before but it was never wrapped in such a good package. Since my users started running Windows 7 I learned how good and stable it runs and that is why I was surprised when one of them came to me complaining about his slow, very slow computer.

We’re talking about an HP xw4600 workstation that run Windows 7 64-bit with 4GB RAM. You cannot ask for anything other than speedy start-up and great work experience. After less than 6 month something changed and as the user described, the start-up process took 3 minutes and anything you tried took forever while the processes under task manager show that nothing utilize the processor…

When the log files gave no clue I restarted and allowed the consistency check to run

One thing catches my eye in this output:

What is this reparse record? Though it is not a new Windows 7 feature, it is a good opportunity to check it out.

While reparse points feature is new to NTFS v5 (introduced with Windows 2000), the concept has been used in other operating systems long before (UNIX has a similar feature called symbolic link). The basic idea in simple words is to allow the operating system to seamlessly link folders and drives together. As NTFS file system objects, reparse points can contain user-configured data that gets stored in the system-administered reparse attribute.

If you never heard of reparse records or reparse points, you might have heard of junction points. One of the great uses of a junction point is bypassing the 26 letter drive name limit, mounting is the commonly used term.

Read about reparse point tags, reparse point operations and reparse points and file operations to dive deeper.

Back to my user, consistency check completed but the problem did not resolve. Since I have few complicated financial applications on this desktop I wanted to avoid reloading the OS. I tried running the System Recovery Options->System Restore but while this option is cool and easy to use, it did not resolve my problem (which at this point screamed “hardware, hardware”) and I had to re-install the OS. As any of the other Windows 7 installations I’ve done before, it was easy and speedy and so far it looks like the fresh OS is working as you’d expect.

Switchport mapping

May 24, 2010 1 comment

I had to map the ports on a 2960 switch. I had to fill in the missing name on each port with the PC that connect to it.

This is a simple task that only require one command on the switch:

SWITCH#show mac-address-table interface fastEthernet 0/20
Mac Address Table
——————————————-
Vlan    Mac Address       Type        Ports
—-    ———–       ——–    —–
201    000f.2034.4b2f DYNAMIC     Fa0/20
Total Mac Addresses for this criterion: 1

I now hold the MAC address of the PC that connect to port 20: 000f.2034.4b2f

The next step is finding the IP address that match this MAC address. To find this piece of information I used my L3 switch that connect the 2960 switch.
This is the arp command to run on the L3 switch:

L3SWITCH#show arp | include Vlan201
Internet  192.168.201.101        26   000b.cdf5.b4e4  ARPA   Vlan201
Internet  192.168.201.100         7   0018.4d76.a2be  ARPA   Vlan201
Internet  192.168.201.103         5   0018.fe6b.187f  ARPA   Vlan201
Internet  192.168.201.102         0   0026.553e.050a  ARPA   Vlan201
Internet  192.168.201.105        78   000f.fe2e.290e  ARPA   Vlan201
Internet  192.168.201.104        82   000f.2034.4b32  ARPA   Vlan201
Internet  192.168.201.107        83   0014.c20a.11c3  ARPA   Vlan201
Internet  192.168.201.106        89   000d.9d99.12f4  ARPA   Vlan201
Internet  192.168.201.109        89   000f.20fd.4973  ARPA   Vlan201
Internet  192.168.201.108 4   000f.2034.4b2f ARPA   Vlan201
Internet  192.168.201.111        89   000f.fe9d.976d  ARPA   Vlan201
Internet  192.168.201.110        86   000f.fe40.d64b  ARPA   Vlan201
Internet  192.168.201.113         0   000f.fec8.6605  ARPA   Vlan201
Internet  192.168.201.112        89   0014.c20c.89f5  ARPA   Vlan201

Using include Vlan201 I cut the list to the single VLAN that connect to my 2960 switch, it is a good way to shorten the long list of every device in the network.
You can see that MAC 000f.2034.4b2f match the IP 192.168.201.108 and all I have to do now is run nslookup and get the machine name.

OFF TOPIC – PAC-MAN is 30yr old!

Check this cool Google doodle. You can actually play on Google‘s home page doodle!

SQL – SELECT part II

I’m still working on SQL Course2, working on the more advanced parameters.

Running the practice query I made a mistake or maybe not? you’ll be the judge:

Based on item_oreder table that has the following columns – customerid, order_date, item, quantity, price I was asked to query the following:

How many orders did each customer make? Use the items_ordered table. Select the customerid, number of orders they made, and the sum of their orders if they purchased more than 1 item.

This is my code and the result:

SELECT customerid, count(customerid), sum(price)
FROM items_ordered
GROUP BY customerid
HAVING sum(quantity) > 1;

I was reading “purchased more than 1 item” as quantity and as I understand it (and this is more of an English than SQL understanding) if the customer ordered 2 items or more in one purchase it counts to this matter.

The author of the course think differently as the suggested code is a bit different:

SELECT customerid, count(customerid), sum(price)
FROM items_ordered
GROUP BY customerid
HAVING count(customerid) > 1;

Unlike my code (and understanding), this solution count the number of different orders and not the quantity of items per order. The difference between the suggested solution and my solution is 4 Lawnchairs and maybe an English grammar class ;)

This is a great example to the power of the SELECT command options and their flexibility but it is also a reminder to the thin layer between nailing or failing.

SQL – SELECT part I

I’ve been working on the second SQL Course which focus on SELECT statements.

Like a newly built network environment or Active Directory forest, SQL’s day-to-day work is more of a routine work and less of the creative side. SELECT for SQL is like the show command in a Cisco IOS – simple but powerful, flexible and by far the most used command.

Definition: SELECT statement retrieves rows from the database and enables the selection of one or many rows or columns from one or many tables.

The main syntax options for the SELECT statement are:

SELECT select_list [ INTO new_table ]

[ FROM table_source ] [ WHERE search_condition ]

[ GROUP BY group_by_expression ]

[ HAVING search_condition ]

[ ORDER BY order_expression [ ASC | DESC ] ]

FROM is the only mandatory option (you must point the statement to a table). Use the other options at your will to filter the retrieved data and sort it in a user-friendly way.

Follow

Get every new post delivered to your Inbox.

Join 40 other followers