Translate

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

Wednesday, March 10, 2021

Customizing Differential and Transaction Log backups

source: NOVAbackup

In SQL Server, we used Full, Differential and Log backups to support various needs of the database administrators. However, we used to take these backups in a defined frequency without considering the data volume of each backup. 
This article discusses how to customize your backups in order to achieve better maintenance plans for database backups.

Monday, March 4, 2019

Recover from a Data Disaster – Point in Time Recovery Method

This is a fantastic feature in databases but you will not realize how valuable this until you come across this situation. Before describing these features, let us first look at two cases. Incidentally, these two incidents occurred in one organization and moreover for one database but at different times.

Incident #1:  A developer was connected to both production and development instances of databases from one SQL Server Management Studio (SSMS) instance. If you have work with SSMS, you would understand how risky this is. If not, this incident tells you how risky it is. The DBA thinking that she is working on the developer instance has deleted data in a customer table in Production.

Incident #2: In the same organization, they decided to increase the column length to 50 from 15. This column is a critical column to the business. They increased the size of the column using the design view from a table. Guess what, before typing the 0, after removing the 1 the user has saved the designed, which had resulted in truncation of the table column to 5 from 15 with a data loss.

Action: In both cases, we were to help. The first question was “What is the recovery model?” if it is Simple, then nothing that we could do as Simple recovery model does not keep the transaction log history and nothing can be recovered. In these scenarios, the recovery model is Full means that we can recover data to a point of time. In this mechanism, we can recover to a given time. So, we got the full back up of the database and restored to a different database instance with the recovery option on. Then we got a log backup and restored on top of the previously restored database with specifying a time which is just before the disaster recovery. After the database is restored fully, customer table and the other tables were transferred to the production database.

Lesson Learnt:
·         Never connect to multiple databases instances from SSMS. Especially, with production and other database instances.
·         Never use a designer, to modify database schema. Always use scripting for schema design changes.
·         Always, use the Full recovery model for production.

Reference:

https://www.sqlshack.com/point-in-time-recovery-with-sql-server/


PN: Customer identity is hidden and will not be disclosed as per the policy. However, tried to expose technical approaches and tasks.

Tuesday, October 30, 2018

Script to Create and Update Missing SQL Server ColumnStore Indexes

SQL Server columnstore indexes are helpful when it comes to retrieving large volumes of data.  However, there are instances where columns are added to the table after the columnstore index was created. This means the new columns are missing in the columnstore index. Also, there can be cases where new tables are added and a columnstore index was not created.  In this tip we will look at how we can identify these cases and create scripts to create the index.

https://www.mssqltips.com/sqlservertip/5742/script-to-create-and-update-missing-sql-server-columnstore-indexes 


Monday, January 22, 2018

Field Notes on SQL Server Cluster Installation

Something good to note. 

https://gdatatech.blogspot.com/2018/01/field-notes-on-sql-server-cluster.html

Monday, November 20, 2017

SQL Server auditing with Server and Database audit specifications

Auditing is a key feature in any application or any system as it provides end users with better analysis for administrators. Apart from analysis, auditing can be used as a troubleshooting mechanism too. Apart from organizational reasons, there are compliance reasons for enabling auditing depending on the domain of operation.

Read more at https://www.sqlshack.com/sql-server-auditing-server-database-audit-specifications/

Tuesday, May 30, 2017

CAST and TRY_CAST

We always face issues with casting. When we write casting we expect, it to be in required data type. However, often we see there error with CAST when the correct data is not provided. This might cause entire process to fail.


This issue can be avoided in SQL Server 2012 with TRY_CAST.





Wednesday, May 17, 2017

Best Practices for SQL Server Deployment in Healthcare

Though this article is specific about SQL Server security in health care,  we can apply the same principals for other environments as well,

Read more at http://healthitsecurity.com/news/best-practices-for-sql-server-deployment-in-healthcare

Tuesday, November 29, 2016

Redgate Announces New SQL Server Database Cloning Tool

Redgate, a Cambridge-UK based software company that develops SQL Server tools, has launched the beta of its new database cloning tool called SQL Clone that enables databases to be cloned quickly, while saving up to 99% of disk space.
According to the company, the new technology resolves a long-standing issue in software development. Typically, this involves database administrators having to provision a copy of the database for each developer request, which takes up valuable time as well as disk space. The result is that teams end up working on outdated versions of the database in a shared environment, rather than having the freedom to work on isolated local versions that can be created and deleted rapidly.
Read more http://www.dbta.com/Editorial/News-Flashes/Redgate-Announces-New-SQL-Server-Database-Cloning-Tool-114985.aspx

