- In this section, I'd like to talk about using powershell…to run queries against our SQL Server 2012 databases.…I'm gonna go to the start menu,…type in powershell…and open up the Windows powershell command.…Sometimes, I like to adjust…the size of the powershell window.…If you right-click in the title bar…and go to Properties, you'll have…the option to change the font.…First thing I'll need to do is…load the SQL powershell commands.…
So, that is import-module…and in the quotes, sqlps…and I'll probably get a warning…about the Analysis Services again.…Not a problem.…Not going to affect what I'm trying to accomplish here.…Now, in order to issue a traditional SQL command,…I'll need to first enter the powershell command,…Invoke-SQLcmd.…Then, we'll need to say -Query…to specify that we are running a query…and in quotes, we'll go ahead and…type out our query.…
I'd like to do a SELECT *…from a table in the Adventure Works database.…When I type in the name of the table,…I'm going to need to specify that it is…in the adventure works 2012 database.…
Author
Released
3/23/2015- Planning the database infrastructure
- Designing databases vs. data warehouses
- Designing the physical database implementation
- Planning for partitioning
- Adding FileStream data
- Indexing
- Monitoring server health
- Managing SQL Server with PowerShell
Skill Level Intermediate
Duration
Views
Related Courses
-
Installing SQL Server 2012
with Gerry O'Brien3h 3m Beginner -
Querying Microsoft SQL Server 2012
with Gerry O'Brien5h 34m Beginner
-
Introduction
-
Welcome44s
-
Setting up for the course2m 12s
-
-
1. Designing a Database Server Infrastructure
-
2. Designing a Logical Database Schema
-
Designing OLTP databases1m 54s
-
Using first normal form3m 41s
-
Using second normal form3m 10s
-
Using third normal form2m 41s
-
Designing data warehouses3m 12s
-
-
3. Designing a Physical Database Implementation
-
Using multiple files5m 25s
-
Planning for partitioning5m 11s
-
Planning compression3m 59s
-
4. Incorporating Data Files into Databases
-
Enabling FileStream access2m 42s
-
Using FileStream data5m 3s
-
-
5. Tuning Database Performance
-
Understanding indexes3m 12s
-
Using indexes3m 24s
-
Working with query plans5m 35s
-
Indexing tips2m 51s
-
-
6. Policy-Based Management
-
7. Monitoring Server Health
-
Exploring health data5m 3s
-
8. Managing SQL Server with PowerShell
-
Conclusion
-
Goodbye1m 4s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Using Windows PowerShell to run SQL commands