Home Blog Page 3

What an SSMS environment looks like? Important Short cuts -Section2

0
learn-sql-server-online-free

After a successful installation of SQL Server you can operate by going to the taskbar and types SQL Server Management Studio Or you can simply type SSMS. It’s just a mess. You’ll see this I can click on it after SQL Server Management Studio opens you’ll be mate with the connection dialog box.

If you accidentally cancel that one, you can always click there and you get this connection box. To connect to the server that you’re working on Give it the server name or your machine name. Or the simplest way to get your current machine name is just typed localhost then press connect. After you connect to the server using a server name which is localhost or an alias for our server name right here you’ll see databases Right now we don’t have any database that is created.

You might see some system diseases like master,model, msdb, tempdb monster is basically where you server holds all the important information and like the logging model is basically it will hold some template data for SQL Server uses to create some objects and msdb has something to do with SQL Server Agent or to run a scheduled jobs. TempDB is where it’s holding a temporary data or temporary tables. Don’t change anything here don’t delete any one of them so it might crash the entire sequence so.

Next you’ll see a security folder here under it. You’ll see logging, server role, credential, audit and audit specification. You don’t need to change anything here. But for us, since we created the server which makes it more let’s create one secure user account Right-Click new logging logging name. You can say See call user.  So it’s going to be a sequel authentication mode. Give it a good password here and repeat the same password here.

And you can choose a default database. Right now since we don’t have any user data mean leave the default answer on and enforce or pass on security. This is just temporary. So don’t enforce anything here and check that out. OK.

That will create a new user name sequel user. So if you want to log into the server using data logging You can always disconnect by clicking this button and click on to reconnect to change the authentication for windows to see quiet indication the server name is the scene local localhost top you know your user name which is call underscore a user for logging.  It’s not the case the but for a password. You have to provide it with the correct case. You can click to remember it but if it’s machine that is used by multiple people don’t click. Remember click connect.

Now as you can see going up to localhost using our new account which is Seacole user you’ll see some server objects here. Here is where we do a backup endpoint a link server link server if you have multiple servers and if you want to use a data that is stored in a sequel server that resides on a different Windows machine you can create a link server across a network. Replication is where you create your disaster recovery and then high availability. For now this is not the D.V. cause Don’t worry about this one.

Poley this is basically a new addition to see where you can access data that resides on and non-sequel or something like Hadoop. Always want to have availability is something sequencer added in a recent versions where you can create a deep grooves so that you can increase the performance of food and as well as make sure there’s no loss of data.

Management is another one you can create some policies extended even so you can create some extended events to see what’s going on inside the server. If theories deadlocks or anything like that here’s where you get a sequence of looks. If there is any error on the server or data level I’m getting an error because the sequel user doesn’t  have a mission to see that one. You can go back to our windows account restrictive account and be able to see that in detail. And we have integration services catalog.

learn-microsoft-sql-server

If you install the course of integration services or is this is where you deploy your hardware and we have sequencer agent job if you want to execute some sort of procedure. For example if you want to send some e-mail to your users you can run us through procedure in UK in bulk data e-mail you can automatically send to them or you hear integration jobs needs to be executed. Here’s where you will see conserver agent and you can execute this job based on some schedule or based on some interval at the top you’ll see you know that you know file Nien Open Save save or everything is there.

It is the scene and do copy paste all they are is there server or object Explorer if you want. Well for example if you lost your object Explorer you can always go to View and click on object Explorer is that you can recover this back or you can open other other objects like the toolbox. We have a debug here if you have some still of procedures that you need to step in as they are. And if you want to depart them thoroughly you’ll use this functionality here we have a toolbox here. This is where you change your options for example to create creating new Querrey here as you can see here there’s no line number if you want to line number so that you can be able to reverse that.

You can go to Tools Options text editor you can go to transact see if you click on line number and click ok. You’ll see line 1. So wait so it’s good to keep adding line numbers for you here. The window is if you have multiple windows you can switch from one to the other or you can split this working window. And hell is basically it’s an on line here.

That’s what the sequencer meaning is looks like. Here we have new window. If you want to write a new sequence so you can click on that one go in and type your queries or select will use your insert wherever see where you have to go here and you have all this say and open here and open you’ll do the same. And if you can do for example new we have control and you can compress control and an end or it’s going to create a new query window or you can do control all it’s going to open.

