Sunday, 29 April 2018

A Perfect Solution to Resolve SQL Server Error 211

SQL Server Schema is basically a collection of SQL Objects that includes the tables, related columns, its entries, or other components. Due to this, it becomes easy for a user to access the database in the more reliable and effective way. However, there are some situations such as destruction in the schema due to which different type of errors occurs in SQL Server. This can also lead to corruption in structure or other components of the database. Among all one such error is SQL Server 211 that occur whenever there is an update in SQL Server table or when there is a corruption in SQL Server Schema. Thus, in the following section, all possible reasons for corruption in the server Schema with possible solutions to resolve this error is covered.

Error Message:

An error can occur in SQL Server in many different ways. For example,

    Error: 211, Severity: 23, State: 51. Possible schema corruption. Run DBCC CHECKCATALOG Msg 211, Level 23, State 157, Line 1 Possible schema corruption. Run DBCC CHECKCATALOG.

This type of error message generally occurs when a user tries to update a table in the database and in between the schema corruption occurs. Moreover, this error mainly occur in SQL Server 2005 and later versions. However, due to this SQL Server error 211, one is not able to open any SQL Server table.

Causes of SQL Server Error 211

The schema corruption in SQL Server database occurs very rarely. However, when this error occurs, one must have to check for the main reason behind the occurrence of this error, either through SQL error Log files or through some other source.

Therefore, all the major reasons due to which schema gets corrupted are listed below:

  • One of the major issues behind corruption is hardware failure
  • Software failure sometimes also leads to corruption in Schema
  • It can be due to any improper computer activities by server users

Manual Methods to Resolve SQL Server Error 211

There are many different manual solutions available to resolve this error. One can try any of them to fix the schema corruption that is present within the server. Thus, all possible solutions to resolve this error are:

  • Restoring the backup file of the database is one of a preferable solution to resolve this error. Now, to do the same follow the situations mentioned below:
    1. In the case of backup of the transaction log, a user can take a backup of tail-log. After that one can restore the backup completely including all transaction logs, which are ending with tail-log backup. In this case, there will be no loss of data.
    2. In the case of no transaction log backup, one can create a new database and try to import as much data as possible. However, if the user is able to identify the culprit table, then drop that particular table & create it again.
  • Another possible solution to resolve SQL Server error 211 is that a user can try is restore the complete MDF database file and deploy the database again.
  • If any of the above does not work perfectly then, in last a user can run the DBCC CHECKCATALOG command on the server screen.

After executing this DBCC command an error is displayed. However, there are some exceptions that might encounter while executing the Transact-SQL statement with dedicated Schema.

A user will possibly get some suitable suggestion from SQL server database after executing DBCC CHECKCATALOG syntax. This will let users identifying the location and reason behind the occurrence of SQL server error 211.

Effortless Solution to Remove SQL Server Corruption

Most of the times it can be possible that manual method to resolve SQL Server error 211 is failed. Apart from this, the manual procedure is a very time consuming and complex to use. Therefore, to have a trouble-free solution, a user can go for a third party solution i.e. SQL Recovery Tool. This software removes all type of corruption from SQL Server database file in an easy and simple way. One can use this tool without any hassle as the software provides an easy user interface.

Conclusion

SQL Server error 211 is the type of error due to which a user is not able to open any table in SQL Server. Therefore, to remove this hurdle, we have discussed some manual tricks to resolve this error. One can try any of the above discussed manual ways to resolve this error. Apart from this, the best possible solution to remove the corruption from SQL Server Schema is a third-party tool i.e. SQL Server database recovery tool. The tool will remove all type of corruption from SQL Server database file in just a few clicks.

Thursday, 26 April 2018

Top 5 Features of SysTools SQL LDF Recovery Software - Review

An SQL Server Expert Thoughts : I would like to recommend my readers to use SysTools SQL LDF recovery software for viewing transaction log file of SQL Server 2016, 2014, 2012, 2008 R2 database, and 2005. It is so because I personally had used this application for resolving many problems related to the SQL Server log file and all issues were rectified easily by help of this tool.

Currently, I am the database administrator in an organization where weekly I have to analyze all the SQL Server transactions made by users. Therefore, I researched for an application by which I can view transaction log of SQL Server because manual approach was not proving itself worth for my need. Through my searching process, I came across SysTools SQL LDF Recovery software, which was the one that an expert will always recommend after using it. Its interface, working, and features all are designed to achieve task of reading and viewing LDF file records with/without SQL Server. In this page, I am going to share my review on the SQL LDF reader tool and hence, one will came to know why I am suggesting this product.

