Search
654 articles

Database

SQL Server, MySQL and Oracle database design, queries, backup and performance tutorials.

Related sections: WebsiteWindows AzureWindows Phone

Automating Blind SQL Injection ExploitationThe techniques we've discussed in this article regarding blind SQL injection enable the extraction and retrieval of database contents in a highly automated manner using either inference…Oct 13, 2010Blind SQL Injection Exploitation : Using Alternative ChannelsWe will discuss four separate alternative channels for blind SQL injection: database connections, DNS, e-mail, and HTTP. The basic idea is to package the results of an SQL query in such…Oct 13, 2010Blind SQL Injection Exploitation : Using Response-Based TechniquesJust as we used request timing to infer information about a particular byte, we can also infer state by carefully examining all data in the response, including content and headers. You…Oct 13, 2010SQL Server 2008 : Using the CLR - Understanding Permission SetsWhen registering an assembly with SQL Server, code within that assembly may adversely affect or compromise the system. To help protect against these events, SQL Server allows you to…Oct 13, 2010Registering CLR Assemblies for Use with SQL ServerAssemblies are physical units of deployment that contain managed code. This managed code can be called by CLR stored procedures, CLR functions, CLR triggers, CLR user-defined aggregates,…Oct 13, 2010SQL Server 2008 : What Is the Base Class Library?The .NET Framework provides a rich library of commonly used functionality to developers creating applications using managed code. This library is known as the Base Class Library.Oct 13, 2010Exploring the T-SQL Enhancements in SQL Server 2005 : The WAITFOR CommandThe WAITFOR command has also been enhanced in SQL Server 2005. In the past, WAITFOR waited for a specified duration or a supplied datetime value. Now, as with the TOP enhancements, you…Oct 13, 2010Exploring the T-SQL Enhancements in SQL Server 2005 : New Data TypesQL Server 2005 has several cool new data types. The most useful are varchar(max) and xml.Oct 13, 2010Exploring the T-SQL Enhancements in SQL Server 2005 : Exception Handling in TransactionsSQL Server 2005 offers major improvements in error handling inside T-SQL transactions. You can now catch T-SQL and transaction abort errors using the TRY/CATCH model without any loss of…Oct 13, 2010The SQL Server 2008 Configuration ManagerIn SQL Server 2005, The Surface Area Configuration Tool was used to manage SQL Server features such as Database mail and xp_cmdshell. In SQL Server 2008, the Surface Area Configuration…Oct 13, 2010SQL Server 2008 : Managing Security - AuditingAvailable in SQL Server 2008 Enterprise, automatic auditing can be set up by using SQL Server Audit. The Audit object can capture activity in the database server and save it to a log.…Oct 13, 2010Cloud Application Architectures : Database ManagementThe trickiest part of managing a cloud infrastructure is the management of your persistent data. Persistent data is essentially any data that needs to survive the destruction of your…Oct 12, 2010SQL Server 2005 : How Exceptions Work in SQL ServerThe first step in understanding how to handle errors and exceptions in SQL Server is to take a look at how the server itself deals with error conditions. Unlike many other programming…Oct 12, 2010Exploring the T-SQL Enhancements in SQL Server 2005 : Ranking FunctionsDatabases hold data. Users sometimes want to perform simple calculations or algorithms on that data to rank the results in a specific order—like gold, silver, and bronze medals in the…Oct 12, 2010Exploring the T-SQL Enhancements in SQL Server 2005 : TOP EnhancementsIn earlier versions of SQL Server, TOP allows you to limit the number of rows returned as a number or a percentage in SELECT queries. With SQL Server 2005, you can use TOP in DELETE,…Oct 12, 2010Blind SQL Injection Exploitation : Using Time-Based TechniquesNow that we have covered a little background theory on both classes of techniques it is time to dig into the actual exploits. When covering the various methods for inferring data there…Oct 12, 2010Finding and Confirming Blind SQL InjectionTo exploit a blind SQL injection vulnerability you must first locate a potentially vulnerable point in the target application and verify that SQL injection is possible.Oct 12, 2010SQL Server 2008 : Configuration OptionsWith SQL Server 2008, many options may affect the performance of individual SQL statements or the overall performance of a SQL Server instance.Oct 11, 2010SQL Server 2008 Instance ArchitectureWhen you fire up a SQL Server instance, two main areas are allocated: the code area and memory pool area. The code area is mostly static executable code of the SQL Server kernel; SQL…Oct 11, 2010SQL Server 2008 : Using the CLR - CLR IntegrationAs SQL Server became more widely used, database professionals and developers demanded the ability to incorporate advanced logic and functionality into their database objects.Oct 11, 2010SQL Server 2008 : Using the CLR - CLR and Managed Code ExplainedThe CLR is the execution environment provided by the Microsoft .NET Framework. It is likely that you had to install the .NET Framework at one time or another, usually as a prerequisite…Oct 11, 2010SQL Azure : Database Growth-Management StrategiesWhen your data is on-premises, you can manage your SQL Server database's growth by adding more storage capacity. Typically, an on-premises storage area network is shared across multiple…Oct 11, 2010SQL Azure : Database-Migration StrategiesThe data definition refers to the design of your database schema, which may include storage-specific objects like tables, views, indexes, constraints, and so on. The data definition is…Oct 11, 2010SQL Server 2005 : Implementing Service BrokerService Broker is an inter-application messaging agent that provides queuing and messaging within a single instance of SQL Server or between multiple instances. Database applications can…Oct 11, 2010SQL Server 2005 : Importing and Exporting DataThere are several ways of moving large amounts of data either within a single server or between servers. Importing and exporting tasks vary in SQL Server, and each task has an…Oct 11, 2010Understanding Snapshot IsolationThe default transaction isolation level in SQL Server is READ COMMITTED, which prevents statements from reading data that has been modified by another transaction, but not committed.Oct 10, 2010SQL Server 2008 : Programming Objects - Implementing TriggersA trigger is a T-SQL routine stored on the server that is executed automatically in response to an event within SQL Server. You can use triggers to evaluate data before or after a…Oct 10, 2010SQL Server 2008 : Programming Objects - Implementing Stored ProceduresThe favorite programming objects used by the database developers so far, stored procedures, are compiled SQL routines that are stored in a database and act like an independent program…Oct 10, 2010SQL Server 2008 Command-Line Utilities : The sqlservr Command-Line UtilityThe sqlservr executable is the program that runs when SQL Server is started. You can use the sqlservr executable to start SQL Server from a command prompt. When you do that, all the…Oct 10, 2010SQL Server 2008 Command-Line Utilities : The sqldiag Command-Line Utilitysqldiag is a diagnostic tool that you can use to gather diagnostic information about various SQL Server services. It is intended for use by Microsoft support engineers, but you might…Oct 10, 2010SQL Server 2008 Command-Line Utilities : The bcp Command-Line UtilityYou use the bcp (bulk copy program) tool to address the bulk movement of data. This utility is bidirectional, allowing for the movement of data into and out of a SQL Server database.Oct 10, 2010SQL Server 2008 Command-Line Utilities : The tablediff Command-Line UtilityThe tablediff utility enables you to compare the contents of two tables. It was originally developed for replication scenarios to help troubleshoot nonconvergence, but it is also very…Oct 10, 2010Surviving Changes to ColumnsOne of the most common causes of brittle code is a failure to program defensively against subsequent changes to the columns of the underlying data tables. These changes can take the form…Oct 9, 2010Surviving Changes to the Signature of a Stored ProcedureThe lesson here is clear: stored procedure calls with explicitly named parameters are more robust; they continue to work correctly even when the signature of the stored procedure…Oct 9, 2010Exploring the T-SQL Enhancements in SQL Server 2005 : The PIVOT and UNPIVOT OperatorsLet’s face it: Users usually want to see data in tabular format, which is a bit of a challenge given that data in SQL Server is most often stored in a highly relational form. PIVOT is a…Oct 9, 2010Exploring the T-SQL Enhancements in SQL Server 2005 : Common Table ExpressionsA common table expression (CTE) closely resembles a nonpersistent view. It is a temporary named result set that you define in your query that will be used by the FROM clause of the query.Oct 9, 2010SQL Azure Data AccessSQL Azure allows you to connect to the cloud database only using the TDS protocol with limited support, as described in the previous section. But because the TDS protocol is supported by…Oct 2, 2010SQL Azure ArchitectureSQL Azure is a scalable and highly available database utility service in the cloud. Like all other Windows Azure services, it runs in Microsoft data centers around the world. The data…Oct 2, 2010SQL Server : Transactions and ExceptionsNo discussion of exceptions in SQL Server can be complete without mentioning the interplay between transactions and exceptions. This is a fairly simple area, but one that often confuses…Oct 2, 2010SQL Server : Exception HandlingException handling in T-SQL should be thought of as no different from exception handling in any other language. A generally accepted programming practice is to handle exceptions at the…Oct 2, 2010