Showing posts with label capture. Show all posts
Showing posts with label capture. Show all posts

Monday, March 19, 2012

Defragment Heap Tables

Hi guru,

I've been new company for only a month and started analysing Index
Fragmentation.

After I ran DBCC DBREINDEX and capture data into permanent table, I 've
seen lots of tables with no indexes. These tables showed:

Very low scan density,
High extent fragmentation
High Avg. Bytes Free per Page

What are the best strategies to defragment tables with no indexes?

I'm planning to make a rule that each table must have a clustered index
and this index must be created on the best column (highest
selectivity).

Please help.

Thanks,
Silaphet,kmounkhaty@.yahoo.com (smounkhaty@.bremer.com) writes:
> I've been new company for only a month and started analysing Index
> Fragmentation.
> After I ran DBCC DBREINDEX and capture data into permanent table, I 've
> seen lots of tables with no indexes. These tables showed:
> Very low scan density,
> High extent fragmentation
> High Avg. Bytes Free per Page
> What are the best strategies to defragment tables with no indexes?

Create a clustered index on them. If the index is absolute undesired,
drop the index once your done.

> I'm planning to make a rule that each table must have a clustered index
> and this index must be created on the best column (highest
> selectivity).

Yes, that is a good rule. Heap tables with deletions can easily become
very fragmented.

As for which column to cluster on, you may want to find a column
that grows monotonically, if all you want to do is avoid fragmentation.
Of course, adding indexes to improve queries is a good idea too!

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Tuesday, February 14, 2012

Default Printing Option for Crystal Report

I have developed a PDF web report which opens in a browser by using Crystal Report for VS.NET 2003. Is there any way to capture the printer settings of the users (who view this report) and change the Printer Paper Size to Legal? I understand that this is a security issue and this is not permitted under normal circumstances...but is there a round about way? My OS is Windows 2003.
Thanks for your helpIf I understand your question correctly, here's how I do it in VB 6 and CR 8.5 using RDC (maybe you can manipulate it to fit your needs?).

Report.PaperSize = crPaperLegal
Report.PrintOut

This way, you don't have to change the user's settings.