RSS

Category Archives: MS SQL Server

Microsoft SQL Server Database.

8 Free SQL Injection Scanners & Tools


SQL_Injection

SQL injection is a very serious threat in the software and web industry as of current stats. It is also increasingly hitting databases like anything. The process allows miscreants to hack into your system through your web interface. However, the same tools could be used by security pros to find out SQL injection vulnerabilities in the system.

Get it

 
Leave a comment

Posted by on April 1, 2015 in MS SQL Server

 

Tags: , , , , , , , ,

SQL SERVER – Concurrency Basics – Guest Post by Vinod Kumar


SQL SERVER – Concurrency Basics – Guest Post by Vinod Kumar.

 
Leave a comment

Posted by on November 5, 2014 in MS SQL Server

 

SQL SERVER – GUID vs INT – Your Opinion


torage space is required than INT

via SQL SERVER – GUID vs INT – Your Opinion.

 
Leave a comment

Posted by on October 28, 2014 in MS SQL Server

 

SQL SERVER – How to select minimum value from group in a table


SQL SERVER – How to select minimum value from group in a table.

 
Leave a comment

Posted by on October 16, 2014 in MS SQL Server

 

Tags: , , ,

Send mail from SQL database (Configure Database Mail)


SQL Server Mail

Database mail is newly introduced concept in SQL Server 2005 and it is replacement of SQLMail of SQL Server earlier version. Database Mail has many enhancement over SQLMail. Database Mail is based on SMTP (Simple Mail Transfer Protocol) and also very fast and reliable where as SQLMail is based on MAPI (Messaging Application Programming Interface). Database mail depends on Service Broker so this service must be enabled for Database Mail. Database Mail can be encrypted for additional security. SQLMail is lesser secure as it can encrypt the message as well anybody can use SMTP to send email. Additionally, for MAPI to be enabled for SQLMail it will require Outlook to be installed. All this leads to potential security threat to database server.

In order to send mail using Database Mail in SQL Server, there are 3 basic steps that need to be carried out:

  1. Create Profile and Account
  2. Configure Email
  3. Send Email

Read the rest of this entry »

 
Leave a comment

Posted by on May 12, 2014 in MS SQL Server

 

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

SQL Server fixed database roles


687474703a2f2f7777772e6f7269656e7464622e6f72672f696d616765732f6f7269656e7464622d646273656375726974792e706e67

Within each database, SQL Server does have fixed database roles, ones which are standard and included in every database. These differ from the database roles you can create and use yourself in that they have pre-assigned permissions. The fixed database roles are:

  • db_owner
  • db_securityadmin
  • db_accessadmin
  • db_backupoperator
  • db_ddladmin
  • db_datareader
  • db_datawriter
  • db_denydatareader
  • db_denydatawriter

Read the rest of this entry »

 
Leave a comment

Posted by on January 12, 2014 in MS SQL Server

 

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

Tables Statistics – MS SQL Server


images

You can use the following T-SQL script to get more info and statistics about your database tables:

SELECT
 T.Name AS 'Table Name',
 T.create_date AS 'Creation Date',
 S.Name AS 'Schema Name',
 P.Rows AS 'Rows Count',
 SUM(A.total_pages) * 8 AS 'Total Space KB', 
 SUM(A.used_pages) * 8 AS 'Used Space KB', 
 (SUM(A.total_pages) - SUM(A.used_pages)) * 8 AS 'Unused Space KB'
FROM
 sys.tables AS [T]
 INNER JOIN sys.indexes AS [I]
 ON T.OBJECT_ID = I.object_id
 INNER JOIN sys.partitions AS [P] 
 ON I.object_id = P.OBJECT_ID AND I.index_id = P.index_id
 INNER JOIN sys.allocation_units AS [A] 
 ON P.partition_id = A.container_id
 LEFT OUTER JOIN sys.schemas AS [S] 
 ON T.schema_id = S.schema_id
 WHERE 
 T.NAME NOT LIKE 'dt%' 
 AND T.is_ms_shipped = 0
 AND I.OBJECT_ID > 255 
 GROUP BY 
 T.Name, T.create_date, S.Name, P.Rows
 ORDER BY 3 DESC
 
Leave a comment

Posted by on December 12, 2013 in MS SQL Server

 

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