Translate
Wednesday, March 10, 2021
Customizing Differential and Transaction Log backups
Monday, March 4, 2019
Recover from a Data Disaster – Point in Time Recovery Method
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
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
Monday, November 20, 2017
SQL Server auditing with Server and Database audit specifications
Read more at https://www.sqlshack.com/sql-server-auditing-server-database-audit-specifications/
Tuesday, May 30, 2017
CAST and TRY_CAST
Wednesday, May 17, 2017
Best Practices for SQL Server Deployment in Healthcare
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
Friday, December 11, 2015
Additional Controls for SSIS
Details can be found at http://www.cozyroc.com/products
Saturday, September 5, 2015
24 hours of SQLPass is coming
24 hours of SQL Pass is happening on Sept 17 & 18th. These are short little 1-hour web casts, but may be of interest to someone. Registration is FREEEEEEEE!!!
Link to sessions:
http://www.sqlpass.org/24hours/2015/summitpreview/Schedule.aspx
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
- 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
- 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
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
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.
Sunday, May 17, 2015
How To Remove the Identity Column in SQL Server
Setting the identity property on a table when it is created is a simple task. The below snippet will create table called SampleTable with ID column which has an identity property.
Read http://www.sql-server-performance.com/2015/remove-identity-column-sql-server/
Wednesday, May 13, 2015
SQL Server Internals: In-Memory OLTP
Free eBook: SQL Server Internals: In-Memory OLTP
- 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
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.

