Configuring your environment
Video: Configuring your environmentBefore I get into my demonstrations, I'd like to help you set up a development environment very similar to what I'm using so you can perform these steps at home. We are going to be using two products: Microsoft SQL Server 2012 Express Edition and Microsoft Visual Web Developer 2010 Express Edition. First let's look at SQL Server 2012 Express Edition. You can find that add the URL www.microsoft.com/express/database.
- Next steps
Viewers: in countries Watching now:
This course investigates several key database-programming concepts: triggers, stored procedures, functions, and .NET CLR (Common Language Runtime) assemblies. Author Martin Guidry shows how to combine these techniques and create a high-quality database using Microsoft SQL Server 2012. The course also covers real-world uses of the INSERT, UPDATE, and DELETE procedures, and how to build a basic web form to connect to your database.
- Comparing triggers, functions, and stored procedures
- Installing and configuring SQL Server
- Creating a stored procedure
- Returning data using data sets
- Creating user-defined functions
- Using "after," "instead," and nested triggers
- Modifying existing stored procedures
- Implementing logging on DELETE
- Choosing between T-SQL and CLR
- Executing a stored procedure
- Passing parameters
Configuring your environment
Before I get into my demonstrations, I'd like to help you set up a development environment very similar to what I'm using so you can perform these steps at home. We are going to be using two products: Microsoft SQL Server 2012 Express Edition and Microsoft Visual Web Developer 2010 Express Edition. First let's look at SQL Server 2012 Express Edition. You can find that add the URL www.microsoft.com/express/database.
This takes me to the standard landing page for SQL Server Express Edition. I have a big red button in the middle of the screen. I'll click on that and it shows me some different choices. You definitely want to get one of the versions that has the database engine and the tools include Sequels Server Management Studio which is an important tool in many of our demos. So I'm going to with the top one here. That takes me to another page where I'll select the 64-bit edition Express with Tools.
Now that we've downloaded SQL Server 2012 Express Edition let's go ahead and install it. So in this interface I want the top option New SQL Server stand-alone installation, and I'd like to perform a new installation of SQL Server 2012, so the default there is appropriate. I'll click Next. I need to read and accept the license and then click Next. I need to choose what features I'm going to install.
I definitely want the Management Tools. The SQL Server Replication is not necessary for anything we're going to do in the course, but you could install if you want though. Click Next. At this point I'd like to name this instance. You can use whatever name you want, probably do something descriptive. I can choose a folder to install to. I'm going to accept the default and click Next. Here it's asking me which service accounts I would like to use.
In a tested environment I typically accept the defaults here. If you'd like to use something other than the default accounts, you may do so. This interface is asking me which authentication mode I would prefer. One of our demos will require SQL Server authentication. So I'm going to click Mixed Mode to allow SQL Server authentication. That will force me to import a password for the SA account. So I'm going to of when to use a secure password.
It also has automatically added the current user as an administrator of SQL Server. That's typically something you'll want to do. If you want to add additional users, you can do so in the interface at the bottom. Asking me whether or not I want to send error reports to Microsoft, I'll just click Next and now we are installing. I should mention we are installing SQL Server version 2012. Many of the demos I'll be doing would work exactly the same in 2008 or 2005.
So if we have that kind of environment already set up, you could stick with that. I also anticipate that the majority of the stuff in the course will not change in a future version. So when Microsoft releases the next version of SQL Server, I can't be 100% sure but I imagine the basics of triggers, functions, and stored procedures will still work the same. In this sense your SQL Server 2012 installation completed successfully with product updates. Sounds like good news. I'll close this and then I can also close this window and we have successfully installed SQL Server.
Now it's time to install Microsoft Visual Studio Web Developer 2010 Express. You can get this from www.microsoft.com/express. This takes me to a landing page for Visual Studio 2010 Express products. There are a few different versions. I'll scroll down. The one I'm interested in is all the way here to the right, Visual Web Developer 2010 Express.
I'll click Install at the bottom and I'll need to accept the licensing agreement, and here we have a message saying the following products were successfully installed. That sounds like good news. I'll click on Finish and I'll click in Exit and we have successfully installed Microsoft Visual Web Developer 2010 Express Edition.
There are currently no FAQs about SQL Server: Triggers, Stored Procedures, and Functions.