Friday, 22 January 2016

SQL Server 2008 R2 new features

http://www.mytechmantra.com/LearnSQLServer/Microsoft_SQL_Server_2008_R2.html
http://www.databasejournal.com/features/mssql/article.php/3857466/Top-10-Features-of-SQL-2008-R2.htm
1.  Report Builder 3.0
2.  SQL Server 2008 R2 Datacenter
3.  SQL Server 2008 R2 Parallel Data Warehouse
4.  StreamInsight
5.  Master Data Services
6.  PowerPivot for SharePoint
7.  Data-Tier Application
8.  Unicode Compression
9.  SQL Server Utility
10.  Multi Server Dashboards

SQL Server 2012 new features

https://mcpmag.com/articles/2012/03/14/top-12-features-of-sql-server-2012.aspx

1. AlwaysOn Availability Groups -- This feature takes database mirroring to a whole new level. With AlwaysOn, users will be able to fail over multiple databases in groups instead of individually. Also, secondary copies will be readable, and can be used for database backups. The big win is that your DR environment no longer needs to sit idle.

2. Windows Server Core Support -- If you don't know what Windows Server Core is, you may want to come up to speed before Windows 8 (MS is making a push back to the command line for server products). Core is the GUI-less version of Windows that uses DOS and PowerShell for user interaction. It has a much lower footprint (50% less memory and disk space utilization), requires fewer patches, and is more secure than the full install. Starting with SQL 2012, it is supported for SQL Server.

3. Columnstore Indexes -- This a cool new feature that is completely unique to SQL Server. They are special type of read-only index designed to be use with Data Warehouse queries. Basically, data is grouped and stored in a flat, compressed column index, greatly reducing I/O and memory utilization on large queries.
4. User-Defined Server Roles -- DBAs have always had the ability to create custom database role, but never server wide. For example, if the DBA wanted to give a development team read/write access to every database on a shared server, traditionally the only ways to do it were either manually, or using undocumented procedures. Neither of which were good solutions. Now, the DBA can create a role, which has read/write access on every DB on the server, or any other custom server wide role.
5. Enhanced Auditing Features -- Audit is now available in all editions of SQL Server. Additionally, users can define custom audit specifications to write custom events into the audit log. New filtering features give greater flexibility in choosing which events to write to the log.
6. BI Semantic Model -- This is replacing the Analysis Services Unified Dimensional Model (or cubes most people referred to them). It's a hybrid model that allows one data model will support all BI experiences in SQL Server. Additionally, this will allow for some really neat text infographics
7. Sequence Objects -- For those folks who have worked with Oracle, this has been a long requested feature. A sequence is just an object that is a counter -- a good example of it's use would be to increment values in a table, based a trigger. SQL has always had similar functionality with identity columns, but now this is a discrete object.
8. Enhanced PowerShell Support -- Windows and SQL Server admins should definitely start brushing up on their PowerShell scripting skills. Microsoft is driving a lot of development effort into instrumenting all of their server-based products with PowerShell. SQL 2008 gave DBAs some exposure to it, but there are many more in cmdlets in SQL 2012.
9. Distributed Replay -- Once again this is answer to a feature that Oracle released (Real Application Testing). However, and in my opinion where the real value proposition of SQL Server is, in Oracle it is a (very expensive) cost option to Enterprise Edition. With SQL, when you buy your licenses for Enterprise Edition, you get everything. Distributed replay allows you to capture a workload on a production server, and replay it on another machine. This way changes in underlying schemas, support packs, or hardware changes can be tested under production conditions.
10. PowerView -- You may have heard of this under the name "Project Crescent" it is a fairly powerful self-service BI toolkit that allows users to create mash ups of BI reports from all over the Enterprise.
11. SQL Azure Enhancements -- These don't really go directly with the release of SQL 2012, but Microsoft is making some key enhancements to SQL Azure. Reporting Services for Azure will be available, along with backup to the Windows Azure data store, which is a huge enhancement. The maximum size of an Azure database is now up to 150G. Also Azure data sync allows a better hybrid model of cloud and on-premise solutions
12. Big Data Support -- I saved the biggest for last, introduced at the PASS (Professional Association for SQL Server) conference last year, Microsoft announced a partnership with Hadoop provider Cloudera. One part of this involves MS releasing a ODBC driver for SQL Server that will run on a Linux platform. Additionally, Microsoft is building connectors for Hadoop, which is an extremely popular NoSQL platform. With this announcement, Microsoft has made a clear move into this very rapidly growing space.

