Like This Site? 
 
RSS Feed Follow Us 

on Twitter! Be Our Fan!

Increasing the number of recent files in SSMS

Share this post!
 Vote this!

In Sql Server Management Studio, I usually access my sql query files that I save -- using the File -- Recent Files option. The default setting of the number of recent files to be displayed in SSMS. Today I wanted to access a file that I had used last week and I could not find that file in the recent list.             more....

Increasing SQL SERVER Memory

Share this post!
 Vote this!

In one of our server audits it was discovered that only one third of the memory has been allocated to the sqlserver instance. Questions were asked whether multiple instances of sql server are present. But when there was no other instance of sql server running it was recommended that we increase the memory allocated to double from 10 GB to 20 GB.
   more...

Backups and Recovery

Share this post!
 Vote this!

This is the most important task of an database administrator, you must protect your data at all costs, this means regular backups and regular restores even to another system just to check the integrity of those backups. There is no point in putting yourself in a position where you are holding your breathe when a restore is happening only to find out that the backup is corrupt, try if possible to perform regular restores if not then at least you should be performing a disaster recovery test once per year. Not being able to restore could be a disaster for your company and your job.                 more...

Data Types

Share this post!
 Vote this!


Choosing the correct data type can lead to a better performing database, for example comparing numeric types takes less time than comparing character strings types because character string types have character set and collation considerations, also the smaller the data the faster it will be processed and less I/O is used making queries perform even better.
MySQL includes many of the ISO SQL 2003 standard data types and adds more data types of its own, the data types can be categorized by the following.        more...

T-SQL QUERIES

Share this post!
 Vote this!

In this thread I would like to share some of the most frequently used SQL queries, following examples will be are demonstrated with Adventure Works and my own databases. There might be alternate sources of the available outside. All I wanted is to share it at the right place. Eventually I will be updating this separate thread with new queries which I am learning from time to time.   more...

SQL Query Optimization

Share this post!
 Vote this!

Performance tuning focuses on writing efficient SQL, allocating computer resources and analyzing wait events and contention in the system. The design approach to a database is critical to ensuring the best performance from a database, here are the steps when designing a database:
  1. Design the application correctly
  2. Tune the application SQL code
  3. Tune memory
  4. Tune I/O
  5. Tune contention and other issues
There are two approaches to performance tuning  more...

Oracle Memory Architecture

Share this post!
 Vote this!

Oracle uses three kinds of memory structures
SGA (System Global Area)  : is a large part of memory that all the oracle background processes access.

PGA (Process Global Area)  : This is memory that is private to a single process or thread and is not accessible by any other process or thread

UGA (User Global Area)  :
This is memory that is assoicated with your session, it can be found in the PGA or SGA depending on whether you are connected to the database via shared server
Shared Server - the UGA will be in the SGA
Dedicated Server - the UGA will be in the PGA  more...

PL/SQL Packages

Share this post!
 Vote this!

Packages are stored libraries in the database, they are owned by the user schema where they're created, like table and views, this ownership makes packages schema-level objects in the database catalog, like standalone functions and procedures. Users who wish to use the package must have execute privilege on the package. You define package only-scope functions and procedures in package bodies, package only scope functions and procedures can access anything in the package specification. Normally you declare identifiers in the following order: datatypes, variables, exceptions, functions and procedures.
A PL/SQL package is away to group a set of program units (procedures/functions) together, a package is divided into two parts
  • package header - lists the interface to the package, variables/constants that are visible to the outside world
  • package body - contains the PL/SQL code  more...

PL/SQL Advanced Programming

Share this post!
 Vote this!

It is possible to create dynamic SQL on the fly, you have two architectures that apply in both cases, you can glue strings together or you can implement placeholders. The gluing of strings is susceptible to SQL injection attacks, implementing placeholders (bind variables) makes your dynamic SQL immune to these attacks. They act as formal parameters to dynamic statements.
The process of running a dynamic statement involves four steps:
  • First, the statement is parsed
  • Second, the statement with placeholders map the actual parameters to the formal parameters.
  • Third, it executes the statement
  • Fourth, it returns values to the calling statement
There are two methods that can be used to build dynamic statements:  more...

A Complete Guide To SQL Injection

Share this post!
 Vote this!

SQL Injection is one of the more popular application layer hacking techniques that is used in the wild today. It is a trick that exploits poorly filtered or not correctly escaped SQL queries into parsing variable data from user input. The idea behind SQL injection is to convince the SQL application (whether MySQL, MSSQL, PostgreSQL, ORACLE etc) to run an SQL string that was not premeditated.

Contents Included

1 Severity

2 Exploit Likeliness

3 SQL Injection Types
 
4 SQL Injection Techniques
 
5 SQL Injection Mitigation

6 References

7 Tools    More...











RECOMMENDED READING

SQL Injection Attacks by Example

What Is URL Based SQL Injection