Showing posts with label SQL Server 2012. Show all posts
Showing posts with label SQL Server 2012. Show all posts

Friday 20 June 2014

SQL Server 2008 Extended Events SSMS Addin

 

Project Description
SQL 2008 Extended Events are a powerful new way of troubleshooting problems with SQL Server. One short coming is that there is no UI support for this new feature. The Extended Events Manager is a SSMS Addin to bridge this gap.
Originally an external application, this project has undergone numerous updates to get it to the point where it is now a SSMS Addin that integrates directly into Management Studio. The latest build of the external application is still available for download, but all new development efforts will target the SSMS Addin only.
Functionality:
  • View Extended Events Metadata for all Available Objects
  • View Event Sessions on a Server
  • Start/Stop Events Sessions
  • Create new Event Sessions
  • Alter existing Event Sessions
  • Drop Event Session
  • Script all operations
  • View information stored in targets for active Event Sessions
  • Configurable UI options that add flexibility to the application.
    • Ability to set Defaults to override the Library Event Session Options Defaults.
    • Provide options for Warnings on certain Events like Dropping an Active Event Session.
Coming Attractions
  • Add Predicate value and Target Option value validation to ensure that input values are compatible by datatype with the objects value datatype.
  • Convert GridViews to function closer to SSMS PBM Condition Grid.
SQL Server 2008 Extended Events Manager Current Bug List:

No currently known bugs exist. If you happen upon a bug, please log it in the Issue Tracker for this Project. All future bugs will be tracked through this tool only.
If you have a request for a feature, please open a discussion or a Issue in the Issue Tracker so that the request can be considered for inclusion in the project. A number of the most recent changes have been based on feedback that has been received from people regarding the tool and how it could be better. Many thanks go out to Adam Machanic for all of his recommendations and beta testing, without which the current state of the application would not exist.

http://extendedeventmanager.codeplex.com/

Friday 3 January 2014

SQL Server 2012 FileTable

In a series of blog posts we will have a look at the new SQL Server 2012 table type called FileTable. This first blog post will be a simple getting started – how to create a FileTable and how to dump files into the folder and do some simple file manipulation.
A SQL Server FileTable is a special table where you can store directory and files – that’s not special I know, the special thing is that you can access these files and directories from windows applications as if they were stored in the file system.The data stored in the FileTable is exposed to windows through a windows share, and via this share it is possible to gain non-transactional access to the data.If you create or change a file through the windows share the command is intercepted by a SQL Server component and the changes are applied to the corresponding data in the FileTable.
Let’s create a demo database with a FILESTREAM filegroup, I’ll be setting the NON_TRANSACTED_ACCESS to FULL this gives me full non-transactional access to the share, this option can be changed later if you want to do that. Here is the code:
    CREATE DATABASE FileTableDB
    ON  PRIMARY  
    (  
        NAME = N'FileTableDB',  
        FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\DATA\FileTableDB.mdf'  
    ),  
    FILEGROUP FilestreamFG CONTAINS FILESTREAM      
    (  
        NAME = MyFileStreamData,  
        FILENAME= 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\DATA\Data'  
    )  
    LOG ON  
    (  
        NAME = N'MyFileTableTest_Log',  
        FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.SQL2012\MSSQL\DATA\FileTableDB_log.ldf'  
    )  
    WITH FILESTREAM  
    (  
        NON_TRANSACTED_ACCESS = FULL,  
        DIRECTORY_NAME = N'FileTable'  
    )  



That’s the database done, now let’s create the magic table – that is simple done with the “AS FileTable” keyword. When creating a FileTable there is only two options that you can change, everything else is out of the box. Let’s have a look at how I created the table:
    USE FileTableDB  
    GO
      
    CREATE TABLE MyDocumentStore AS FileTable  
    WITH  
    (  
        FileTable_Directory = 'FileTableDB',  
        FileTable_Collate_Filename = database_default  
    );  
    GO  



If we take a look at the GUI after creating the table, we can see that the table is created under the new folder called FileTables

image



that is not the only new thing, if we right click at the table that we just created we will see an option called “Explore FileTable Directory” – click that and a windows opens with the content of your FileTable. If you drop a file into this folder it will be accessible from SSMS, with a simple SELECT from the MyDocumentStore.

Here is how the folder looks:

image

And if you query the table you get the following: (This query only shows a few of the columns off the table)

image

Now you can do file manipulation with SSMS, something like renaming the files is just an update statement.

Thursday 24 October 2013

Microsoft SQL Server 2012


Consider Windows Server 2012 for SQL Server installations.
Here are some important reasons to consider Windows Server 8 as the operating system of your next SQL Server installations.

Contained Databases in SQL Server 2012.
It is a new feature in SQL Server 2012 that makes easier to move databases between instances of SQL Server.

Expired Evaluation Edition / Product Key Change.
Learn what to do when the evaluation period for your SQL Server 2012 expires or what to do to change the product key of a SQL Server instance.

Fourteen New Transact-SQL Functions and One Improved.

SQL Server 2012 brings fourteen new T-SQL functions and improved another one.

How to install SQL Server 2012.

Learn how to install a standalone instance of SQL Server 2012. Resources, recommendations, software requirements and hardware requirements, common error messages, step-by-step installation procedure.

How to Install SQL Server 2012 on Windows Server Core.
SQL Server can now be installed on Windows Server Core.

How to use Product Updates on SQL Server 2012.
Learn how to integrate the original SQL Server 2012 media with a cumulative update, a service pack, or both at the same time.

Migrating SQL Server databases to Azure using SSMS 2012.
Learn how to migrate SQL Server databases to a Windows Azure Database Server using SQL Server Management Studio 2012.

New User-defined Server Roles.
Starting SQL Server 2012, user-defined server roles can be created and configured with specific permissions as required by the business needs.

Startup Parameters Tab.
SQL Server 2012 brings a new and easy way to configure startup options for the database engine.

Restore - Timeline.
When a point-in-time restore is needed on SQL Server 2012, open the "Restore Database" dialog, and click on the "Timeline" button.

Using Offset and Fetch with the Order By Clause.

Using the Offset and Fetch arguments of the Order By clause to implement a query page solution.

What is LocalDB?
What is SQL Server 2012 Express LocalDB RC0?

 

What SQL Server components or features are installed?

Use the Discovery Report that is located on the SQL Server Installation Center.

WITH RESULT SETS option.
You can use the WITH RESULT SETS option when you want to execute a stored procedure and would like to change or override the result set returned by the stored procedure.

Thursday 27 June 2013

How to start SQL Server in single user mode : SQL Server 2012

Through GUI
If there is a requirement to start SQL Server in single user mode, do following steps
  • Open SQL Server configuration Manager from SQL Server 2008 à Configuration Tool
  • Browse SQL Server Services
  • Open SQL Server Service properties from Right click on particular instance service
  • Go to Advance tab
  • Modify the startup parameter and put –m; at the starting of Value like below image
image
  • Click Apply and Click OK.
  • And then start SQL Server instance service.
  • SQL Server instance will be started in single user mode.
Through Command Line
Execute below command through command line and that will start SQL Server in Single User Mode
Default instance
sqlservr.exe -m

With Instance Name
sqlservr.exe -m -s <Instance Name>


Azure AzCopy Command in Action

Azure AzCopy Command  in Action -  Install - Module - Name Az - Scope CurrentUser - Repository PSGallery - Force # This simple PowerShell ...