Created
September 21, 2017 05:00
-
-
Save alexpghayes/876e7446ac34779cc898473123614dfd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# open a SQL terminal. note that my netid is aph3 | |
runas /user:adrice\aph3 /netonly "sqlcmd -S classdb.ad.rice.edu" | |
# in the SQL terminal, make sure things work | |
CREATE DATABASE apgha1db | |
USE apgha1db; | |
GO | |
# populate the database we just created. note that C:\Users\alex\Desktop\comp330\a1\ is the path to where I kept my A1 files | |
runas /user:adrice\aph3 /netonly "sqlcmd -S classdb.ad.rice.edu,1433 -d "apgha1db" -i "C:\Users\alex\Desktop\comp330\a1\createtables.sql"" | |
runas /user:adrice\aph3 /netonly "sqlcmd -S classdb.ad.rice.edu,1433 -d "apgha1db" -i "C:\Users\alex\Desktop\comp330\a1\flowers.sql"" | |
runas /user:adrice\aph3 /netonly "sqlcmd -S classdb.ad.rice.edu,1433 -d "apgha1db" -i "C:\Users\alex\Desktop\comp330\a1\features.sql"" | |
runas /user:adrice\aph3 /netonly "sqlcmd -S classdb.ad.rice.edu,1433 -d "apgha1db" -i "C:\Users\alex\Desktop\comp330\a1\people.sql"" | |
runas /user:adrice\aph3 /netonly "sqlcmd -S classdb.ad.rice.edu,1433 -d "apgha1db" -i "C:\Users\alex\Desktop\comp330\a1\sightings.sql"" | |
# again in SQL terminal, check that the tables are there now | |
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment