Hazus | Manage Hazus Data in SQL

[ upbeat music ] [ sound effects ]
boom, whoosh, drip, splash, sparkle [ upbeat music fades in ] Welcome to the “Manage Hazus Data in SQL”
video tutorial. In this video you will learn how to access,
view, and interact with Hazus data through SQL Server Management Studio. Using SQL is a powerful option for querying
and manipulating data outside of Hazus or ArcGIS and is possible because Hazus installs
a local version of SQL during the installation
process. The server is called “HAZUSPLUSSRVR” and the
easiest way to access it is to use Microsoft SQL Server Management Studio, or SSMS. [ upbeat music ] When you open SSMS, a dialog box will appear
asking you to locate your desired server. Select “Database Engine” from the top dropdown and then you can use the middle dropdown to locate the Hazus database. Open the dropdown and click “Browse for More”
to open the folder selection dialog to browse for your server. Expand “Database Engine,” select the option
with “HAZUSPLUSSRVR” in its name and click “Ok.” The final step to establish the connection
is to select “Windows Authentication” from the Authentication dropdown and click “Connect.” Now you can explore the server’s datasets. In the Object Explorer, expand the Hazus server. Find and expand “Databases” in order to see
a variety of databases to query and explore. These include Databases for every imported
state dataset, every saved study region, CDMS, your Hazus system’s reference data under
“syHazus,” and others. As a word of caution, the syHazus database
can be used for more controlled querying, but only very advanced users should attempt
to do so: this is the storage location for Hazus’s system references and any changes
could severely impact the stability of Hazus on your machine. To explore the data within a database, simply
select and expand the database you would like to query. We will select the Massachusetts state dataset
and expand the “Tables” sub-folder to see all of its constituent data layers. To view a data layer, simply select it and
it will appear in table form with a SQL script terminal above the data. For our example, we will select “County” and
the table will contain data for the counties of Massachusetts. From here you can explore the data both by
scrolling through the table and by issuing SQL commands to query for specific data. Though the default view for your data is in
this table form, SQL can also display a rudimentary map of the data by clicking the “Spatial Results”
tab. With our example, changing to Spatial results
will give us the counties of Massachusetts laid out in SSMS. Continue to interact with different layers
in both table and spatial form to gain a better understanding of the underlying data that
Hazus utilizes in its models and analyses. At times it may be necessary to manually add
a new database connection to SSMS while you are already connected to the HAZUSPLUSSRVR. To do so, right click on “Databases” in the
Object Explorer, and click “Attach.” When prompted, click the “Add…” button under
“Databases” and navigate to the location of your desired database’s “.mdf” file, usually
found under “HazusData” then “Inventory.” Click “Ok” then click “Ok” again, and the
database will be added under the Databases folder for you to explore. Congratulations! In this video you learned how to access, view,
and interact with Hazus data in SQL. Look for other Hazus video tutorials on the
FEMA YouTube channel. [ upbeat music fades out ]

Leave a Reply

Your email address will not be published. Required fields are marked *