Showing posts with label Microsoft. Show all posts
Showing posts with label Microsoft. Show all posts

Saturday, 16 January 2016

Benefits Behind Using the Stored Procedure



We can Define stored Procedure in SQL Server as the set of logically group of SQL statement they are grouped to perform a particular task. This article will describe the Stored Procedure in SQL Server and the benefits with stored procedures..
 SQL Server Training
 Stored Procedure: We can define stored Procedure in SQLServer  as the set of logical group of SQL statements they are grouped to perform a particular task. There are so many benefits behind using a stored procedure. One of
 the main benefit behind using a stored procedure is that it increases the query performance of the database. The other benefits behind using the Stored Procedure are listed below.
Benefits Behind Using the Stored Procedure
1.     One of the main benefits behind using the stored procedure is that it reduces the amount of information sent to the database server. It can prove itself a more beneficial when the speed of the network is slow. Since if we send the SQL query (statement) which is getting executed repeatedly to the server through network and the same time network gets disconnected, then the execution of the SQL statement would not return the desired results, if the SQL query is not used between Transaction statement and rollback statement is not being used.
2.     Need to compile only once when the stored procedure is created. Then after it’s not required to recompile before executing until it is modified and reutilizes the same execution plan while the SQL statements need to be compiled every time whenever it is requested to be executed even if we send the same SQL statement all the time.
3.     It facilitates in re-usability of the SQL code as multiple users can reuse it and by multiple clients since we need to just execute the stored procedure at the place of writing the same SQL statement all the time. It also reduces the development time.
4.     Stored procedure is helpful in terms of enhancing the security as we can grant permission to the user for executing the stored procedure at the place of giving permission on the tables used that is being used in stored procedure.
5.     Sometimes, it is quiet useful to use the database for storing the business logic as a stored procedure since it makes it secured and in case any change is needed in the business logic, then we may need to make changes in the stored procedure only and not in the files contained on the web server.
Let’s see how to write a Stored Procedure in SQL Server
For Example I have created a table called students, below is the structure of the table:

CREATE TABLE  Students_Records