SQL Server 2016 new features


(https://msdn.microsoft.com/en-CA/library/bb500435.aspx)

  • Enhanced in-memory performance provides up to 30x faster transactions, more than 100x faster queries than disk-based relational databases and real-time operational analytics.
  • New Always Encrypted technology helps protect your data at rest and in motion, on-premises and in the cloud, with master keys sitting with the application, without application changes.
  • Stretch Database technology keeps more of your customer’s historical data at your fingertips by transparently stretching your warm and cold OLTP data to Microsoft Azure in a secure manner without application changes.
  • Built-in advanced analytics provide the scalability and performance benefits of building and running your advanced analytics algorithms directly in the core SQL Server transactional database.
  • Business insights through rich visualizations on mobile devices with native apps for Windows, iOS and Android.
  • Simplify management of relational and non-relational data by querying both with T-SQL using PolyBase.
  • Faster hybrid backups, high availability and disaster recovery scenarios to back up and restore your on-premises databases to Microsoft Azure and place your SQL Server AlwaysOn secondaries in Azure.
  • Can truncate table partition (finally?)
  • http://www.infoworld.com/article/3013601/application-development/new-features-in-sql-server-2016.html
  • Always Encrypted Data security has always been a major concern. SQL Server 2016 comes in with the Always Encrypted feature that when enabled, protects your data in the SQL Server database using encryption. In using this feature, access to the encrypted sensitive data can be made only by the application that accesses the data stored in the SQL Server 2016 database. The application that has the encryption key can have access to the data -- this encryption key (it's a master key stored in your system) is never passed to SQL Server. 
  • Always On The Always On feature (first introduced in SQL Server 2012) has been enhanced to facilitate high availability and disaster recovery of data. Support for DTC (Distributed Transaction Coordinator) and round-robin load balancing has been introduced in SQL Server 2016. 
  • Native JSON support JSON is a standardized data exchange format widely in use these days. SQL Server 2016 provides support for JSON imports and exports. Support for parsing and storing JSON is in-built in SQL Server 2016. 
  • Stretch Database When the Stretch Database (also known as Stretch DB) feature is enabled for one or more tables of your local database, SQL Server 2016 can dynamically archive data in a secure manner from your local SQL Server database onto the Azure SQL database hosted in the cloud. Hence this version of SQL Server facilitates seamless migration of your data to Microsoft Azure sans any downtime. 
  • Hekaton enhancements The In-Memory OLTP engine that was introduced with SQL Server 2014 helps you to create in-memory tables and then perform I/O operations against them in memory for lower latency and improved performance. Note that Hekaton is another name for the In-Memory OLTP engine in SQL Server. Performing I/O operations against these in-memory tables result in faster reads and writes as your application can read from and write to the memory much faster compared to disk reads and writes. 
  • Support for in-database analytics with R-integration SQL Server 2016 provides support for advanced analytics to facilitate a deeper insight into your data. This is the first version of Microsoft's flagship database product to have an integrated support for Revolution R for statistical analysis of your data.

Monday, 18 January 2016

Master Data Management


1) http://www.computerweekly.com/feature/Tips-for-master-data-management-best-practice

  • Master data management (MDM) projects must be business-owned, joined up, and proven step-by-step
  • Business must take the lead of MDM
  • Think big, start small
  • MDM has to deal with data from multi domain
  • similar with dimensional data instead of transactional data
2) http://www.informationweek.com/big-data/big-data-analytics/7-master-data-management-project-best-practices/d/d-id/1107222?

3) http://www.slideshare.net/kuansung/master-data-management

