In this fast-evolving Digital Environment, Corruption is the most common occurrence. It mutely strikes at any instant and takes a toll on transaction, performance, and database availability. The reason for the SQL database SUSPECT condition can be anything including Application Crash, Improper Shutdown to the Missing Transaction Log. This action is potential enough to thwart
Tag: MS SQL Server
How to add new instance in SQL Server
All program -> SQL Server Installation center In windows 8 -> Search -> SQL Server Installation Cepter From left menu select “Installation->New Sql server standalone installation or add features” Browse CD or Physical directory of SQL Server Auto run “Setup support rules” click ok Product update -> click next Install setup files -> click next
SQL Join with Microsoft SQL Server
What is SQL Joins? A SQL join clause is used to combine records from two or more tables in a database based on common field between them. It creates a set of rows in a temporary table. There are different types of joins available in SQL: • INNER JOIN • LEFT JOIN • RIGHT JOIN
Recovering SQL Server Database from Suspect Mode
Sometimes we have to face a critical situation when SQL Server database going to Suspect Mode. In that moment no work can be done on database. Database may go into suspect mode because the primary file group is damaged and the database cannot be recovered during the startup of the SQL Server Reason for database to go into
SQL Server (database development) – Part 1
Sql server part – 1 from Mahedee Hasan
Retrieve Store Procedure’s Output parameter by C# (ASP.net)
How to retrieve store procedure’s output parameter by C#? Here I have explained with a simple example. I created a simple store procedure with output parameter. Then I catch it from code behind page of asp.net and displayed it to a label. Here I used a class DBConnector to connect with database. Lets look on
Install SQL Server 2008 R2 – Step by Step
We often fall problem to install SQL Server 2008 R2. Here is the step by step procedure to install SQL Server 2008 R2. Microsoft .NET Framework 3.5 SP1 is the pre-requisite for SQL Server 2008 R2. If it is not installed in your computer, install it before proceed to the setup procedure. Step 1: Run
Get Data Length of a table in SQL Server
Get Column Name, Data Type and Data Length of a table in sql server. Here hrm_employee is a table name. SELECT COLUMN_NAME ‘Column Name’, DATA_TYPE ‘Data Type’, CHARACTER_MAXIMUM_LENGTH ‘Maximum Length’ FROM information_schema.columns WHERE TABLE_NAME = ‘hrm_employee’
How to view SQL Server error log
The SQL Server error log contains user-defined events and certain system events. You can use this error log to troubleshoot problems related to SQL Server. Step to view SQL Server error log Object Explorer -> Server -> Management -> SQL Server Logs. Right-click a log -> Click View SQL Server Log.
Set a fixed amount of memory in SQL Server (Using SQL Server Management Studio)
Min Server memory and max server memory are two server memory options in SQL Server to configure the amount of memory (in megabytes) in the buffer pool used by an instance. SQL Server can change its memory requirements dynamically by default. But you can configure it based on your system memory. Follow the following steps
Create, Drop, Insert, Update, Delete and Select – The Basic SQL
This topic for those who are very beginner of SQL. Here I will show some basic SQL by Microsoft SQL Server. 1. Create a table: Here I created a table name hrm_employee. Here emp_gid is int type, primary key and identity. Identity means its value will increment automatically by the sql server. You don’t need
How to find the size of all tables in SQL Server database
SQL Server gives you everything its stored procedure sp_spaceused. Unfortunately this SP does not support iterating over all tables in a database, so we needed to leverage another (undocumented) Stored Procedure sp_msForEachTable. SET NOCOUNT ON DBCC UPDATEUSAGE(0) — Find DB size. EXEC sp_spaceused — Create a table to counts row and sizes. CREATE TABLE #tbl