RSS

Tag Archives: SQL Server 2012

SQL Server 2014 Service Pack 1 has released

Congratulation Microsoft and big Congratulation for us (SQL Server Releases blog)

sql-server-2014-logo

One year ago, Microsoft launched SQL Server 2014. Today, April 15, Microsoft are pleased to announce the release of SQL Server 2014 Service Pack 1 (SP1). The Service Pack will be available for download on the Microsoft Download Center.

SQL Server 2014 SP1 contains fixes provided in SQL Server 2014 CU 1 up to and including CU 5, as well as a rollup of fixes previously shipped in SQL Server 2012 SP2. For highlights of the release, please read the Knowledge Base Article for Microsoft SQL Server 2014 SP1.

As part of our continued commitment to software excellence for our customers, this upgrade is available to all customers with existing SQL Server 2014 deployments via the download links below. SQL Server 2014 with SP1 will be available in additional venues including the Volume Licensing Center and via Microsoft Update starting May 1, 2015.

Microsoft® SQL Server® 2014 SP1
Microsoft® SQL Server® 2014 SP1 Express
Microsoft® SQL Server® 2014 SP1 Feature Pack

To check all my posts you can direct to my personal website or you can download this Excel sheet My Technical POSTS

View all my tips , LinkedIn Website Slideshare ,Youtube Channel.

 
4 Comments

Posted by on April 16, 2015 in SQL Server 2014

 

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

أهم بعض الأكواد الديناميكيه المستخدمه فى محرك قواعد بيانات مايكروسوفت 2014

فى المقال السابق تم شرح الصلاحيات الجديده فى محرك قواعد بيانات مايكروسوفت 2014 ولكن فى هذا المقال سوف اقوم بشرح وتحليل ثلاثه اكواد ديناميكيه تعتبر ذو أهميه عاليه لأى مستخدم لمحرك قواعد بيانات مايكروسوفت 2014  , كما نعلم ان محرك قواعد بيانات مايكروسوفت جاء الينا كطفره فى عالم قواعد البيانات وقام بتسجيل آداء ملحوظ فى معدىلات اداء مختلف انواع الاستعلامات  وذلك لأنه جاء بالعديد من المميزات والتطورات الجديده والملحوظه ومن أهم هذه التطورات فى محرك قواعد بيانات مايكروسوفت 2014 الجديد جداول الذاكره

 (In-memory-table or Memory-Optimized-table)

فهيا جداول لها بعض الخصائص ولها بعض الحدود ولكن جداول متميزه جدا فى سرعه تخزين البيانات والأستعلام عنها لانها يتم أنشائها على نوع جديد من أنواع الفهارس وهو

 (Clustered ColumnStore index) وأيضا تعتمد اعتماد كلى على ذاكره محرك البيانات وبناء على ذلك فهذه النوعيه من الجداول تتطلب ذاكره عاليه السرعه ويجب دعم الخادم او محرك قواعد البيانات 2014 بالذاكره الكافيه لكي تتحمل مثل هذه النوعيه من الجداول لذا فانني بصدد هذا المقال سوف اقوم بشرح وعرض بعض الأكواد الديناميكيه التى تقوم بالأستعلام عن بعض البيانات المهمه لهذا النوع من الجداول والفهارس وهيا كالأتى :

قائمه بكل جداول الذاكره الموجوده على قاعده البيانات

List All Memory-Optimized-table in SQL Server 2014.

أيجاد الذاكره المستخدمه لجدول واحد من جداول الذاكره .

Find allocated memory for one Memory-Optimized-Table.

ايجاد الذاكره المستخدمه لجميع جداول الذاكره الموجوده على قاعده البيانات.

Find allocated memory for All Memory-Optimized-Table.

قائمه بكل الفهارس الجديده التى ظهرت فى محرك قواعد بيانات مايكروسوفت 2014 .HASH Index

List on Non-Clustered HASH index in SQL Server 2014.

