SQL SERVER – Copy Database – SQL in Sixty Seconds #067

There are multiple reasons why a user may want to make a copy of the database. Sometimes a user wants to copy the database to the same server and sometime wants to copy the database on a different server. The important point is that DBA and Developer may want copies of their database for various purposes. I copy my database for backup purpose. However, when we hear coping database – the very first thought which comes to our mind is – Backup and Restore or Attach and Detach. Both of these processes have their own advantage and disadvantages. The matter of the fact, those methods is much efficient and recommended methods.

However, if you just want to copy your database as it is and do not want to go for advanced feature. You can just use the copy feature of the SQL Server. Here are the settings, which you can use to copy the database.

SQL in Sixty Seconds Video

I have attempted to explain the same subject in simple words over in following video.

Action Item

Here are the blog posts I have previously written on the subject of SA password. You can read it over here:

You can subscribe to my YouTube Channel for frequent updates.

Reference: Pinal Dave (http://blog.sqlauthority.com)

About these ads

SQLAuthority News – Download Whitepaper – A Case Study on “Hekaton” against RPM – SQL Server 2014 CTP1

In this new world of social media, apps and mobile devices, we are all now getting impatient. Automatic updates have spoiled few of our habits. When a new feature is released everybody wants to immediately adopt the feature and start using it. Though this is true in the world of apps and smart phones, but it is still not possible in the developer’s world. When new features are around, before we start using it, we need to spend quite a lots of time to understand it and test it. Once we are sold on the feature we refer the feature to our manager and eventually the entire organization makes decisions on upgrading to use the new feature.

Similarly, when the new feature of In-Memory OLTP was announced, pretty much every SQL Server DBA wanted to implement that on their server. Through the implementation of the feature is not hard, it is not that easy as well. One has to do proper research about their own environment and workload before implementing this feature.

Microsoft has recently released a Case Study on In-Memory OLTP feature. Here is the abstract from the white paper itself.

I/O latch can cause session delays that impact application performance. This white paper describes the procedures and common I/O latch issues when migrating to Hekaton in SQL Server 2014. It also includes challenges that occurred during the migration and the performance analysis at different stages. 

If you are going to implement In-Memory OLTP database, this is a good case study to refer. Download white paper from here.

Reference: Pinal Dave (http://blog.sqlauthority.com)

SQLAuthority News – Presented Soft Skill Session on Presentation Skills at SQL Bangalore on May 3, 2014

I have presented on various database technologies for almost 10 years now. SQL, Database and NoSQL have been part of my life. Earlier this month, I had the opportunity to present on the topic Performing an Effective Presentation. I must say it was blast to prepare as well as present this session. This event was part of the SQL Bangalore community. If you are in Bangalore, you must be part of this group.

SQL Bangalore is a wonderful community and we always have a great response when we present on technology. It is SQL User Group and we discuss everything SQL there. This month we had SQL Server 2014 theme and we had a community launch of SQL Server. We have the best of the best speakers presenting on SQL Server 2014 technology. The event had amazing speakers and each of them did justice to the subject. You can read about this over here.

In this session I told a story from my life. I talked about who inspired me and how I learned to speak in public. I told stories about two legends  who have inspired me. There is no video recording of this session. If you want to get resources from this session, please sign up my newsletter at http://bit.ly/sqllearn.

Well, I had a great time at this event. We had over 250 people showed up at this event and had a grand  time together. I personally enjoyed a session of Amit Benerjee, Balmukund Lakhani and Vinod Kumar. Ken and Surabh also entertained the audience. Overall, this was a grand event and if you were in Bangalore and did not make it to this event. You did miss out on a few things.

Here are a few photos of this event.

SQL Bangalore UG Nupur, Chandra, Shaivi, Balmukund, Amit, Vinod

[captions This]

SQL Bangalore UG Audience

Pinal Dave presenting at SQL UG in Bangalore

Here are few of the slides from this presentation:

Reference: Pinal Dave (http://blog.sqlauthority.com)

SQL SERVER – Reset SA Password – SQL in Sixty Seconds #066

It has been quite a long time since I posted SQL in Sixty Seconds Video. Here we are back with the new video.

One of the most popular question, I often receive is very similar to following:

“How do I reset the password for SA username?”

“I have forgotten the SA password, what should I do?”

“Our DBA just left the job and now noone knows how to reset the SA password. Please help.”

Solution

Honestly, it is pretty simple to reset the password for SA username. You just have to login to the system where your SQL Server is installed. Open SQL Server Management Studio and login with the help of Windows Authentication. As local system is the admin of the SQL Server, you will get access with administration privileges. Now, open the database, expand Security >> Login folder and right click over SA username. Now, it will bring up the screen where you can change the password for SA.

SQL in Sixty Seconds Video

I have attempted to explain the same subject in simple words over in following video.

Action Item

Here are the blog posts I have previously written on the subject of SA password. You can read it over here:

You can subscribe to my YouTube Channel for frequent updates.

Reference: Pinal Dave (http://blog.sqlauthority.com)

SQLAuthority News – Great Time Spent at Great Indian Developers Summit 2014

The Great Indian Developer Conference (GIDS) is one of the most popular annual event held in Bangalore. This year GIDS is scheduled on April 22, 25. I will be presented total four sessions at this event and each session is very different from each other. Here are the details of four of my sessions, which I presented there.

Pluralsight Shades

This event was a great event and I had fantastic fun presenting a technology over here. I was indeed very excited that along with me, I had many of my friends presenting at the event as well. I want to thank all of you to attend my session and having standing room every single time. I have already sent resources in my newsletter. You can sign up for the newsletter over here.

Indexing is an Art

I was amazed with the crowd present in the sessions at GIDS. There was a great interest in the subject of SQL Server and Performance Tuning.

Audience at GIDS

I believe event like such provides a great platform to meet and share knowledge.

Pinal at Pluralsight Booth

Here are the abstract of the sessions which I had presented. They were recorded so at some point in time they will be available, but if you want the content of all the courses immediately, I suggest you check out my video courses on the same subject on Pluralsight.

Indexes, the Unsung Hero

Relevant Pluralsight Course

Slow Running Queries are the most common problem that developers face while working with SQL Server. While it is easy to blame SQL Server for unsatisfactory performance, the issue often persists with the way queries have been written, and how Indexes has been set up. The session will focus on the ways of identifying problems that slow down SQL Server, and Indexing tricks to fix them. Developers will walk out with scripts and knowledge that can be applied to their servers, immediately post the session.

Indexes are the most crucial objects of the database. They are the first stop for any DBA and Developer when it is about performance tuning. There is a good side as well evil side to indexes. To master the art of performance tuning one has to understand the fundamentals of indexes and the best practices associated with the same. We will cover various aspects of Indexing such as Duplicate Index, Redundant Index, Missing Index as well as best practices around Indexes.

SQL Server Performance Troubleshooting: Ancient Problems and Modern Solutions

Relevant Pluralsight Course

Many believe Performance Tuning and Troubleshooting is an art which has been lost in time. However, truth is that art has evolved with time and there are more tools and techniques to overcome ancient troublesome scenarios. There are three major resources that when bottlenecked creates performance problems: CPU, IO, and Memory. In this session we will focus on High CPU scenarios detection and their resolutions. If time permits we will cover other performance related tips and tricks.
At the end of this session, attendees will have a clear idea as well as action items regarding what to do when facing any of the above resource intensive scenarios. Developers will walk out with scripts and knowledge that can be applied to their servers, immediately post the session. To master the art of performance tuning one has to understand the fundamentals of performance, tuning and the best practices associated with the same. We will discuss about performance tuning in this session with the help of Demos.

Pinal Dave at GIDS

MySQL Performance Tuning – Unexplored Territory

Relevant Pluralsight Course

Performance is one of the most essential aspects of any application. Everyone wants their server to perform optimally and at the best efficiency. However, not many people talk about MySQL and Performance Tuning as it is an extremely unexplored territory. In this session, we will talk about how we can tune MySQL Performance. We will also try and cover other performance related tips and tricks. At the end of this session, attendees will not only have a clear idea, but also carry home action items regarding what to do when facing any of the above resource intensive scenarios. Developers will walk out with scripts and knowledge that can be applied to their servers, immediately post the session. To master the art of performance tuning one has to understand the fundamentals of performance, tuning and the best practices associated with the same. You will also witness some impressive performance tuning demos in this session.

Hidden Secrets and Gems of SQL Server We Bet You Never Knew

Relevant Pluralsight Course

SQL Trio Session!

It really amazes us every time when someone says SQL Server is an easy tool to handle and work with. Microsoft has done an amazing work in making working with complex relational database a breeze for developers and administrators alike. Though it looks like child’s play for some, the realities are far away from this notion. The basics and fundamentals though are simple and uniform across databases, the behavior and understanding the nuts and bolts of SQL Server is something we need to master over a period of time.

With a collective experience of more than 30+ years amongst the speakers on databases, we will try to take a unique tour of various aspects of SQL Server and bring to you life lessons learnt from working with SQL Server. We will share some of the trade secrets of performance, configuration, new features, tuning, behaviors, T-SQL practices, common pitfalls, productivity tips on tools and more.

This is a highly demo filled session for practical use if you are a SQL Server developer or an Administrator. The speakers will be able to stump you and give you answers on almost everything inside the Relational database called SQL Server.

I personally attended the session of Vinod Kumar, Balmukund Lakhani, Abhishek Kumar and my favorite Govind Kanshi.

Summary

If you have missed this event here are two action items 1) Sign up for Resource Newsletter 2) Watch my video courses on Pluralsight

Reference: Pinal Dave (http://blog.sqlauthority.com)

SQL Authority News – Download Microsoft SQL Server 2014 Feature Pack and Microsoft SQL Server Developer’s Edition

Yesterday I attended the SQL Server Community Launch in Bangalore and presented on Performing an effective Presentation. It was a fun presentation and people very well received it. No matter on what subject, I present, I always end up talking about SQL. Here are two of the questions I had received during the event.

Q1) I want to install SQL Server on my development server, where can we get it for free or at an economical price (I do not have MSDN)?

A1) If you are not going to use your server in a production environment, you can just get SQL Server Developer’s Edition and you can read more about it over here.

Here is another favorite question which I keep on receiving it during the event.

Q2) I already have SQL Server installed on my machine, what are different feature pack should I install and where can I get them from.