These once the MDX and in Italy these are basically used in the sequence of analysis services. We know it’s going to be working on that one. If you have a multi pull databases and if you want to switch between one to the right now the current data is that we are working on is a master.  If you want to switch to model you can change is you have a user get visas if you want to switch from one day to every city out there or you can use are reserved for use and that will switch the context of that.

That means that you’re working on if you want to execute the call.  Here is where you execute it executes a month. For example select 1. And if I do execute, click on execute you’ll see there is no column name If I rename it as col_name now you will see this one will be changing to Col_name instead of no column name here. Or the simplest thing is we can do F5.  You can have multiple sequence statement in one query window.

Sql-Server-Management-Studio-2012-install

For example, I can do select one column name. I can do select to call name in a file execute. You will see column one and of a cone column name too and you want to exit only a specific sequel’s statement.  You can’t always select that one and execute it.Now you’ll see number two and you don’t see number 1. So if you want to execute only a specific part of your query you have to select that part in executive or press F5 that will execute it for you. Debug we discussed about it when we talk about the debug menu this is what the SQL Server environment looks like.

And we’ve also discuss what are some of the shortcuts that you can use to automate your SQL development process. I see in the next article.

https://www.microsoft.com/en-us/sql-server/sql-server-2017

Learn Microsoft SQL Server-Introduction-Section1

0
learn-microsoft-sql-server

Learn sql server online free.How to learn sql server? In this section it will be discussing about the following topics: we’ll briefly discuss what a database is. Is how to install Microsoft SQL Server specifically the developer version what the SQL Server Management Studio or SSMS environment looks like. We’ll see how to use some of important shortcuts.

In a SSMS, how to create a data is using SSMS shortcuts functionality as well as writing SQL Also discuss how to create a sample database that is used in this course. Which came from a CIA or a Central Intelligence Agency. We will see how to use drag and drop functionality in SSMS, how to select a table without even writing a query, how to change it database context in a multi database environment. We’ll see how to create as well as why we need comments in SQL.

What is a database?

This article we’ll discuss what a database is. A database is an organized collection of data that is used for the purposes of modeling some type of organization or organization on process.What we can understand from this is as long as there is an organized collection of data that we use to model some sort of an organization or a company different entities in that organization and different relationships we can be able to assume there is a database.

And a software package that we can use to manage these organized set of data or database is called a DBMS means or database management system. Relational databases such as SQL Server, MySQL, PostgreSQL and Oracle they use SQL as a language in order to be able to create different objects such as tables, views and stored procedures as well as to extract some data insert data. In this course we’ll be using SQL Serve as a data management system and we’ll discuss different aspects of this SQL language in the coming sections and movies.

learn-sql-server-online-free

What is the difference between different Editions of SQL Server?

In the previous article we’ve discussed different editions of course so we also decided to use a developer edition as it’s free and it also comes with all features of Enterprise Edition. In this article we’ll see how to download and install a developer version of SQL Server.

To do this go to your favorite web browser and type SQL Server Developer Edition latest installer. Once you’re in this page go ahead and download a developer edition save or run it. We have three basic options for this dialog box. A basic, custom and downloaded media. Let’s go with customer since we don’t need everything you can’t accept the default location where your extract file will get expanded.

https://www.microsoft.com/en-us/sql-server/sql-server-2017

Click install. This is going to take some time. Once it’s finished downloading it will extract the files to install. go to “Installation” this will be installing a sequence of standalone version. And add feature next. The installer will check if there is any installation rules are violated, you might see some warning like. The firewall is not disabled. It’s normal ok, so you can ignore these warning message click next.

We will be installing a new SQL Server and go ahead and select perform news SQL Server 2017 installation and click next. It is going to ask you to add a product key. A developer edition is free.  Just simply select a free developer edition. Click next. You have to accept the license terms. Next, it’s going to ask you to select features to installed. Simply select a database engine and click next. You will have an option to pick a default instance which is Or you can give it your name. It is common to use a default instance in the next dialog.

It’s going to ask you to do a server configuration in a normal production environment. You’re going to have to create a series accounting and use those services accounts you but for us. You can accept the default values and click next.  You can pick your authentication mode. You can leave it to a default. Windows authentication select select a mixed mode authentication.

