12.07.2015 Views

Querying Microsoft® SQL Server® 2012 - Advanced Technology ...

Querying Microsoft® SQL Server® 2012 - Advanced Technology ...

Querying Microsoft® SQL Server® 2012 - Advanced Technology ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1-14 Introduction to Microsoft <strong>SQL</strong> Server <strong>2012</strong>Working with Script Files and ProjectsSSMS allows you to create and save T-<strong>SQL</strong> code in text files, typically given a .sql file extension. Like otherWindows applications that open, edit, and save files, SSMS provides access to file management throughthe File menu and through standard toolbar buttons.In addition to directly manipulating individual script files, SSMS provides a mechanism for initially savinggroups of files together and for opening, saving, and closing them together. This mechanism uses severalconceptual layers to work with T-<strong>SQL</strong> script files and related documents, and uses the Solution Explorerpane to display and control them:Object Parent DescriptionSolution None Top-level container for projects. Stored as a text file with an .ssmsslnextension, which references components contained within it. May containmultiple projects. Displayed in Solution Explorer at the top of the objecthierarchy.Project Solution Container for T-<strong>SQL</strong> scripts (called queries), stored database connectionmetadata, and miscellaneous files. Stored as a text file with an .ssmssqlprojextension, which references component scripts and other files.Script Project T-<strong>SQL</strong> script file with a .sql extension. The core item of work in SSMS.The benefits to using scripts organized in projects and solutions include the ability to open multiple scriptfiles in SSMS at once. You can open the solution or project file from within SSMS or Windows Explorer.To create a new solution, click the File menu and click New Project. (There is no ‘‘New Solution’’command.) Specify a name for the initial project, its parent solution, and whether you want the project tobe stored in a subfolder below the solution file in the location you indicate. Click OK to create the parentobjects.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!