SQL LDF Recovery Software – A Quick Overview

The tool enables users to connect with the SQL Server database through valid credentials for automatically extracting database with its complete records. One will be able to determine insertion, updation, and deletion record of the Server transaction, which will help in detecting major cause of the corruption in the SQL Server. The log file related attributes like Transaction, name, time, query, and table name all will be previewed on the software panel. SQL LDF Recovery software is capable of supporting all data types like Geometry, sql_variant, datetimeoffset, datetime2, hierarchyid, and geography data type. Apart from all this, the software provides feature to filter and export transaction information directly into the SQL database Server, its compatible script, or in CSV file format.

Commendable Features of SQL LDF File Recovery Software

  1. Two Modes to Browse Database Records : There are following two options to add SQL Server log files in the software:
    1. Online Mode : One just need to mention the Server credentials and database name whose transaction are to be viewed by them.
    2. Offline Mode : This option is for loading transactions from the LDF and corresponding MDF file, which is manually browsed by a user.
  2. Preview All SQL Transactions Log Activities : SQL Server LDF reader thoroughly scans the data and loads it on preview window. The tool will generate preview of all transaction activities, which are either saved on the mentioned Server or in log file. One will be able to track records with Login name authentication for operations like delete, update, and insert with other respective details.
  3. Options to Export SQL Transaction Log : Not only viewing and analyzing of transaction details but, SysTools SQL LDF recovery software permit users to import records in following three options :
    1. SQL Server Database : Option to directly export data to the SQL Server database, which requires the Server name, name of database, user name, and password.
    2. SQL Server Compatible Scripts : Choose a location where you want to save .sql file on your local machine for storing log details.
    3. CSV File : Alike SQL Server compatible scripts, you can save the log file in CSV file format.
  4. Export Selective Tables From Browsed File : Instead of exporting entire records, SQL Log file viewer provides feature to export desired Server tables, based upon certain time duration or date-range. In addition to this, one can check/uncheck tables, which they want/do not want to export in SQL Server database, or save in SQL script/CSV file format. Moreover, an option is provided to save complete export details in CSV format for future reference.
  5. Retrieve Database of Recent Editions : Examined transaction log file of the SQL Server can be used to recover corresponding damaged/corrupted database. The SQL Log analyzer tool is supportive with all versions of the Server, including its latest one. If the database is in Simple recovery mode then, one will be able to recover lost records too. Please remember that data should be exported on some other location for avoiding overwrite activity of the existing database.

SQL LDF Viewer Tool : Its Availability

There are two versions of this application, which are described below:

Free SQL Server Log Explorer : The software is available in trial version with help of which users can test and examine the functioning of it. One will only be able to view transaction log through this versions and need to purchase full version of the software for complete working.

SQL Log Analyzer Full Version : The application is available in licensed and full version with which users can preview and export transaction log files. After purchasing the product, a person will be provided with a software key to activate the full version.

SysTools SQL Log File Reader : Its Pros and Cons

Pros

  • Extract transaction details directly from the Server
  • Option to perform sorting based on log file components
  • Feature to expand multiple secondary database files
  • Compatible with all editions of Windows and SQL Server
  • Extract and view records from Live SQL database
  • Support to Analyze ldf file of SQL Server 2016, 2014 & below versions

Cons

  • In offline mode, tool supports only one LDF file at a time

Time to Wrap Up

I would like to rate this product 9.8/10 just because of only one con, which I have already mentioned. Apart from this, all other functioning of SysTools SQL Server Transaction Log recovery tool is outstanding and spending money on it, is of full worth.

Saturday, 7 April 2018

Brief Description about SQL Server Encryption

Encryption is a good technique using which a particular data is obfuscated with a key or password. This makes the data useless until any decryption key or password is used to unlock it. Encryption makes data secure and prevents data loss, even if access controls are bypassed. Users can use encryption in SQL Server for connections, stored procedures and data.

In SQL Server data is encrypted by hierarchical encryption and key management infrastructure. Each encryption layer is used to encrypt the layer below it by using asymmetric keys, symmetric keys, and a combination of certificates. Both Asymmetric keys and Symmetric keys are stored outside of SQL Server in an Extensible Key Management (EKM) module.

Below given figure shows how encryption hierarchy plays its role and encrypts a database. Here PW denotes the password.

Note: Encrypt data using symmetric keys instead of asymmetric keys and certificates for better performance.

Outside the SQL server, an EKM module holds both the symmetric or asymmetric key.

Service master key protects database master keys. The SQL Server setup creates service master key encrypted by DPAPI (Windows Data Protection API). The Service Master key and Database Master keys, are all symmetric keys.