Friday, December 11, 2015

Additional Controls for SSIS

COZYROC is the leading company providing advanced Microsoft SQL Server 2005-2014 Integration Services (SSIS) library of custom tasks, components and scripts for handling Zip, GZip, BZip2, Tar archives, enhanced script reuse and secure internet communications.





Details can be found at http://www.cozyroc.com/products

Saturday, September 5, 2015

Saturday, August 15, 2015

SS SLUG August 2015 Meet-up

Wednesday,August,19

SS SLUG August 2015 Meet-up

  • 11th Floor, DHPL Building
    No. 42 Nawam Mawatha
    Colombo 00200, Sri Lanka

    (map)
  • 18:00 - 20:30 (UTC+05:30) Sri Jayawardenepura
  • Language: English

We're back after a month's hiatus. We're sorry that we couldn't hold a meet-up last month. This month we've got two exciting sessions lined up for you...

Sessions:
SQL Server Full Text Search
Ravin Perera, Tech Lead Geveo Australasia

Natural text-search capabilities are a must in modern applications. As SQL Server developers, what are the technologies we can use to provide search-engine-like features in our applciations? "Lucene.Net" is very popular, but comes with a huge integration and administrative overhead. In this session we'll explore the SQL Server built-in Full-Text Search feature which allows developers to fulfill most of the common natural text search needs with zero management overhead. You can integrate natural text-serach capabilities into your databases right away!

