SQLCMD utility to connect SQL Server using command line

Is it possible to connect SQL server with some other tools ? Answer is yes, SQLCMD is the command line tool used to connect SQL Server. SQLCMD – Simple tool to execute t-sql statment, stored procedures and DML operations. SQLCMD works same as SSMS but without GUI, means you can do all stuff that you ...

SQL Server – How to load flat file into table – Using BULK INSERT

SQL Server – How to load flat file into table – Using BULK INSERT Begin DBA, you gets request to load flat file data in sql server table, This is small example of loading flat file or comma separated file data into table using BULK INSERT method. We will create dummy flat file or csv  ...

SQL Server – Database Endpoint not working after server restart

Issue : After window server restarted database mirroring is stop working, Mirroring endpoint was broken and getting connection handshake failed. Troubleshooting checklist Checked SQL Server error log on principal server Database Mirroring login attempt failed with error: ‘Connection handshake failed. The certificate used by this endpoint was not found: Certificate expired. Use DBCC CHECKDB in ...

SQL Server – Configure tempdb to improve performance

How to Configure TempDB to improve performance As best practice, you should create multiple copy of tempdb data files matching to number of logical processors to reduce tempdb contention problem also advise to maintain same in size, you can use trace flag 1117 to keep data file in same size. Maximum number of tempdb data ...

Install Upgrade advisor 2014 – Before database upgrade

Database upgrade – Install Upgrade Advisor SQL Server upgrade Advisor tool helps you to analyze sql server component installed in your environment before upgrading to next version of SQL Server also generates the report that helps you to identify the issues in existing environment that can be fix either before or after upgrade. Prerequisites for ...

SQL Server – Create table statement and sql syntax

Database table is used to store data in column and rows format. Each table has its own name. Create Table Statement Using create table sql statement you can create a table inside your database. Note: Maximum number of column in table is 1024 CREATE TABLE table_name ( column_name datatype(size), column_name datatype(size), column_name datatype(size)…. ) Here, ...

SQL Server Date functions – How to use in query

SQL Server Date Functions While working with SQL Server Date function and to keep it simple, make sure that date column does not have time portion. Whenever you insert date in table verify that datatype of column should match with date format. SQL Server Functions helps you to convert date and time values to other date ...

SQL Introduction and basics

In simple terms, SQL is standard that is use to access database and for modifying data in the database. SQL introduction SQL is Structured Query Language, it allows to access data inside database. SQL follows an ANSI standard (American national standards institute). SQL lets you to communicate with database and using SQL you can Execute ...

SQL Server Database Audit feature in SQL SERVER 2014

Microsoft introduced audit feature in sql server 2008 which includes server and database level auditing. You can capture database objects, database level changes, lets say somebody deleted some records from your critical database, Bingo … means somebody is having DELETE permission on prod server apart from DBA, living in DANGER. As DBA we don’t allow ...

SQL Server 2014 – How to Create Memory Optimized table

In eariler post, you have learned how to use In-Memory OLTP Feature of SQL Server 2014 for your database. Here we will learn how to create memory optimized table in SQL Server 2014. Creating Memory is very simple similar to normal table. How to Create Memory Optimized table In Memory OLTP ? We will follow the step by ...