A2) Just download and install Microsoft SQL Server 2014 Service Pack. Here is the link for downloading it.

The Microsoft SQL Server 2014 Feature Pack is a collection of stand-alone packages which provide additional value for Microsoft SQL Server. It includes tool and components for Microsoft SQL Server 2014 and add-on providers for Microsoft SQL Server 2014. Here is the list of component this product contains:

  • Microsoft SQL Server Backup to Windows Azure Tool
  • Microsoft SQL Server Cloud Adapter
  • Microsoft Kerberos Configuration Manager for Microsoft SQL Server
  • Microsoft SQL Server 2014 Semantic Language Statistics
  • Microsoft SQL Server Data-Tier Application Framework
  • Microsoft SQL Server 2014 Transact-SQL Language Service
  • Microsoft Windows PowerShell Extensions for Microsoft SQL Server 2014
  • Microsoft SQL Server 2014 Shared Management Objects
  • Microsoft Command Line Utilities 11 for Microsoft SQL Server
  • Microsoft ODBC Driver 11 for Microsoft SQL Server – Windows
  • Microsoft JDBC Driver 4.0 for Microsoft SQL Server
  • Microsoft Drivers 3.0 for PHP for Microsoft SQL Server
  • Microsoft SQL Server 2014 Transact-SQL ScriptDom
  • Microsoft SQL Server 2014 Transact-SQL Compiler Service
  • Microsoft System CLR Types for Microsoft SQL Server 2014
  • Microsoft SQL Server 2014 Remote Blob Store
  • SQL RBS codeplex samples page
  • SQL Server Remote Blob Store blogs
  • Microsoft SQL Server Service Broker External Activator for Microsoft SQL Server 2014
  • Microsoft OData Source for Microsoft SQL Server 2014
  • Microsoft Balanced Data Distributor for Microsoft SQL Server 2014
  • Microsoft Change Data Capture Designer and Service for Oracle by Attunity for Microsoft SQL Server 2014
  • Microsoft SQL Server 2014 Master Data Service Add-in for Microsoft Excel
  • Microsoft SQL Server StreamInsight
  • Microsoft Connector for SAP BW for Microsoft SQL Server 2014
  • Microsoft SQL Server Migration Assistant
  • Microsoft SQL Server 2014 Upgrade Advisor
  • Microsoft OLEDB Provider for DB2 v5.0 for Microsoft SQL Server 2014
  • Microsoft SQL Server 2014 PowerPivot for Microsoft SharePoint 2013
  • Microsoft SQL Server 2014 ADOMD.NET
  • Microsoft Analysis Services OLE DB Provider for Microsoft SQL Server 2014
  • Microsoft SQL Server 2014 Analysis Management Objects
  • Microsoft SQL Server Report Builder for Microsoft SQL Server 2014
  • Microsoft SQL Server 2014 Reporting Services Add-in for Microsoft SharePoint

