647 articles
Database
SQL Server, MySQL and Oracle database design, queries, backup and performance tutorials.
SQL Server 2012 : Auditing in SQL Server (part 3) - Database Audit Specification Object, User-Defined Audit EventIf you want to audit events that occur within a database, you will need to define a database audit specification. To create one, you can select New Database Audit Specification from the…Jul 19, 2014SQL Server 2012 : Auditing in SQL Server (part 2) - Server Audit Specification ObjectNow that you have created a server audit object, you can start writing auditing events to it. In this example, let’s audit all failed logins. Since logins affect more than one database,…Jul 19, 2014SQL Server 2012 : Auditing in SQL Server (part 1) - Auditing Objects, Server Audit ObjectWhen you want to perform an audit, you have the option to write audit data to one of three places. First, you can write audit data to the Windows Application log. Next, you can write…Jul 19, 2014SQL Server 2012 : Reordering Nodes within the Hierarchy - The GetReparentedValue Method,Transplanting SubtreesReorganizing the nodes within the tree structure is a common maintenance task when working with hierarchies. You might need to alter the tree structure by adjusting the parent-child…Jun 25, 2014SQL Server 2012 : Querying Hierarchical Tables - The IsDescendantOf MethodWith a hierarchical table populated and indexed, you’re ready to start writing efficient queries against it using some more methods available on the hierarchyid type.Jun 25, 2014Protecting SQL Server Data : Obfuscation Methods (part 4) - Truncation,Encoding, AggregationAn advantage of this approach is that the data that is provided to the user is only that which they need for their reporting and analysis requirements, so the potential for the leakage…Jun 21, 2014Protecting SQL Server Data : Obfuscation Methods (part 3) - Numeric Variance,NullingNumeric variance is a process in which the numeric values that are stored within a development database can be changed, within a defined range, so as not to reflect their actual values…Jun 21, 2014Protecting SQL Server Data : Obfuscation Methods (part 2) - Repeating Character MaskingOver recent years the information that is presented on a credit card receipt has changed. In the past, it was not uncommon to find the entire primary account number printed upon the receipt.Jun 21, 2014Protecting SQL Server Data : Obfuscation Methods (part 1) - Character ScramblingCharacter scrambling is a process by which the characters contained within a given statement are re-ordered in such a way that its original value is obfuscated. For example, the nameJun 21, 2014SQL Server 2012 : Managing Resources - Limiting Resource Use, Leveraging Data CompressionAnother way to control performance is to just prevent the processes from using as much of the CPU, memory, or disk space as possible. If any one process can’t access very much memory,…Jun 17, 2014SQL Server 2012 : Tuning Queries (part 3) - Using the Database Engine Tuning AdvisorAmong the principal methods that SQL Server uses to maintain and control queries are indexes and the statistics on those indexes. Taking direct control over these indexes yourself can…Jun 17, 2014SQL Server 2012 : Tuning Queries (part 2) - Gathering Query Information with Extended EventsExtended Events are a mechanism for gathering and viewing detailed information about the queries being executed on your system, among other things. The events provide a means to gather…Jun 17, 2014SQL Server 2012 : Tuning Queries (part 1) - Understanding Execution PlansThere are two types of execution plans in SQL Server: estimated and actual. Queries that manipulate data, also known as Data Manipulation Language (DML) queries, are the only ones that…Jun 17, 2014SQL Server :ONE-WAY ENCRYPTION - Creating the Interface (part 2) - Setting and Verifying Permissions to the Stored ProceduresThe ability to search the data that is in the Borrower_Identification table will be granted to the Sensitive_high and Sensitive_medium database roles, due to our use of the…May 31, 2014SQL Server :ONE-WAY ENCRYPTION - Creating the Interface (part 1) - Creating the View, Creating the Stored ProceduresHaving earlier restricted direct access to the Borrower_Identification table, the ability to insert, update and search records that are contained within the Borrower_Identification table…May 31, 2014SQL Server : Implementing One-Way Encryption (part 1) - Populate the Hash Columns, Verify the Implementation, Drop the Unencrypted ColumnTo verify that our hash values were successfully generated, we can execute SELECT statements that filter, based upon our newly generated columns, as shown in Listing 5.May 31, 2014SQL Server : Implementing One-Way Encryption (part 1) - Create the Primary Hash Column,Create a Secondary Hash Column for SearchingWith our HomeLending database, there is an expectation by the users that the members of the Sensitive_medium database role should be able to search for borrowers based upon the values…May 31, 2014Sql Server 2012 : Hierarchical Data and the Relational Database - Hierarchical Table Indexing StrategiesYou can create a depth-first index or a breadth-first index (or both) on your hierarchical tables. The two types differ in how SQL Server physically stores node references in the index.…May 30, 2014Sql Server 2012 : Hierarchical Data and the Relational Database - Populating the Hierarchy (part 3) - The GetAncestor MethodThe GetAncestor method accepts an integer parameter that specifies how many levels to traverse up from the node it is invoked on to reach one of that node’s ancestors, and then returns…May 30, 2014Sql Server 2012 : Hierarchical Data and the Relational Database - Populating the Hierarchy (part 2) - The ToString MethodThe preceding output shows the hexadecimal representation of each node’s encoded hierarchyid value, which is hardly useful to you.May 30, 2014Sql Server 2012 : Hierarchical Data and the Relational Database - Populating the Hierarchy (part 1)In the preceding output, you see Dave’s record as the root node in the hierarchy at level zero. The hierarchyid value of 0x for NodeId positions Dave as the top-level node, set by the…May 30, 2014Sql Server 2012 : Hierarchical Data and the Relational Database - The hierarchyid Data Type, Creating a Hierarchical TableThe hierarchyid data type enables a robust hierarchical structure over a relational table that can relieve you from much of this maintenance burden. Like the self-joining approach, each…May 30, 2014Personal Cloud WD My Cloud EX2 ReviewSharing many features with its predecessors in the WD My Cloud series of Network Access Storage (NAS) solutions, the WD My Cloud EX2 gives us more than just a 2-bay option to the series.…May 21, 2014Synology DS213j Your Own Cloud Entertainment Starts HereThere seem to be several variations of the DS213, with the DS213j being the lowestcost version. It is distinguished by having a lesser processor and lacks such features as hot swapping…Apr 19, 2014ADATA Premier Pro SP920 256GBContinuing its assault on the SSD market, ADATA has come out guns blazing with a brand-new lineup of drives. The Premier Pro SP920 family of 6Gbps SATA SSDs has a little something for…Apr 16, 2014Netgear ReadyNAS 314 Enterprise Network StorageThe Netgear ReadyNAS would suit someone who wants lots and lots and lots of storage. That’s thanks to its four drive bays (hot swappable, of course) and RAID 5 capabilities. RAID 5…Apr 6, 2014Budget Portable Hard Drivers ReviewThe world is a crowded place these days - finding any kind of space is a real luxury, and the same is true in the digital world. Given the amount of files and data for work, or music,…Apr 1, 2014Toshiba Q Series 256GB and 512GB, Toshiba Q Series Pro 256GBToshiba’s previous drives had incomprehensible names, but that’s changed with the new Q and Q Pro drives. The former range is designed for mainstream use, and it’s here in its 256GB and…Mar 21, 2014SanDisk Ultra Plus 256GB And X110 256GBSanDisk is clearly a fan of Marvell controllers, with the SS889187 chip used in the firm’s Extreme II drive , but for its Ultra Plus and X110 models, the firm has turned to the Marvell…Mar 21, 2014SanDisk Extreme II 480GB, Plextor M5 Pro Extreme 256GB and 512GBMarvell’s name is seen in all the SanDisk and Plextor drives on this page. SanDisk’s Extreme II moves from a SandForce controller to the Marvell 88SS9187, although it’s been given a…Mar 21, 2014Samsung SSD 840 Evo 250GB, 500GB And 1TBThe SSD 840 Evo range is the only one on test to use TLC NAND, which stores 3-bits per cell. Specifically, it’s Samsung’s 19nm Toggle 2 NAND.Mar 20, 2014PNY XLR8 240GB and XLR8 PRO 240GBThe XLR8 brand is more often seen on PNY’s top-end, overclocked graphics cards, but it also adorns several of the firm’s mainstream and high end SSDs.Mar 20, 2014OCZ Vector 150 240GB And 480GB, And Vertex 460 240GBCZ’s enthusiast-aimed Vector 150 and mainstream Vertex 460 drives, despite their different target users, use very similar hardware. The difference is that the Vertex 460’s Barefoot 3…Mar 20, 2014Intel 530 240GB and Transcend SSD 340 256GBSandForce has spent years supplying controllers to prominent SSD manufacturers, with its SF-2281 chip leading the way, but it’s more recently come under pressure from firms such as…Mar 19, 2014Crucial M500 240GB, 480GB and 960GBCrucial’s M500 drives are handled by Marvell’s 88SS9187 controller, for which Crucial develops its own firmware, while IMFT 128Gb (16GB) 20nm MLC NAND dies are used throughout.Mar 19, 2014Microsoft SQL Server 2012 : Backup and Recovery Planning - System Databases Recovery, Performing a Complete RecoveryThe master database contains key database and security information, and the msdb database holds the schedules and jobs for SQL Server, as well as the backup history. A complete recovery…Mar 12, 2014Microsoft SQL Server 2012 : Recovery Operations (part 4) - Restoring with T-SQL CodeA database backup is a regularly scheduled occurrence, so if SQL Server's built-in Maintenance Plan Wizard isn't to your liking, it makes sense to write some repeatable code to perform…Mar 12, 2014Microsoft SQL Server 2012 : Recovery Operations (part 3) - Restoring Individual PagesThe ability to restore pages has been available since SQL Server 2005; however, up until now, you needed to use T-SQL code. In this release you can perform this type of restore through a…Mar 12, 2014Microsoft SQL Server 2012 : Recovery Operations (part 2) - Performing the Restore with Management StudioThe Restore Database form, as shown in Figure 1, does a great job of intelligently navigating the potential chaos of the backup sequences, and it always offers only legal restore options.Mar 12, 2014Microsoft SQL Server 2012 : Recovery Operations (part 1) - Detecting the Problem , Recovery SequencesIf a database file is missing, clicking the database in Management Studio pops up a message saying that the database is unavailable. To further investigate a problem, check the SQL…Mar 12, 2014