4) http://www.slideshare.net/jamserra/introduction-to-microsofts-master-data-services-mds

5) http://searchdatamanagement.techtarget.com/resources/MDM-best-practices


  • Identify domain (manifacture/health care/financial )
  • Identify master data (consistent across system and process)

Master data: Data representing key data entities critical to a company operations and analytics because of how it interacts and provides context to transactional data.
Transactional data: Data associated with or resulting from specific business transactions.
Reference data: Data typically represented by code set values used to classify or categorize other types of data, such as master data and transactional data.
Metadata: Descriptive information about data entities and elements such as the definition, type, structure, lineage, usage, changes and so on.

Following SAP's lead, other giant vendors began muscling in on the act. IBM bought DWL, Oracle introduced a series of products, and Microsoft purchased Stratature, a small MDM vendor.









Saturday, 16 January 2016

A minimum working window service list for a typical home user who upgraded his/her "old" computer to windows 10 recently


Microsoft is pushing window users to upgrade to windows 10 (for free). But if you have some old computers which does not have much memory you may end up with very serious performance issues once upgraded. My laptop had 4 G memory. My computer runs terribly slow once I upgraded from Windows 7 to Windows 10.

I spent lot of time configuring my laptop to optimize the performance and it was not responsive at all. I was even thinking about downgrade back to windows 7. But I finally get the issue fixed by only starting needed windows services. I used msconfig to disable all services (some services will NOT be disabled) and then add only services to make sure I can use internet, printer and audio.

Here is the list of services running at my laptop. (the list is obtained by running "net start" command).
Hope this can save time for people with similar situations.



  1. Application Information
  2.    Background Intelligent Transfer Service
  3.    Background Tasks Infrastructure Service
  4.    COM+ Event System
  5.    CoreMessaging
  6.    Cryptographic Services
  7.    DCOM Server Process Launcher
  8.    DHCP Client
  9.    Diagnostics Tracking Service
  10.    DNS Client
  11.    Group Policy Client
  12.    Local Session Manager
  13.    Network Connected Devices Auto-Setup
  14.    Network Connection Broker
  15.    Network List Service
  16.    Network Location Awareness
  17.    Network Store Interface Service
  18.    Plug and Play
  19.    Power
  20.    Print Spooler
  21.    Remote Procedure Call (RPC)
  22.    Remote Procedure Call (RPC) Locator
  23.    RPC Endpoint Mapper
  24.    State Repository Service
  25.    System Events Broker
  26.    Task Scheduler
  27.    TCP/IP NetBIOS Helper
  28.    Tile Data model server
  29.    Time Broker
  30.    User Manager
  31.    User Profile Service
  32.    Windows Audio
  33.    Windows Audio Endpoint Builder
  34.    Windows Connection Manager
  35.    Windows Defender Service
  36.    Windows Error Reporting Service
  37.    Windows Event Collector
  38.    Windows Event Log
  39.    Windows Update
  40.    WLAN AutoConfig
  41.    Workstation
  42.    WWAN AutoConfig



A good place to check all windows 10 services:
http://www.blackviper.com/service-configurations/black-vipers-windows-10-service-configurations/

Wednesday, 18 November 2015

Canadian securities regulation and CCMR: cooperative capital market regulatory system



1) https://en.wikipedia.org/wiki/Canadian_securities_regulation
2) http://ccmr-ocrmc.ca/

Friday, 11 July 2014

List All Primary Key Columns Within a Database

SELECT
schema_name(ta.schema_id)  SchemaName
,ta.name  TableName
,col.name  ColumnName
,indcol.key_ordinal IndexPositoin
,ind.name IndexName
,ind.type_desc IndexType
,ind.fill_factor Fill_Factor
from sys.tables ta inner join sys.indexes ind
on ind.object_id = ta.object_id
inner join sys.index_columns indcol
on indcol.object_id = ta.object_id
and indcol.index_id = ind.index_id
inner join sys.columns col
on col.object_id = ta.object_id
and col.column_id = indcol.column_id
where ind.is_primary_key = 1
order by 1,2,4