Category: SQL Scripting
-
Full Database Backup Restore
Working as DBA or developer, restoring a database is the request which we get regularly. Restoring a database is easy task if our back file is healthy. Restore a Full Database Backup Below is script which we can use for restore a database from full backup… ——————————————————————– RESTORE DATABASE DB_Name FROM DISK = ‘Location of DB backup file path’ ——————————————————————– But…
//
-
DBA Worries Continued Installation and Configuration L1 DBA Monitoring Performance Tuning SQL Scripting SQL Server
Let’s talk about In memory OLTP
In-memory OLTP frequently referred to by its code name “Hekaton”, was introduced in SQL Server 2014 but it got more popular from SQL Server 2016. This feature was being developed by Microsoft to stay in the game for high speed OLTP transaction speed and recent hardware changes in terms of the cost and throughput. Many…
//
-
SQL Server Info (Inventory)
— SQL Server Info (Inventory) SELECT SERVERPROPERTY(‘ServerName’) AS ServerName, SERVERPROPERTY(‘MachineName’) AS MachineName, CASE WHEN SERVERPROPERTY(‘InstanceName’) IS NULL THEN @@SERVICENAME ELSE SERVERPROPERTY(‘InstanceName’) END AS InstanceName, SUBSTRING ( (SELECT @@VERSION),1, CHARINDEX(‘-‘,(SELECT @@VERSION))-1 ) as ProductName, SERVERPROPERTY(‘ProductVersion’) AS ProductVersion, SERVERPROPERTY(‘ProductLevel’) AS ProductLevel, SERVERPROPERTY(‘ProductMajorVersion’) AS ProductMajorVersion, SERVERPROPERTY(‘ProductMinorVersion’) AS ProductMinorVersion, SERVERPROPERTY(‘ProductBuild’) AS ProductBuild, SERVERPROPERTY(‘Edition’) AS Edition, CASE SERVERPROPERTY(‘EngineEdition’) WHEN 1 THEN ‘PERSONAL’ WHEN 2 THEN ‘STANDARD’ WHEN 3 THEN ‘ENTERPRISE’ WHEN 4 THEN ‘EXPRESS’ WHEN 5 THEN ‘SQL DATABASE’ WHEN 6 THEN ‘SQL DATAWAREHOUSE’ END AS EngineEdition, CASE SERVERPROPERTY(‘IsHadrEnabled’) WHEN 0 THEN ‘The Always On Availability Groups feature is disabled’ WHEN 1 THEN ‘The Always On Availability Groups feature is enabled’ ELSE ‘Not applicable’ END AS HadrEnabled, CASE SERVERPROPERTY(‘HadrManagerStatus’) WHEN 0 THEN ‘Not started, pending communication’ WHEN 1 THEN ‘Started…
//
-
Moving A Table Data Into New Location Within Database
Problem I often getting low disk space alert from one of my data drive. Adding space on the disk was not possible because of hard drive size limitations and barriers at OS max disk space size. So I started looking what can I do for database end and I found there is only one table…
//
-
DBCC (Database Console Command) Commands
It’s a common question of DBA interview. I already have faced millions of time. HaHa Ha. DBCC is a series of statements in Transact-SQL programming language to check the physical and logical consistency of SQL Server database. We can divide in 4 major category or type… DBCC command type… 1. Informational DBCC command 2. Validational DBCC command 3. Maintenance…
//
-
Azure Azure SQL Database Azure SQL Database Backup and Recovery Backup Tools for SQL Server DBA Worries Continued DBMS Concepts DBMS Concepts DBMS Concepts High Availability L1 DBA Monitoring My SQL Performance Tuning PostgreSQL Security SQL Scripting SQL Server
Important SQL Server Scripts…
Restore Progress Check… ========================================================================== DECLARE @DBName VARCHAR(64) = ‘ODS’ DECLARE @ErrorLog AS TABLE([LogDate] CHAR(24), [ProcessInfo] VARCHAR(64), [TEXT] VARCHAR(MAX)) INSERT INTO @ErrorLog EXEC master..sp_readerrorlog 0, 1, ‘Recovery of database’, @DBName INSERT INTO @ErrorLog EXEC master..sp_readerrorlog 0, 1, ‘Recovery completed’, @DBName SELECT TOP 1 @DBName AS [DBName] ,[LogDate] ,CASE WHEN…
//
-
Stored Procedure in a SQL Server-
Hey guys, In this blog, I am going to explain you about stored procedure and how to implement stored procedure in a SQL Server. Stored procedure – Stored procedure in SQL is a group of SQL statements that are stored together in a database. Based on the statements in the procedure and the parameters you pass,…
//
Search
Categories
- Azure (7)
- About Us (1)
- Azure SQL Database (6)
- My SQL (53)
- About Us (1)
- DBMS Concepts (20)
- Handbook (1)
- MySQL Architecture (19)
- MySQL Basics (29)
- MySQL L1 (14)
- Oracle (34)
- PostgreSQL (37)
- About Us (1)
- DBMS Concepts (21)
- PG Hand Book (1)
- pg_ High Availability (4)
- pg_Backup (4)
- pg_basic (11)
- SQL Server (132)
- About Us (1)
- Azure SQL Database (4)
- Backup and Recovery (17)
- Backup Tools for SQL Server (3)
- DBA Worries Continued (27)
- DBMS Concepts (28)
- High Availability (12)
- Installation and Configuration (23)
- L1 DBA (59)
- Monitoring (17)
- Performance Tuning (29)
- Power Shell Script (6)
- Security (12)
- SQL DBA Hand Book (2)
- SQL Scripting (16)
- SQL Server Reporting Services (2)
- Uncategorized (3)