Home » SQL Server » Page 2

SQL Server

sql server DBA 999

Microsoft SQL Server Error: 53 or Microsoft SQL Server Error: 11001 or SQL Server error 53 and 40. SQL server error 53 and 17

Microsoft SQL Server Error: 53 or Microsoft SQL Server Error: 11001 or or SQL Server error 53 and 40. SQL server error 53 and 17

Details of Error:

Can not connect to SQL Server error which can be Error Number: 11001 or Error Number:53, Severity: 20, State: 0 or SQL Server error 53 and 40. SQL server error 53 and 17

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

Connection failed
SQL State '01000'
SQL Server error 53
[microsoft][ODBC SQL Server Driver][DBNETLIB]Connection Open
Connection
Read the rest

sql server DBA 999

SQL Server Memory & Storage Technology

SQL Server- Understanding Server Storage Technology Explained

First we need to understand the different types of memory below

a.Static random access memory (SRAM) comprising L1 and L2 caches for each physical core of a processor,larger but slower shared L3 cache for the entire processor.

b. Dynamic random access memory (DRAM) which also our RAM we install/upgrade in servers.

Both SRAM and DRAM are volatile and hold data only when electrical power is on.

c. SATA/SAS SSD hard drive(NAND)

d. Magnetic spinning media hard disk drives.

Each of Storage/memory above cost lower per MB or GB with higher total capacity as you go from a to d above.

Now New NVM Express PCIe SSD’s (NAND). These … Read the rest

sql server DBA 999

SQL Server 2016 New Features In-Memory OLTP enhancements

SQL Server 2016 New Features In-Memory OLTP enhancements

1. SQL Server In-Memory OLTP – Parallel and heap scan for memory-optimized tables

Memory-optimized tables and indexes in In-memory optimized tables are supported to parallel scan. This improves the performance of queries. Heap scan is also supported which can be performed in parallel which is scanning of all the rows in a table using the in-memory heap data structure used for storing the data.

2. SQL Server In-Memory OLTP -Transact-SQL/TSQL Improvements for memory-optimized tables

a.UNIQUE constraints and indexes are supported.
b.FOREIGN KEY references between memory-optimized tables are supported.
c.CHECK constraints are supported.
d. NULL values are allowed
e.Trigger’s are supported.

3. SQL Server 2016 In-Memory OLTP Storage format is now changed

In-Memory … Read the rest

sql server DBA 999

Setup R Services for SQL Server 2016 Step by Step Explained

Setup R Services for SQL Server 2016 Step by Step Tutorial

Microsoft purchased Revolution Analytics (around 2015) and with that they were able to give R Services which is the most popular open source programming language for advanced analytics of data inside of SQL Server bringing R processing closer to the data..

By adding R processing into SQL Server 2016 which is offered as a new feature that supports enterprise level data services.

What is R (Revolution) Services?

Revolution Analytics (formerly Revolution Computing) is a statistical software company focused on developing open source software for enterprise, academic and analytics customers. Revolution Analytics was founded in 2007. In 2009 the company received nine million in venture capital from Intel along with … Read the rest

sql server DBA 999

SQL Server TSQL Temporary Table

Temp tables in SQL Server: they are just like any normal tables except that they are created in the TempDB database. They persist until dropped, or until the connection that created them disappears. They are visible in the procedure that created them and any procedures that it calls. Just like normal tables and have primary keys, constraints, indexes and column statistics which are kept for the table which makes query execution really fast in most cases. Temp tables can be created in all versions of SQL Server including SQL Server Express Edition.

Temp tables have space assigned to them in the TempDB database and are generally accessed only from memory, unless the server is under memory pressure or the amount … Read the rest

sql server DBA 999

SQL Server 2014 Compared to older versions

 

SQL Server 2014 Compared to older versions

 

 