Mechanism of Encryption:

SQL Server provides the following types of Encryption Mechanism.
  •  Transact SQL-functions
  •   Asymmetric Keys
  •   Symmetric Keys
  •   Certificates
  •   Transparent Data Encryption

Transact-SQL Functions

Using transact-SQL functions, user can encrypt individual data items while they are inserted or updated. For more information, see ENCRYPTBYPASSPHRASE (Transact-SQL) and DECRYPTBYPASSPHRASE (Transact-SQL).

Certificates


Certificates that are often called the Public Key Certificates, is a digitally-signed statement that binds the value of the public key to the identity of a particular person, service or device that holds private key. Certification authority allows signing and issuing the certificates. The subject of the certificate is the one that receives a certificate from a CA. Certificates contain the following information.
  1.   Public key of the subject.
  2.    Identifier information like; name and email, etc.
  3.  The valid time period of the certificate. When the validity of the certificate is expired, then the new certificate must be requested.
  4.   Identifier information of the issuer.
  5.   The digital signature of the issuer. In this process data is transformed (some secret information of the sender) into a tag called, Signature.
  6.  Server created self signed certificates follow X.509 standard and X.509 v1 fields.

Asymmetric Keys

 

An Asymmetric Key is a combination of public and private key. Each key used to decrypt data encrypted by the owner. Asymmetric encryption provides a higher level of security comparable to symmetric keys and are relatively-intensive. It is used to encrypt a symmetric key for storage purpose in the database.

Symmetric Keys


A symmetric key is used for both encryption and decryption of the data information. By using symmetric key the process of encryption and decryption has been made faster and suitable for sensitive data stored in the database.

Transparent Data Encryption


TDE is used to encrypt entire database using symmetric key called Database Encryption Key. The database key is protected by other certificates or keys which are protected by the master or by an asymmetric key, stored in an EKM module. TDE uses symmetric key for encryption.

Conclusion:

In the above paragraph I have explained all the encryption techniques and their types in SQL Server along with a brief description about their process or uses. The encryption process is more important considering a part of the SQL Server database that guarantees data security by its complex techniques. For more details about the encryption type, kindly wait for the next blog update.

Wednesday, 4 April 2018

7 Steps to Repair Database from Corruption

SQL Server Database is an advance relational database management system, which is widely used by business professionals. But one of the serious issue one faces is SQL Server Database Corruption.

It is estimated that 99% of Database Corruption in SQL Server is caused due to the problem in IO subsystem level. It means the root cause of Database Corruption in SQL Server is an issue in Disk Subsystem, Disk Controllers, Disk Drivers and possibly Communication Channel.

The corruption is the serious issue, faced by many DBAs and users in an organization and tackling it is the biggest challenge.So, taking regular backup of SQL Server Database is the key to prevent data from Corruption. But, sometimes .bak file also tends to be corrupted due to some hardware or software failure.

Possible Database Corruption Issues

There are various reasons for getting SQL Server Database getting corrupted.

The above issues show various reasons for Database Corruption. For that case, SysTools SQL Recovery Software is one of the key available tool to manage all corruption related problems in SQL Server. The tool promises to give quick solution to various critical corruption problems.It's a handy solution which provide us ease in performing simple recovery steps.

Steps to Recover Corrupt Database in SQL Server

  1. Download SysTools Software Recovery Tool and run it on your machine.
  2. Click ‘Open’ to browse your corrupted MDF File location and open it from its location.
  3. Software gives you two options, one is of ‘Scan Mode’ and other is of selecting version of SQL Server. Choose ‘Quick Scan’ for normal level corruption or ‘Advance Scan’ for high level corruption. The next option is to select the version of SQL Server. Whether choose Auto Detect or select the version of MDF File manually.
  4. The tool will display the scanning report after performing Quick Scan mode.
  5. If the level of corruption is high or the expected results does not found to be “Quick Scan”, the software will notify you to perform Advance Mode scanning.
  6. After scanning,the software will preview the data of recovered database objects.
  7. Software gives you two different options to save recovered data. After clicking on ‘Export’, save the repaired data as of your choice, either as SQL Server Database or as .sql script.

Conclusion

Database Corruption in SQL Server Database is the major problem DBAs or any users face. There are various manual repair methods to recover the corrupted database. By running database console commands like DBCC CHECKDB or REPAIR_ALLOW_DATA_LOSS, one can fix minor level corruption. But if the MDF file is severely corrupted, it is possible that the manual solution fails in recovering data. It is advised to try SysTools SQL Recovery Software for repairing highly corrupted SQL Database files.