Database Reference
In-Depth Information
Running SQL Code from Visual Studio
You can manage and execute your database scripts using Visual Studio even if it is not obvious how to do so. In
the next exercise, you have an opportunity to do just that. We provided step-by-step instructions on how to do so.
eXerCISe 2-2. CreatING the Data WarehOUSe
in this exercise, you create the data warehouse and the tables within it. You can do this by using the code
found in the InstWeatherTrackerDW.sql file. Once that is accomplished, you create a new solution folder in
visual Studio and move the InstWeatherTrackerDW.sql file to the new folder. Figure numbers provide hints
for most of these steps.
Completion of this exercise is required to be able to complete future exercises throughout this chapter.
Open Visual Studio (Optional)
1.
visual Studio should still be open from the previous exercise. if it is not, please open
it. Please remember to run visual Studio as an administrator by right-clicking the
menu item and selecting the Run as Administrator option.
2.
with visual Studio open, access the weatherTrackingProject solution from the
File ➤ Recent Projects and Solutions menu.
Connect to SQL Server and execute the Code
1.
Double-click the file InstWeatherTrackerDW.sql file in Solution Explorer. The SQL
code you see in Figure 2-12 opens in your main window.
Figure 2-12. Double-click InstWeatherTrackerDW.sql to open it.
2.
without selecting any of the SQL code, right-click a blank area of the query window
(the window where the SQL code is) and then click the Connection Connect menu
option (Figure 2-13 ). The Connect to Database Engine dialog window appears.
 
Search WWH ::




Custom Search