قائمه بكل الجداول التى يوجد بها فهرس Clustered ColumnStore index

List by all tables have Clustered Column Store index in SQL Server 2014

لأستكمال المقاله يرجى الذهاب الى هذا العنوان من هنا 

To check all my posts you can direct to my personal website or you can download this Excel sheet My Technical POSTS

View all my tips , LinkedIn Website Slideshare ,Youtube Channel

 
1 Comment

Posted by on April 9, 2015 in Arabic Posts

 

Tags: , ,

الصلاحيات الجديده فى محرك قواعد بيانات مايكروسوفت 2014

استمرارا لسلسلة المقالات الأخيرة التي تناولتها فى محرك قواعد بيانات مايكروسوفت فى المقال السابق تحدثنا عن الجداول المرنه والجداول الغير مرنه فى محرك قواعد بيانات مايكروسوفت 2014  هذا المقال الجديد ساقوم بشرح وتحليل الصلاحيات الجديده التى ظهرت مؤخرا مع محرك  قواعد بيانات مايكروسوفت 2014 والتى جاءت لكى تعالج بعض الثغرات الأمنية الخاصة بقواعد البيانات وابضا لتسهيل بعض الأعمال كما هو موضح ادناه :

لقد قامت مايكروسوفت بعمل مخطط جديد لصلاحيات محرك قواعد البيانات مايكروسوفت  2014 (SQL Server 2014) وجاءت فى هذا المخطط بثلاثه صلاحيات جديده التي قد حققـ خطوة متميزة في مجال امان قواعد البيانات لذا سوف اقوم بشرح هذه الصلاحيات الجديده وساقوم بعمل تطبيق على على كل واحده منهم لمعرفه متى يمكن استخدام هذا الصلاحيه وما هى وجه الأستفاده التى ستعود على أمن المعلومات من هذه الصلاحيات .

10

الصلاحيات الجديده فى محرك قواعد بيانات مايكروسوفت 2014 :

  1. CONNECT ANY DATABASE Permission.
  2. SELECT ALL USER Securables Permission.
  3. IMPERSONATE ANY login Permission.

 

يمكن الوصول الى هذه الصلاحيات عن طريق الخطوات الأتيه :

 

  1. Write click on SQL Server instance
  2. Select Properties
  3. From the write panel select Permission
  4. You will find now the 3 new Permission on the right

لأستكمال المقاله يرجى الذهاب الى هذا العنوان من هنا 

 
1 Comment

Posted by on April 9, 2015 in Arabic Posts

 

Tags: , ,

What is the meaning of SQL Command

Hello Followers today i will explain very small information but actually for me it is more good info because we should no the concept for our tools we are working on it so As we are DBA , DB Analyst or Developer we should know what is meaning of  SQL Command ? and what is SQL ?

What is SQL?

SQL is Structured Query Language, which is a computer language for storing, manipulating and retrieving data stored in relational database.

SQL is the standard language for Relational Database System. All relational database management systems like MySQL, MS Access, Oracle, Sybase, Informix, postgres and SQL Server use SQL as standard database language.

Also, they are using different dialects, such as:

  • MS SQL Server using T-SQL,
  • Oracle using PL/SQL,
  • MS Access version of SQL is called JET SQL (native format), etc

Meaning of  SQL Command :

SQL Commands are mainly classified into four types, which are DDL command, DML command, TCL command and DCL command.

SQL is mainly divided into four sub language

  • Data Definition Language(DDL)
  • Data Manipulation Language(DML)
  • Transaction Control Language(TCL)
  • Data Control Language(DCL)

command types in SQL DataBase

To check all my posts you can direct to my personal website or you can download this Excel sheet My Technical POSTS

View all my tips , LinkedIn Website Slideshare ,Youtube Channel. 1st QT Achievement in 2o15 

 
Leave a comment

Posted by on April 7, 2015 in General topics

 

Tags: , , , , , , , , , , , , , ,

SQL Server DMV Replication Monitoring Part 1

IC216462

 

