Real-World PowerShell for SQL Admininistration
[Pages:53]Real-World PowerShell for SQL Administration
Brian Hansen brian@ @tf3604
Welcome to SQL Saturday
? Enjoy this day of learning ? Be sure to visit and thank the sponsors ? Be sure to thank the organizer and volunteers ? Take time to NETWORK with others. That's
what this is really all about! ? Act professionally and treat others with
respect (like this was a work environment)
Agenda
? "Gotchas" ? Tips ? PowerShell and .NET ? Scripts
? Gotchas
? Tips ? PowerShell and .NET ? Scripts
"Gotchas": Providers
? Be in the right provider
? PowerShell has many virtual drives and folder structures
? What is the default provider in SQL Agent?
It is SQLSERVER:\ Set-Location c:;
"Gotchas": Silent Failures
? Silent failures (non-terminating errors)
"Gotchas": Silent Failures
? How to fix? $ErrorActionPreference = "Stop";
? But what if we really want to ignore an error?
try { ... } catch { ... } finally { ... }
"Gotchas": Silent Failures
? More about try ... catch ... finally
try { $connection.Open(); } catch [System.Data.SqlClient.SqlException] {
$except = $_.Exception; $errorMessage = $except.Message; $errorNumber = $except.Number; }
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- staff symposium series
- change hard drive letter
- vbsedit failed to create empty document
- dell emc isilon smb 3 encryption in healthcare
- remote diagnostics tool rdt v 15
- when powerful sas meets powershell
- fun avec windows powershell by gabriel lemieux
- powershell add property to object
- question no 21 40
- real world powershell for sql admininistration
Related searches
- real world problems for kids
- real world problems for students
- real world topics for students
- powershell import sql module
- real world math for kids
- powershell invoke sql command
- powershell query sql table
- powershell execute sql command
- powershell list sql server instances
- powershell execute sql file
- powershell run sql script
- powershell query sql server