Thursday, January 29, 2015

Brother Printer Replace Toner Message

If you ever get in a state where your printer hold you as hostage because of low toner message, follow following steps to reset the toner flag:

1. First find the IP address of your printer.
    To find IP address,

  •    -> Go to control panel -> Devices and Printers
  •    -> On you printer, right Click on printer and click on Printer Properties
  •    -> Select Ports tab
  •    -> Click Configure Port
  •    -> In the window, you will see Printer Name
  •    -> Go to command prompt, type ping <printerName>
  •    -> Ping command will display IP address.
2. Open your browser window. Type in the IP address and hit Enter.
3. This will default page of printer. 
4. On the Right side, Click on "Replace Toner" link. This will take you to replace toner page.
5. Click "Continue" and hit Submit.
6. Done.


HTH.

Saturday, January 10, 2015

How to find tables in FileGroup in SQL Server?

To find all the objects / tables / Indexes  that exist in a Filegroup, use following query:

SELECT
      f.[name] AS [FileGroupName]
    , OBJECT_SCHEMA_NAME(p.object_id) AS [Schema]
    , OBJECT_NAME(p.object_id) AS [Table]
    , i.name AS [Index]
    , p.rows AS [Row Count]
    , i.type_desc AS [Index Type]
FROM sys.indexes i
INNER JOIN sys.filegroups f
ON i.data_space_id = f.data_space_id
INNER JOIN sys.all_objects o
ON i.object_id = o.object_id
INNER JOIN sys.partitions p
ON i.object_id = p.object_id
AND p.index_id = i.index_id
WHERE o.type = 'U' -- User Created Tables
-- and f.name = '<filter for interested filegroup using name>'
order by p.rows