T-Sql

How To Test SQL Injection

How To Test SQL Injection

Aytekin Done

SQL injection is a web security vulnerability that replaces the OWASP (Open Web Application Security Project) Top 10 every year. In shortly, SQL injection is caused by the fact that the data from the user is directly included in the SQL query.

In the example below, there is a simple login page written in asp language.

         FUsername = Request.Form("username")
         FPassword = Request.Form("password")

               Set RsLogin = SQLConn.Execute("SELECT * FROM Members WHERE username =      '" & FUsername & "' AND Password = '" & FPassword & "'")

         If RsLogin.EOF AND RsLogin.BOF Then
                Response.Redirect "/error.asp"

         Else
               Session("login") = RsLogin("user_id")
             Response.Redirect "../"

         End If

Let’s examine this code.

Sql Server Backup and Restore Backup

Sql Server Backup and Restore Backup

Fadıl

In this article, I will explain how to backup and restore database backups with SQL Server Management Studio. The backup process is to keep an instance of all data on the database against the risk of loss and corruption. This backed up data is then restored as needed to prevent possible data loss.

Backup Process with SQL Server Management Studio

You must know the types of SQL Server Backup before proceeding to backup. There are 3 different backup types on SQL Server.

Pagination in SQL Server

Pagination in SQL Server

Fadıl

Many times we have to build reports which list customers/employees/orders etc in the system.

At times when the systems are very large, the listing runs into several pages. Hence we need to support pagination in the reports.

There are several ways to support pagination using SQL Server. In this article, we will go through some of the methods for pagination.

To explain the various methods available, we will use the following table.

Moving Analysis Service Database to a Different Drive

Moving Analysis Service Database to a Different Drive

Fadıl

Recently we faced a situation where the server hosting our Analysis Services ran out of the space on the primary C drive. After looking at the files stored on C drive, we noticed that the Data folder of Analysis service %Installation folder%\OLAP\Data was occupying max disk space. This is because by default when you deploy the Analysis Service Project, the cube data (dimensions and Facts data) is stored in the above default directory.

SQLCLR Procedure to export query / SP results into CSV

SQLCLR Procedure to export query / SP results into CSV

Fadıl

We as database developers, many times have to export data into csv files and send them across to the Business users. The data the needs to be exported can be a retrieved by executing an adhoc-query or a stored procedure based on the users requirements. In this article we will look at a SQL CLR Stored procedure which can be used to export data into CSV from within the Database