About Ravin:
Ravin is a Microsoft certified developer and certified scrum master, who has worked on various types of projects. Connect with Ravin on LinkedIn and Facebook (https://lk.linkedin.com/pub/ravin-perera/2b/466/61b|https://www.facebook.com/ravinsp)

Data Mining: Microsoft Time Series
Dinesh Asanka, Senior Database Specialist Pearson Lanka

Continuing with his data mining series, Dinesh joins us with the Microsoft Time Series algorithm. This algorithm provides regression algorithms that are optimized for the forecasting of continuous values, such as product sales, over time. Learn how to predict trends based on the original data set and add new data to the model and automatically use this data in your analysis.

About Dinesh:
Dinesh is a SQL Server MVP and a long time database enthusiast, and has been contributing to the database community for several years through his blog, technical forums and various speaking engagements. He is also a visiting lecturer at the Sri Lanka Institute of Information Technology

Thursday, August 13, 2015

Dealing with an Inherited SQL Server

If you work with SQL Server you’ve most likely been there at one time or another. Maybe you’ve just started a new job, or you might be a Windows administrator who has been tasked to manage SQL Server, or you might be a consultant who has been brought in to deal with a specific problem.  The end result is that you wind up working with a SQL Server instance and one or more databases that you know nothing about.

More at http://sqlmag.com/sql-server/dealing-inherited-sql-server

Friday, June 19, 2015

26 free helpful tips for SQL Server monitoring

Have you ever been caught out by a performance problem with SQL Server? Do you want to start monitoring your databases, but aren’t sure where to start? Do you need to know which problems to look for – and how to spot them?

Then this series of 26 free tips is for you - it covers every aspect of SQL Server monitoring, including CPU, IO, memory, backups, tuning, capacity planning, and common errors.

Plus, when you sign up, you get a free copy of our 30-page guide, 8 Steps to Effective SQL Server Monitoring.

And, if you're ready to start monitoring right away, grab a free trial of SQL Monitor, our web-based monitoring and alerting tool, for insights into your servers' performance right out of the box.

1. Sign up for 26 free helpful tips on SQL Server monitoring

SQL Server Backup and Restore cover
  • Free email series with 26 free tips, ideas, and articles on SQL Server performance monitoring
  • Includes worked examples, practical advice, and covers the hows and whys of SQL Server monitoring
  • Plus, get a free copy of Eight Steps to Effective SQL Server Monitoring when you sign up

2. Start monitoring today with a free trial of SQL Monitor for real-time monitoring and alerting

SQL Monitor box
  • Real-time SQL Server performance data and alerts
  • Built with advice from SQL Server experts and MVPs
  • See your servers' top 10 most expensive queries
  • Automatically plot performance baselines
  • Discover problems before anyone else notices

Sign up now and get a free copy of 8 Steps to Effective SQL Server Monitoring, a 30-page guide to the basics

Tuesday, June 16, 2015

How to Load Data From PDF file in SSIS

This is the question some one asked today. I haven’t done this but I can remember I read this some where. So thought of digging this today.

Some forums are suggesting a product.

http://www.datawatch.com/monarch-is-back/

Out of the box, Datawatch Monarch can work with a wide range of report formats including PDF, XML, HTML, text, spool and ASCII files. Access data from invoices, sales reports, balance sheets, customer lists, inventory, logs and more. The system is easy to use, allowing you to quickly select a file and automatically convert it into structured data for analysis.

Following blog includes how to import several types to SQL Server.

http://sqlage.blogspot.com/2013/12/ssis-how-to-import-files-text-pdf-excel.html

Following blogspot also have lot of links

http://www.forumarray.com/ssis-data-flow-source-component-to-read-a-pdf-file-226359

Following blog is the most relevant one for me. http://sql31.blogspot.com/2013/03/how-to-load-data-from-pdf-file-in-ssis.html

This users script task and you have the option of customizing it.

Thursday, June 4, 2015

How to Dramatically Decrease Data Warehouse Load Times with Memory-Optimized Tables

Nice article on Memory Optimized tables in Data warehousing.
Read more at http://sqlmag.com/sql-server-integration-services/how-dramatically-decrease-data-warehouse-load-times-memory-optimized

Wednesday, May 27, 2015

Shopping Basket Analysis in SQL Server

A famous super market chain in USA once observed that men who are buying beer for weekend tend to buy nappies for their kids. This revelation enabled the chain in increase sales volume and revenue by placing the items in close proximity to each other. An alternative approach would have been to move the items apart to encourage store exploration.
Read how to improve your sales using shopping basket analysis.

http://www.sql-server-performance.com/2015/shopping-basket-analysis-sql-server/

Monday, May 18, 2015

Microsoft Releases New Version of SP1 for SQL Server 2014

The much-troubled Service Pack 1 for SQL Server 2014 has its latest revision, and allegedly resolves significant problems that made SQL stop working for numerous customers.

The service pack originally was originally released last month, but Microsoft pulled it on that same month because of an installation problem. The updated SP1 (build 12.0.4100.1) is now available at this download page, dated 5/14/2015.

More at https://virtualizationreview.com/articles/2015/05/18/microsoft-releases-new-version-of-sp1-for-sql-server-2014.aspx

Sunday, May 17, 2015

Wednesday, May 13, 2015

SQL Server Internals: In-Memory OLTP

Free eBook: SQL Server Internals: In-Memory OLTP

SQL Server Backup and Restore cover
  • See how the new In-memory OLTP engine works
  • Learn how to use lock- and latch-free data structures to allow non-blocking data processing
  • Find out how to migrate existing tables to Hekaton

http://www.red-gate.com/products/sql-development/sql-compare/entrypage/sql-server-internals?utm_source=ssc&utm_medium=publink&utm_campaign=books&utm_content=hekaton_ebook&utm_term=freeebook

Wednesday, May 6, 2015

Changing the SSRS Subscription Owner

When subscriptions are created, owner of that subscription will be the user who creates it. However, when that user account is disabled, subscriptions will be failed and there is no way from the user interface to change it. However these subscriptions are stored in subscriptions table of ReportServer database (default database of the SSRS. This may be different if you have changed it from the SSRS configuration manager). In the subscription table, user id is stored as a unique identifier which you should get from the users table. Update query is shown below.

USE ReportServer

GO

DECLARE @OldUserID uniqueidentifier

DECLARE @NewUserID uniqueidentifier

SELECT @OldUserID = UserID FROM dbo.Users WHERE UserName = 'DOMAIN\previous_user'

SELECT @NewUserID = UserID FROM dbo.Users WHERE UserName = 'DOMAIN \ new_user’

UPDATE dbo.Subscriptions SET OwnerID = @NewUserID WHERE OwnerID = @OldUserID

No restart is of SSRS or SQL Server services are required. Soon after you update the userids subscriptions will start to work.