Pages

Monday, February 7, 2011

QFE

Quick Fix Engineering (QFE)

Quick Fix Engineering (QFE) is a Microsoft term for the delivery of individual service updates to its operating systems and application programs. Using WMIC command, QFE feature can give lot of information for patch management.

Need to know if patching was successful or failed?
This might happen that after server reboot, you find everything is up and running but the patch installation was failed. To check if patch is successfully installed or failed, we can use “wmic” command. These are explained below:

wmic qfe list
This command will give you the list of all the patch details which was installed in the machine. Here the list generated will be little bit complicated. In that case we can use another command to format the output in command prompt.

wmic qfe list /format: list
This command will generate the same list above in a proper and understandable format. Using this command you can find the patch or hotfix name and date of installation.

wmic qfe list brief /format:htable > patchdetail.html
If we need the list of all patch and their details in a proper format, not in command prompt, then we can use the below command to generate the output in an appropriate format.


Need to know the server reboot time?
To check whether server was rebooted after the patch installation, it is required to verify the last reboot time of the server. This reboot time helps us to check whether patching has been done or not.
We can find the reboot time using the below commands:
Net statistics workstation
This command will give you the last reboot time of the server.

 
Systeminfo
This is another alternative command to find the last reboot time of the system. This command will generate a huge detailed report about the system, that is why I prefer using Net command to get the output in short.

Wednesday, January 19, 2011

JOINS

JOINS
--============================================[JOINS]========================================================================
--JOIN clause is used whenever we have to select data from 2 or more tables.

--Our two table are below---
SELECT * FROM Person.Contact [19972 rows]
Select * From Sales.Individual [18484 rows]


--Joining without using JOIN Clause (Only Matched)[18484 rows]---------
SELECT Person.Contact.FirstName, Person.Contact.LastName,Sales.Individual.CustomerID
FROM Person.Contact,Sales.Individual
WHERE Person.Contact.ContactID = Sales.Individual.ContactID

--JOIN (By default it will be INNER JOIN)(Only Matched)[18484 rows]
--The INNER JOIN will select all rows from both tables as long as there is a match between the columns we are matching on.
SELECT Person.Contact.FirstName, Person.Contact.LastName,Sales.Individual.CustomerID
FROM Person.Contact JOIN Sales.Individual
ON Person.Contact.ContactID = Sales.Individual.ContactID

--LEFT OUTER JOIN (simply LEFT JOIN) (19972 rows)---
-- selects all the rows from the first table listed after the FROM clause, no matter if
--they have matches in the second table.

SELECT Person.Contact.FirstName, Person.Contact.LastName,Sales.Individual.CustomerID
FROM Person.Contact LEFT OUTER JOIN Sales.Individual
ON Person.Contact.ContactID = Sales.Individual.ContactID

--RIGHT OUTER JOIN (simply RIGHT JOIN) (18484 rows)
-- selects all the rows from the second table listed after the FROM clause
SELECT Person.Contact.FirstName, Person.Contact.LastName,Sales.Individual.CustomerID
FROM Person.Contact RIGHT OUTER JOIN Sales.Individual
ON Person.Contact.ContactID = Sales.Individual.ContactID