Category: FromSitesTree.com

SQL Server : Backups #38

Why are backups needed? To protect accidental data loss. Still, if you use highly available and fault-tolerant systems like SAN, and RAID, you may need to backup your database regularly. These fault tolerant systems can not provide accidental data delete by users, accidental data corruption from software and hardware failure. If you have a disaster …

Continue reading

How to optimize query response time? #38

Check that only the required columns are selected [in select statements] Check that the right types of joins are used Check that if re-ordering the joins will help or not Check the indexes of the tables [is indexing done on the right columns] Check that in joins you used the indexed columns in the join …

Continue reading

Dynamic Management Views #38

Dynamic Management Views provide ways to analyze database performance and to find the cause behind bad-performing SQL server databases/instances. Bad performance can be due to: poor design, insufficient memory, poorly configured system, disk bottlenecks, poorly written queries and many others Previously Windows System Monitor(perfmon.exe) and SQL server profiler were used to find the cause of …

Continue reading

SQL Server Database System Tuning #38

Database tuning approach Proactive approach Reactive approach Best Approach: Use a mix of both. Be aware (collect information) of the followings that may have significant impact on the performance. Hardware: Server, Available memory, number of processors, disk subsystems. Network Infrastructure: Network Cards, Switches, and the rest of your LAN and WAN. Operating System: Make sure …

Continue reading

SQL Server: Index #38

SQL Server: Index Indexes make database access faster. Without index your queries will run but indexes can increase the performance dramatically. You can define multiple indexes for a table and select the index that is required for current operations. Only one clustered index is supported for a table To get advantage of indexes you have …

Continue reading

Scalability: SQL Server 2005 #38

Scalability: SQL Server 2005 After you have optimized your database design and the application design, you can improve the scalability of SQL Server in two ways1.Scaling Up2.Scaling Out Scaling Up: Improve performance by 1. Adding more processors, memory, and storage capacity 2. Replacing existing hardware with faster hardware Note: You also need the right version …

Continue reading

Scaling Out #38

Methods SQL Server instances Clustering Database mirroring Log shipping Replication Shared scalable databases SQL Server instancesIn the same computer install multiple instance of SQL Server to take advantage of multiple processors. Each instance may use separate processor with separate lock manager, worker threads, tempdb system database. ClusteringFailover Clustering can provide robustness and protection against failure. …

Continue reading

SQL Server Hints #38

SQL Server Hints —————- What are hints? Simply to influence query execution plans to retrieve data faster. syscacheobjects —————- SQL server after compiling a query creates the execution plan and keeps it on syscacheobjects object. You can query the object to see the existing query plans as follows: select * from sys.syscacheobjects where cacheobjtype=’compiled plan’ …

Continue reading

What are cursors? #38

Cursors are server side database objects that are used by applications to apply operations on the database table data on a row-by-row basis. The operations may vary from one row to another row dynamically based on the requirements (business logic) and also multiple operations can be performed on the same row. Typical SQL commands apply …

Continue reading

Introduction to Printer Programming With Examples: Must Read #4

You can use the functions/procedures/classes that a programming language provide to program a printer. Another alternative is, sending raw printing command to the printer itself. Each printer has their own instruction sets. Usually what happens, when you use built in functions they convert your procedure/function call to printer language and send it to the printer. …

Continue reading