(
    [Student_id] [int] IDENTITY(1,1) NOT NULL,
    [First_name] [nvarchar](200) NOT  NULL,
    [Last_name] [nvarchar](200NULL,
    [Email_id] [nvarchar](100NULL
)
For Example we insert the following data into the above mentioned table:

Insert into students_Records (First_name, last_name, Email)
 Values('Ankit', 'Kumar', 'ankit@abc.com')

Insert into students_Records (First_name, last_name, Email)
 Values('Vikas', 'Singh', 'vikas@abc.com')

Insert into students_Records (First_name, last_name, Email)
 Values('Deepak', 'kumar', 'deepak@abc.com')

Insert into students_Records (First_name, last_name, Email)
 Values('Rahul', 'Johari', 'rahul@abc.com')

Insert into students_Records (First_name, last_name, Email)
 Values('Amit', 'Singh', 'amit@abc.com')
Now, at the time of writing a Stored Procedure, the first step would be to write the Create Procedure statement as the first statement:
Create Procedure Ankitproc
(
Input parameters ,
Output Parameters (If required)
)
As
Begin
     Sql statement used in the stored procedure
End
Now, suppose we have to create a Stored Procedure to return a student name
where student_id is given as an input parameter to the stored procedure. Then, the stored Procedure will be something like:


/*  Getstudentname is the name of the stored procedure created in this example below*/

Create  PROCEDURE Getstudentname(

Declare @studentid INT                   --Input parameter ,  Student_id of the student

)
AS
BEGIN
SELECT First_name+' '+Last_name FROM Students_records WHERE student_id=@student_id
END
We can collect the name of the student as well in the output parameter of the Stored Procedure. For example:
 /*
GetstudentnameInOutputVariable is the name of the stored procedure created in this example below which
uses output variable @Studentname to collect the student name returns by the
stored procedure
*/

Create  PROCEDURE GetstudentnameInOutputVariable
(

@studentid INT,                       --Input parameter ,  Studentid of the student
@studentname VARCHAR(200)  OUT        -- Out parameter declared with the help of OUT keyword
)
AS
BEGIN
SELECT @studentname= First_name+' '+Last_name FROM students_records WHERE studentid=@student_id
END
Note:-/* */ is used to put comments in one or multiple lines within your sql statements
--sign is used to write a comment in a single line
Note: It is not mandatory that a stored procedure will have to return something all the time. There may be a case when a stored procedure doesn't have to returns anything. For example, a stored procedure can be used to Insertdelete or update As a statement For example, the below created stored procedure is used to insert values into the table students_records.

/*
This Stored procedure is used to Insert value into the table tbl_students.
*/

Create Procedure InsertStudentrecord
(
 @StudentFirstName Varchar(200),
 @StudentLastName  Varchar(200),
 @StudentEmail     Varchar(50)
)
As
 Begin
   Insert into Students_records (First_name, last_name, Email)
   Values(@StudentFirstName, @StudentLastName,@StudentEmail)
 End
Execution of the Stored Procedure without having an Output Parameter
A stored procedure is used in the SQL Server with the help of "Execute" or "Exec" Keyword. Like, if we Have to execute the stored procedure "Getstudentname", then we have to use the below written statement.

Execute Getstudentname 1
Exec Getstudentname 1
Execution of the Stored Procedure using the Output Parameter
If we have to execute a stored procedure "GetstudentnameInOutputVariable" , then, first of all we  will have to declare a variable to collect the output values. Below is the example:

Declare @Studentname as nvarchar(200)   -- Declaring the variable to collect the Studentname
Declare @Studentemail as nvarchar(50)     -- Declaring the variable to collect the Studentemail
Exec GetstudentnameInOutputVariable 1 , @Studentname output, @Studentemail output
select @Studentname,@Studentemail      -- "Select" Statement Has been used to show the output from Procedure created above--
Summary
At the end, we can say that a stored procedure does not enhances the possibility of reusing the code and execution plan only, but it increases the performance of the database as well by reducing the traffic of the network by reducing the amount of information that is sent over the network.


Wednesday, 23 September 2015

MCSE Training- An Easiest Way for Getting Microsoft Certification

There are numerous advanced technologies, fine tune troubleshooting skills etc launched by Microsoft Certification for helping out IT professionals. Microsoft also provides certification for learning Microsoft products and their solutions. MCSE certification is one of the biggest certifications from Microsoft for training students to handle their job responsibilities efficiently. 

MCSE is counted among most popular courses for getting certifications from side of Microsoft. MCSE alone serves to take care of IT and architecture of workplace. Different courses can vary between hours to weeks. This program is a set of training programs which is named as Microsoft Certified Professional. MCSE course increases the worth of IT students among other students and they get more career opportunities. This course is planned for offering knowledge and skills to students. 

Certified solutions offered by Microsoft are for designing and building technological solutions for different kinds of problems. IT students can easily enhance their knowledge and skills by opting such course. These programs are also available in form of distance learning courses that guide students in great way for working conveniently with Microsoft hardware and software as well. Students have also option for gaining associate degree in certain area like information technology and networking. Online training programs have made it relevant to study and now students at distant places can avail this opportunity. 

Various individual courses can take around eight to sixteen weeks for the completion. Online courses are also offered through message boards, e-mail, live video streaming and distance learning ways. SSDN Technologies is an institute offering MCSE training just like MCSE training company. MCSE trainer teaching at this institute is well qualified and skilled for the purpose.

Monday, 7 September 2015

Explore the Advantages of Microsoft Lync 2013 Server Training

If you are looking for a reputed and unified communication platform, Microsoft Lync Server is a good option. After implementing Lync 2010, enterprise consumers have witnessed drastic reductions in cost in comparison to MS UC. According to statistics, there has been a savings of 2.5 million pounds recorded by considering 1000 employees in a period of 6 months. The Microsoft works by combing information about real time presence with video conferencing email exchange, VoIP, MS office and IM in order to leverage productivity and build efficiency. With the launch of the Lync 2013, you able to have more robust and powerful user experience.

The new 2013 model isn’t something extremely spanking on the outside but expands all the associated features of 2010 and promises greater reliability and resiliency. Microsoft also says that the new platform comes with rapid improvements to enable you to communicate better while you are travelling. The enterprise voice offering from Microsoft was more or less poor if compared with technologies and solutions offered by Swyx, Avaya or Cisco. Microsoft reaped the benefits by maintaining solid convergence with office oriented applications, back end systems and servers but couldn’t be successful with the VoIP standards.

There are many modifications in the voice offering system of tackling corporate grade telephony market. With improvements in VoIP, there have been many additional enhancements. If you are unable to understand the advanced features of MS Lync 2013, you can always go for Lync server training. And what can be better than an authorized Microsoft learning partner like SSDN Technologies to do so? It offers expert level Lync server certification training so that you can connect with people from different parts of the globe and build a proficient career in the IT industry. At the end of the course, you will have the idea to administer, configure and implement solution like chat, conferencing or IM.

In this, you can find support for several trunks between gateways and servers. It also offers sophisticated routing for allowing servers to behave as a bridge between PSTN and IP gateways. Thus, if you are a Lync user, you can easily make calls through general PSTN connection when you can’t go for SIP trucking and also dial PBX extensions. Microsoft has also made the features available for Android and iOS devices, which means that you can depend on Microsoft irrespective of your device.

Monday, 18 May 2015

Latest Updates - Microsoft Lync Server

Microsoft Lync Server (Microsoft Office Communications Server earlier,in future to be named as Skype for Business) is a communications server software(real-time based) that provides the infrastructure for enterprise instant messaging,VoIP, presence, ad hoc and structured conferences like audio, video and web conferencing and PSTN (Public Switched Telephone Networks) connectivity through a third-party gateway or SIP(Session Initiation Protocol)trunk. These features can be availed within an enterprise, between enterprises and with external users on the public internet or standard phones.

One such basic use of Lync Server is instant messaging (IM) and its presence within an organization which includes support for sharing information, file transfer and audio and video communication. Lync uses ICE(Interactive Connectivity Establishment) for NAT(Network address Translation) traversal and TLS(Transport Layer Security)encryption to serve secure voice and video both inside and outside the corporate organizations.
Here are the few updates that are released for Lync Server 2013 :
  • KB 3036869 (February 2015 Cumulative Update for Lync Server 2013 Core Management Server)
  • KB 2910243 (Description containing terms of cumulative update for Lync Server 2013 Backup Service: January 2014)
  • KB 3051949 (May 2015 Cumulative Update  forLync Server 2013 Front End Server and Edge Server) KB 3051956 (May 2015 Cumulative Update for Lync Server 2013 Unified Communications Managed API 4.0 Runtime)
  • KB 3051953 (May 2015 Cumulative Update for Lync Server 2013 web components server)
  • KB 3051951 (May 2015 Cumulative Update for Lync Server 2013 core components)

To install updates for Lync Server 2013 RTM  following five steps must be performed :-

Step 1 : Install the cumulative updates

Update of the cumulative server Installer applies all  the required updates for the appropriate server role at  a single  operation.
They are different for Lync Server 2013 Enterprise Pools and Lync Server 2013 Standard Edition and other roles.

Step 2 : Apply the available back-end database updates

After the installation of the updates for the Core Components server for a Lync Server 2013 Enterprise Edition front-end server (or on a Lync Server 2013 Standard Edition server), the SQL database files(updated) are to be dropped to the computer having the Core Components server role installed.

Step 3 : Apply the required Central Management Database update

In case Central Management Store is located on a Lync Server 2010 Standard Edition Server or Enterprise pool, need not run the Install-CsDatabase -Central Management Database command.

Step 4 :  Mobility service should be enabled

Step 5:  Unified Communications Web API should be enabled

SSDN Technologies, Microsoft Solution Experts Lync Server Training program provides knowledge in the expert level of creating communications for the organization and connecting people around the world.One can learn to configure, implement and administer a Microsoft Lync Server 2013 solution like Conferencing, IM,and Chat.