Reference: Pinal Dave (http://blog.sqlauthority.com)

SQLAuthority News – Microsoft Whitepaper – Idle Connection Resiliency

Developers can write data access application that enables ideal connection resiliency with the .NET framework. An idle connection is the one that is active but it’s not executing a command or waiting for data. It is very important to understand how idle connection is reconnecting back in the .NET framework with SQL Server. This white paper actually discusses the same in very simple works. The user has to connect either to a SQL Server 2014 or Microsoft Azure, SQL Database to enable idle connection resiliency.

Here is a very interesting example in the of the idle connection resiliency provided in the Overview section of the Whitepaper.

Let’s imagine that you are a roaming worker that needs to use an Access application to connect to SQL Server.  When you need to move from meeting to meeting, you normally close your notebook’s lid in order to move.  In working online, every time this happens, you may end up disconnected either because your notebooks sleep or due to blind wireless spots in your building.  To avoid the hassle of being disconnected, you may choose to avoid certain places (like elevators, for example) and walk with your notebook’s lid open. Now, imagine if you can close your lid and walk anywhere in your building (even take the elevator) and just arrive to your next meeting, open your lid and find your work there, waiting for you to continue.  To  address this and other scenarios when an idle connection drops, SQL Server introduced a new feature called Idle Connection Resiliency.

Well, that’s it. This white paper describes the internal working of the Idle Connection Resiliency. It further discusses about the Client’s idle connection, reconnect logic, Client session state handling and replay logic, Non-recoverable session states, and General Considerations.

Click here to read the white paper on Idle Connection Resiliency.

Reference: Pinal Dave (http://blog.SQLAuthority.com)