Development

SQL Server – Extended Events in SQL Server 2012

Hi friends, today we will discuss about new performance monitoring system Extended Events which gets introduced in version SQL Server 2012.In previous versions we were using SQL Trace for capturing events and SQL Profiler for managing and creating SQL trace.  SQL Server profile, SQL Trace deprecated in future version of SQL version so it suggested… Continue reading SQL Server – Extended Events in SQL Server 2012

Stored Procedure

Sysmail_help_principalprofile_sp – SQL Server Database Mail Stored Procedure – Part 10

Hi friends, in this blog of SQL Server  database mail stored procedure we will continue with another database mail stored procedure sysmail_help_principalprofile_sp. Sysmail_help_principalprofile_sp stored procedure list the information about associations between database mail profile and database principals. When sysmail_help_principalprofile_sp stored procedure is executed without any parameters then it returned lists all of the associations in… Continue reading Sysmail_help_principalprofile_sp – SQL Server Database Mail Stored Procedure – Part 10

Stored Procedure

Sysmail_add_principalprofile_sp – SQL Server Database Mail Stored Procedure – Part 9

Hi friends, in this blog of SQL Server Database mail stored procedure we will continue with another database mail procedure sysmail_add_principalprofile_sp. Sysmail_add_principalprofile_sp stored procedure grants permission to a database user or role to use a database mail profile. Syntax sysmail_add_principalprofile_sp  { [ @principal_id = ] principal_id | [ @principal_name = ] ‘principal_name’ } , { [… Continue reading Sysmail_add_principalprofile_sp – SQL Server Database Mail Stored Procedure – Part 9

Stored Procedure

Sysmail_help_profileaccount_sp – SQL Server Database Mail Stored Procedure – Part 8

Hi folks, in our previous blog of SQL Server Database Mail stored procedure we added database mail account to database mail profile. In this blog we will learn how to get information about the accounts associated with database mail profiles. Sysmail_help_profileaccount_sp stored procedure lists the database mail accounts associated with one or more database profile.… Continue reading Sysmail_help_profileaccount_sp – SQL Server Database Mail Stored Procedure – Part 8

Stored Procedure

Sysmail_add_profileaccount_sp – SQL Server Database Mail Stored Procedure – Part 7

Hi friends, in last previous blogs we created database mail profile and database mail account. In this blog we will learn how to add database mail account to database mail profile using stored procedure sysmail_add_profileaccount_sp. Sysmail_add_profileaccount_sp stored procedure is used to add database mail account to a database mail profile. Both the mail account and… Continue reading Sysmail_add_profileaccount_sp – SQL Server Database Mail Stored Procedure – Part 7

Development

What is User Defined function in SQL Server?

User-defined functions encapsulate T-SQL statement and return a table or a scalar value to the caller. UDFs can not be executed using EXEC statement like stored procedure.  UDFs cannot perform any DDL (Data Definition Language) like  cannot CREATE, UPDATE tables, indexes or any permanent objects. UDFs can also accept parameters like stored procedures and used… Continue reading What is User Defined function in SQL Server?