Which is nothing but SQL Server authentication plus a Windows authentication for us to see how how the SQL authentication works let us select that one and give it a strong password that you will not forget. Specify a SQL Server administrator in a normal production environment. You’ll specify a services account here but for us add your account by clicking this button so that you will have a full admin privilege in that SQL Server that you are installing.

Next, you’ll see a summary of the configuration you made previously. If you see everything is good. Click to install. This is going to take some time. We’ll come back once this is done. After completing a sequence of developer edition installation the next thing to do is Tinas still see SQL Server Management Studio which is an IDE to write any SQL statement. As well as we can be able to use the GUI. Open your favorite browser and type SQL Server Management Studio installer Go to the first Microsoft Web site.

Then if you scroll down, you will see a tool section. Download SQL Server Management Studio SSMS. Click on that, wait for the installer to finish downloading install finished downloading click run then click install, follow the on screen dialog box and finish installing sql server management studio and I’ll be back once this is done.

Create a table in SQL Server Management Studio (SSMS)

0
create-a-table-SQL-Server

In this lesson, we will learn how to create a table in SQL Server Management Studio (SSMS).

Hello, and welcome to this introduction about SQL Server. I’ll be taking you through this course. So, what we’re going to do.First of all we’re going to find and download and instal a free version of SQL Server so you can play with it on your own computer.We’re going to open up a programme called SSMS, that’s Management Services and we’re going to create a database,create a table,insert some dataand retrieve that data.

We’re then going to look at the individual components of SQL Server. T-SQL, Database Administration, or DBA,SSIS, that’s SQL Server Integration Services,SSAS, that’s Analysis Services,and SSRS, that’s Reporting Services. And we’re going to have a look at some resources that can help you learn it.Books, videos and practise tests. We’ll also have a look at the official Microsoft website. So, let’s start.

Right, so the next thing we’re going to do,is we’re going to create a table.So a table stores data.So what sort of table am I going to create? Well, what I’m going to do, I’ve got some previously created data here,and this is a purchase system.So in my purchase number one,I bought four of product number one at a cost of $50.26, totaling $201.04. My purchase order two, then I bought three numbers;359, and three of 360’s and so forth.So it is a perfectly ordinary transaction table.So I’m going to create it.I’m going to leave it on screen,so we can have a look at it while we create the table.

So to create the table, I’m going to right and click on tables and go New >Table. Again, there’s an awful lot of details that we can look at, but we’re just going to look at very simplistic, very easy to create things. So click new table, and here it says,well what columns are you going to create? So I want a column called purchase order ID, and I want another one called order quantity. I want product ID,unit price,and line total.

create-a-table-SQL-Server create-table-SQL

Now there is another thing that we have to specify at the same time. What type of column is it? Or more accurately, what sort of data do you want to store in the column? Now you can see that we got various choices,including,dates,time,text, though in reality, the one that I use the most of the time is called varchar, A variable character. And then we got things like integer.

Integers are whole numbers like one, two, three,instead of 1 1/2.So this is when we really need to look at the data that we got and decide what sort of column we want. And hopefully you can see that the first three columns can all be integers. They’re all whole numbers.  So let’s change them to ints, I-N-T.Now these last two contain–well money, essentially.  And so what I’m going to do is, Int would not be good enough, because if I put $50.26 into an int column, then it will truncate it to $50.

So I would have a certain lack of accuracy. So instead, what I’m going to do, with all of these, is I’m going to put it into the money data type. Though many other different types I could use, but just for now we’re going to use Int for integers and Money for–floating point numbers.  So now I’ve created it, I’ll press– Well what do I do? Well, I can press the Save Table here, or I can close this window.

So let’s click Save, either way we’ll get this choose a name. So what name am I going to call this?I’m going to call this, Transactions.So click okay, and close this, and we’ll go back to our object explorer,and you can see that the Transactions table is, where, exactly?Now, one of the things about object explorer,is that it doesn’t automatically update after you have created a new object. The only exception for this is a database that you have created or attached.

create-table-SQL

So, if you’ve created a new object,be it a table, a view, a procedure, or anything else,and you want it to appear,they would need to click on the Refresh icon. So now we can see that we have our Transactions table. D-B-O, Databaseowner.Transactions.Every table with have something before this dot, and that is called a schema. But, in this case, it doesn’t really matter what the schema is. So, in the next video, we’re going to populate it, we’re going to add some data to this table, and then we’re going to retrieve it.