Hello My followers  today i will took in very important subject for any DBA How we can monitor our Replications !! for any replication i have publication and subscription , How i can now is it working or it is active or down or what is the status of it now , based on that i created one DMV build with technique of Dynamic Query and using SQL Server cursor but before you go for Monitoring (advanced level) you should know some points at the beginning :

 

 

 

 

Replication in SQL Server Part 1

  • What is SQL Replication?
  • Types of SQL Replication
  • Replication Overview

Replication in SQL Server Part 2

  • How to create Transaction Replication

Replication in SQL Server Part 3

  • How to Add New Publisher Server to the Distributor Server

Replication in SQL Server Part 4

  • Disable Publishing and Distribution Servers

Now after we explained the main highlights for the replication lets see How we can monitor the status of the publication and subscription? and How we can receive email if any one of them is InActive :

  • First i return all databases used in replication
[sql]

SELECT
 MSA.publisher_db AS 'Database Name'
FROM
 distribution.DBO.MSarticles AS MSA
OPEN db_cursor
[/sql]

Read the rest of this entry »

 
2 Comments

Posted by on March 25, 2015 in Replication

 

Tags: , , , , , ,

How to Avoid the performance risk of the Delete Statements

Introduction

downloadHello everybody in my last post i explained How we can create Clustered index on all heap tables by one single click for video check this link today i will write and speak in new something How we can avoid the performance risk of the Delete Statement, YES delete statement can do big trouble on my server if i have one table with huge volume of data and more transaction hitting this table this meaning this critical table you should be Sensitive  with this critical  databases or this critical objects , because if you need to delete huge data from this table Based on certain criteria AS Example you need to delete 1,000,000 of record.

Problem

At this time when you need to delete 1,000,000 with some where condition and you are deleted from one of the critical table on your server don’t take the wrong way to write one Delete statement direct it will cost more Sync_network_IO and more CXPACKET also probably it can make Schema lock or Query lock .

Solution :

images

Forget the direct delete statement no think here ! you should do the delete statement as patching:

  1. grabbing any unique ID from Target table and insert it into Temp table.
  2. looping on the temp table to return each time the first 1000 record as Example.
  3. using Merge technology to delete the Data exists on target table where the ID equal the ID in source table.
  4. Update the counter of the looping
  5. commit the transaction if it success rollback transaction  if  it fail

by this way the statement of the delete will run smoothly without any bad affect on the SQL Server cluster performance. don’t think in the time you should think in the impact no problem for Query take time without impact because it is better than fast query Executed in 3 SEC but it  fire the CPU or the IO of the server when it run.

Things to consider while working with big tables.

  1. Use Truncate table, if you need to delete all
  2. If you are deleting records more than 70% of data, I would create a temp table, copy only the records you need to this table and run truncate on the original table. This approach is much faster.
  3. Breaking a big transaction into a small transactions applies to Insert and Update as well.
  4. Where possible use table partitioning. This makes the maintenance easy. You can drop a partition if you need to delete it.

DEMO PART :

Read the rest of this entry »

 
Leave a comment

Posted by on March 13, 2015 in General topics

 

Tags: , , , ,

How to Check the last restart for DB Server

How to Check the last restart for DB Server

Hi Dears i received request from the developers by the Staging DB was down yesterday evening, between 6:00 PM to 9:00 PM, can you please advice at this time to do Scientific investigation and troubleshooting so at this time you should check 2 point :

  1. Last SQL Server instance restart.
  2. Last DB server (windows services ) restart.

Last SQL Server Restart :

we can check it easily and by the Easiest ways (SQL Query)

SELECT sqlserver_start_time FROM sys.dm_os_sys_info
SELECT ‘Statistics since: ‘ + CAST(sqlserver_start_time AS VARCHAR) FROM sys.dm_os_sys_info
Server Restart

Read the rest of this entry »

 
Leave a comment

Posted by on November 15, 2014 in Administration

 

Tags: , , , , , , ,