SQL and T-SQL

|
Rather Have Fast and Secure Remote
Control?
|
To use T-SQL statements we need some way of sending these statements to the RDBMS. One way is to use the OSQL command line utility. If you are a DBA who has worked with SQL Server 6.5, you will notice that the OSQL command line utility has replaced the older ISQL utility which does not support some of the new features of SQL Server 2000. While supporting SQL Server 2000, OSQL uses the command line interface and is therefore not very user friendly. However, if you would like to learn more about this utility lookup “osql utility” in the SQL Server Books Online.
The tool we are going to use throughout this series to write, edit, and optimize our T-SQL scripts is called the SQL Query Analyzer. This graphical user interface tool lets you run T-SQL statements, create scripts that can be saved and edited, and it will even provide information that can be used to optimize both databases and T-SQL statements.
There are two main ways to open the SQL Query Analyzer. First, you can open it directly by selecting “Query Analyzer” from the Microsoft SQL Server group on the Start Menu. When the SQL Query Analyzer opens, the first thing you will be asked is to select a server and provide the log on credentials. The following screen shows a connection to the local installation of SQL Server using Windows authentication.
Alternatively, you can access the Query Analyzer from inside the Enterprise Manager. Let’s look at how to do this by creating a new database using T-SQL and the Query Analyzer. To start, open Enterprise Manager and connect to your SQL Server by selecting it in the tree pain.
Next, on the tools menu select Query Analyzer. The first thing you will notice is that we are not asked to select a server or for login information. When you start Query Analyzer from within the Enterprise Manager, Query Analyzer automatically uses the server you have selected in the tree pain. Additionally, it passes the logon credentials that you used to connect to the server in Enterprise Manager.
The status bar at the bottom of the Query window gives us important information about the server we are connected to, the user we are connected as, the database we are using, as well as other status information.
Written by Mike Aubert - Visit WebsiteNext post in SQL Server:
Introduction to SQL Server Transaction Logs
Next post in Database:
Introduction to SQL Server Transaction Logs
Next post in Programming:
Basic Linux Shell Scripting Concepts
Previous post in SQL Server:
Creating a SQL Server Database
Previous post in Database:
Creating a SQL Server Database
Previous post in Programming:
VBScript Fundamentals for Windows Scripting – WMI
All Tutorials by Category:
- CCDA Study Guide
- CCNA Study Guide Chapter 01
- CCNA Study Guide Chapter 02
- CCNA Study Guide Chapter 03
- CCNA Study Guide Chapter 04
- CCNA Study Guide Chapter 05
- CCNA Study Guide Chapter 06
- CCNA Study Guide Chapter 07
- CCNA Study Guide Chapter 08
- CCNA Study Guide Chapter 09
- CCNA Study Guide Chapter 10
- CCNA Study Guide Chapter 11
- CCNA Study Guide Chapter 12
- Cognos
- Computer Hardware
A
C
D
E
F
G
H
I
L
M
N
Entire site Copyright © 1999-2007 2000Trainers.com, all rights reserved.
Content on this site may not be copied or reproduced in any way without permission.


