Sql 2005 where is management studio




















If the server type and server name are different from the defaults that came up, enter the appropriate server type and server name, and select Windows Authentication. Then, click Connect. Once connected to the server that you typed in, you will get the Microsoft SQL Server Management Studio screen Figure that we will be using throughout the rest of the book. The Object Explorer provides a hierarchical view of objects. For example, you can navigate through a database, table, column, or other types of objects, as we will soon show you.

To create a database, as shown in Figure , right click on Databases in the Object Explorer and select New Database You will get the New Database dialog box, as shown in Figure Click OK.

A SQL Server database is a collection of many objects, such as tables, views, and synonyms, defined to support activities performed with data. A database is a collection of related tables. SQL Server comes with some default System databases-- master , model , msdb , and tempdb.

To view these default database nodes, expand the Database node and then System Databases node, as shown in Figure , and you will be able to see the default System databases. Any queries executed from the query window will execute in the master database unless you change the context.

Every time a new database is created, SQL Server makes a copy of the model database and all of the objects in it to form the basis of the new database. If you want all your new databases to inherit certain properties, you could include these properties and objects in your model database. The most important thing you do in SQL Server , or in any other database for that matter, is query the database.

Queries in SQL Server are typed in the query editor. The query editor can be opened in two ways, as discussed in the following subsections: a by right-clicking, and b by using the New Query button.

Select New Query. Figure shows the query editor, which can be used to create queries and other SQL scripts and execute them against SQL Server databases. The first query will be called SQLQuery1. Later we will show you how to change the name of the query when saving it. You can also open the query editor by selecting the New Query button from the top menu leftmost icon , as shown in Figure Then, click the Execute button it is on the menu bar above the query editor screen.

You will get the following message in the results pane as shown in Figure :. A table is used to store data in a database, and, a database is typically composed of many tables. Then, select the whole script and copy it. Paste the load script into the query editor, as shown in the Figure Once the script has been pasted into the query editor, execute this script by clicking the Execute button or the F5 shortcut key. This script takes only a few seconds to execute.

You will get the results shown in Figure --on the bottom part of the screen under the Messages tab. Every table in SQL Server has a table definition.

The table definition gives us information about a table such as the column names in the table, the data types of the columns in the table and whether the columns allow null missing values. You will be able to view the columns in the Student table. The columns in the Student table are stno , sname , major , class , and bdate.

If you wish to modify any of the column specifications—for example, if you want to insert or delete columns, rename a column, change the data type of a column, or allow or disallow null fields—you need to modify the table definition. The table definition can be modified by modifying the column definition or by modifying the table definition.

To modify the column definition, right-click the column that you wish to modify. Another way to view or modify the table definition is to right-click the table—for example, Student --and then select Modify, as shown in Figure The table definition of the Student table is now displayed, as shown in Figure You can delete or insert columns from here, change the data types, allow or disallow null values, and more. Once you have finished making your changes or just viewing the table definition, if that is what you intended to do , you can close this window.

You will be asked if you wish to save the changes and you may select Yes or No, depending on whether you made changes to the table definition and you want to save the changes. To view the data in a table, right click on the table, as shown in Figure , and select Open Table. For example, to view the data of the Student table, right-click on the Student table, and select Open Table. This will show all 48 rows of the Student table, of which we show the first 14 rows here:.

This screen also allows you to insert data, make changes to the data, and save this changed data. To delete a table, right-click on the table that you wish to delete as shown in Figure , and then select Delete.

Deleting a table will delete the table, table definition, and all of the data in the table. Once you delete a table, there will be no way to get the table or its data back except by restoring from a backup. Choose your region North America. Asia Pacific. Europe, Middle East, Africa. Ready to get started? Title Question? Under the 'Connect using' section, select the needed authentication mode: Windows authentication - logged on account to the computer SQL authentication - ' sa ' account and password, or account with identical rights Type the logon and Password information for the account specified and click Connect.

Expand Databases. Above the toolbar, click the Query menu item. Collectives on Stack Overflow. Learn more. Ask Question. Asked 11 years ago. Active 6 years, 6 months ago. Viewed 8k times. Additional information A network related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. Improve this question. Dylan Corriveau 2, 4 4 gold badges 27 27 silver badges 36 36 bronze badges.

Turgs Turgs 1, 1 1 gold badge 17 17 silver badges 45 45 bronze badges. Can you tell us the error message you are getting?



0コメント

  • 1000 / 1000