Opening SQL Server Management Studio (SSMS)

0
connect-sql-azure

In this lesson, we will show you how to open SQL Server Management Studio (SSMS).

Now We’ve Got Our SQL Server İnstalled,Let’s Start Using İt.Now, İf I Go To Start And I Have A Look Through.Microsoft SQL Server, Whichever Version You İnstalled,You Will Notice Quite Quite A Lot Of Programmes.You Might Be Going,”Oh, Which One Do I Actually Start With?”. Well, What We Need To Start With İs A Programme Called.SQL Server Management Studio.And You Can See The Quickest Way. That I Found İt On My System

Is Just Typing SSMS.So, İf I Now Run This Programme,So, Here Comes SQL Server Management Studio,This İs Where You Do A Lot Of Work With TSQL,Which İs Your Standard SQL Server.Called The Select Statement,Which İs What We’ll Be Looking At İn The Next Few Videos.

This İs Also Where We Do DBA:Database Administration.So, First Of All,We Have İt Connect To A Server.Now, Your Server Name Will Be Completely Different,But What’s İmportant İs İt Says Server Type,Database Engine.Server Name, Whatever The Server Name That You’ve İnstalled,And Authentication, Windows Authentication.

And I Just Click Connect.I İgnore All The Other Options.So, Hopefully You’ve Now Found On Your Computer.SQL Server Management Studio.You Might Have To Search For İt,Especially İf You’ve Got An Older Version Of Windows. Now, Just İn Case You Got To This Screen.You Click Connect, And Maybe Server Name Was Blank.

If Server Name İs Blank,Then My Suggestion İs To Put A Period,A Full Stop, A Dot As Your Server Name.And That Will Allow You To Connect To Your Local Server.But Generally, Just Accept Whatever Was There.As Your Default.Obviously, İf You’re Connecting To A Corporate Machine,Then Some Server That’s Already Been İnstalled,That’s Worth Tens Of Thousands Of Dollars,Then Use Whatever Credentials You Were Given.By Your System Administrator.

So, This İs SSMS,SQL Server Management Studios.And Let’s Just Have A Look Around İt. First Of All, We Have An Object Explorer. Now, İf You Don’t See This Object Explorer,İf İt’s Disappeared, Then Go To View, And Object Explorer.Now, This Contains All Of The Objects. That We Are Going To Be Using İn This TSQL and İn The DBA Section Of This Course.

So, We Start Off With Databases. And İf I Expand That,Then We Have System Databases and Any Databases That May Have Previously Been İnstalled. You Can See That I’ve Got A Few Databases İnstalled.But, We’re Going To İgnore All Of My Existing Databases and oncentrate On A New Database.

First Of All, What İs A Database? A Database İs A Object,A Container That Can Hold Other Objects. It Can Hold Data, İt Can Hold Queries,İt Can Hold Procedures and İn This Course We’re Going To Make All Of Those. So, First Of All, We Need A Database Container.So, What I’m Going To Do İs Right-Hand Click On The Word Databases And Go To New Database. Now, We Can Call This Database Almost Anything We Want, Within Reason.

So, I’m Going To Call İt My First Database,Without Any Spaces.So, I’m Going To Leave Everything Else As İt İs.This İs Just A Test Environment.I Don’t Need To Concentrate On Any Of These Tabs Or Other Options That Get Really Complicated Very Quickly.So, Let’s Just İgnore That And Just Click OK.

So, Once We’ve Done This, İn The Object Explorer,The Phrase My First Database Has Appeared, İt’s Right Here. Now, İf I Expand This New Database,We’ve Got Tables, Views, Which Hold Queries and İn Programmability We’ve Got Stored Procedures. And We’ll Be Concentrating On These Later. Within Tables, We Have Got System Tables.Within Views, We’ve Got System Views.

And There’s Actually Quite A Lot Of Them, To Be Honest.So, All Of This İs Just The Outline Of Our Database, İt Doesn’t Actually Contain Any Data.So, İn The Next Video,We Are Going To Create A Table And We’re Going To Populate İt.We’re Going To Add Some Data İnto İt.