Features Feature Description SQL Server 2014 SQL Server 2012 SQL Server 2008ÿR2 SQL Server 2008
Performance In-memory OLTP* Yes No No No
In-memory ColumnStore* Yes Yes No No
Buffer pool extension to SSD Yes No No No
Resource Governor Yes Yes Yes Yes
Availability AlwaysOn* Yes Yes No No
Enhanced virtualization support and live migration Yes Yes Yes No
Security Transparent data encryption* Yes Yes Yes Yes
Backup encryption support Yes No No No
Fine-grained auditing Yes Yes Yes Yes
Separation of duties Yes Yes No No
Cloud-readiness Backup to Microsoft Azure Yes Yes No No
Disaster recovery to Microsoft Azure Yes No No No
Optimized VM images in Microsoft
Read the rest
sql server DBA 999

SQL Server 2014 released..New features

SQL Server 2014 released… Let’s discover what’s new in SQL Server 2014 now. There are versions in SQL Server out of which Express version is still free . Download SQL Server from Microsoft Site or your company volume licensing depending on your version you require.

New features will be listed here which are really fantastic….

Note: Database Compatibility Level of 90 compatibility level is not valid in SQL Server 2014.

I will also post some examples of how to use these features in coming days…
Database Engine Feature Enhancements  For more info click here for microsoft site
Memory-Optimized Tables: In-Memory OLTP is a memory-optimized database engine integrated into the SQL Server engine.

Buffer Pool Extension: The Buffer Pool Extension provides … Read the rest

sql server DBA 999

CTE vs Temp Table vs Temp variables

Temp tables: they are just like any normal tables except that they are created in the TempDB database. They persist until dropped, or until the connection that created them disappears. They are visible in the procedure that created them and any procedures that it calls. Just like normal tables and have primary keys, constraints, indexes and column statistics which are kept for the table which makes query execution really fast in most cases.

Temp tables have space assigned to them in the TempDB database and are generally accessed only from memory, unless the server is under memory pressure or the amount of data in the table is large.

Table Variables: These tables behave very much like other variables in their … Read the rest

sql server DBA 999

Adding Data Collectors on SQL Server 2008/2008 R2/2012/2014/2016

Adding SQL Server Data Collectors to SQL Server is very important for Troublshooting issues and Root cause analysis of many issues normally occuring on SQL Servers.

These counters are helpful for both Virtual or Physical SQL Servers. They are available in all versions like sql server 2008 data collector, sql server 2012 data collector, sql server 2014 data collector

    The Counters related to SQL Instance which are really important are:


SQLServer:Access MethodsFreeSpace Scans/sec
SQLServer:Access MethodsFull Scans/sec
SQLServer:Access MethodsIndex Searches/sec
SQLServer:Access MethodsPages Allocated/sec
SQLServer:Access MethodsWorkfiles Created/sec
SQLServer:Access MethodsWorktables Created/sec
SQLServer:Buffer ManagerBuffer cache hit ratio
SQLServer:Buffer ManagerCheckpoint pages/sec
SQLServer:Buffer ManagerDatabase pages
SQLServer:Buffer ManagerFree list stalls/sec
SQLServer:Buffer ManagerFree pages
SQLServer:Buffer ManagerLazy writes/sec
SQLServer:Buffer ManagerPage life expectancy
SQLServer:Buffer ManagerReadahead pages/sec
SQLServer:Buffer ManagerReserved pages
SQLServer:Buffer
Read the rest

sql server DBA 999

Active Connections to SQL Server Database 2008, 2005 by Application or User

To Check Active Connections to SQL Server Database grouped by User

Below query is very helpful in finding the Total CPU usage, Waiting Time, Elapsed Time, Number of Reads, Number of Writes, connections grouped by Login name related which are active in SQL Server Database.

To check Active Connections to SQL Server Database grouped by Login name


SELECT SUM(s.cpu_time) AS CPU,
SUM(s.total_scheduled_time) AS WaitTime,
SUM(s.total_elapsed_time) AS ElapsedTime,
SUM(c.num_reads) AS Reads,
SUM(c.num_writes) AS Writes,
COUNT(1) AS Connections,
s.original_login_name AS login
FROM sys.dm_exec_connections AS c
LEFT OUTER JOIN sys.dm_exec_sessions AS s
ON s.session_id = c.session_id
GROUP BY s.original_login_name

Below query is very helpful in finding the Total CPU usage, Waiting Time, Elapsed Time, Number of Reads, Number of Writes, connections Grouped by

Read the rest