Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 634 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
634
Dung lượng
18,61 MB
Nội dung
[...]... Server jobs 178 Adding a SQLServer operator 181 Creating a SQLServer job 183 Adding a SQLServer event alert 187 Running a SQLServer job 190 Scheduling a SQLServer job 192 Chapter 4: Security 203 Introduction 203 Listing SQLServer service accounts 204 Changing SQLServer service account 206 Listing authentication modes 210 Changing authentication mode 211 Listing SQLServer log errors 215 Listing... Import SQLPS module 509 Add SQLServer Snapins 509 Add SQLServer Assemblies 509 Getting credentials 510 Running and blocking SQLServer processes 510 Read file into an array 510 v Table of Contents SQL Server- Specific Cmdlets 510 Invoke-SqlCmd 512 Create SMO Server Object 512 Create SSRS Proxy Object 512 Create SSIS Object (SQL Server 2005/2008/2008R2) 513 Create an SSIS Object (SQL Server 2012) 513... PowerShell explains what PowerShell is, and why you should consider learning PowerShell It also introduces PowerShellV3 new features, and explains what needs to be in place when working withSQLServer2012 and PowerShell Preface Chapter 2, SQLServer and PowerShell Basic Tasks demonstrates scripts and snippets of code that accomplish some basic SQLServer tasks using PowerShell We start with simple tasks... Windows Server 2008 R2 See the list of supported operating systems for SQLServer 2012: http://msdn.microsoft.com/en-us/library/ms143506.aspx 2 Install PowerShellV3 Although PowerShellV3 comes installed with Windows 8 and Windows Server 2012, at the time of writing this book these two operating systems are not listed in the list of operating systems that SQLServer2012 supports To install PowerShell V3. .. http://msdn.microsoft.com/en-us/library/hh245198 (SQL. 110).aspx 13 Getting Started withSQLServer and PowerShell Exploring the SQLServerPowerShell hierarchy In SQLServer 2012, the original mini-shell has been deprecated, and SQLPS is now provided as a module Launching PowerShell from SSMS now launches a Windows PowerShell session, imports the SQLPS module, and sets the current context to the item the PowerShell session was... short PowerShell primer is also provided as a supplement in the Appendix, which the database professional can use as a refresher or occasional reference material Packed with more than 100 practical, ready-to-use scripts, SQLServer2012withPowerShellV3Cookbook will be your go-to reference in automating and managing SQLServer What this book covers Chapter 1, Getting Started withSQLServer and PowerShell. .. in to SQLServer2012 Management Studio How to do it In this recipe, we will navigate the SQLServerPowerShell hierarchy by launching a PowerShell session from SQLServer Management Studio: 1 Right-click on your instance node 2 Click on Start PowerShell This will launch a PowerShell session and load the SQLPS module This window looks similar to a command prompt, with a prompt set to the SQL Server. .. PowerShell session, and depending on your PowerShell version either load snap-ins or load the SQLPS module In SQL Server 2012, the original mini-shell has been deprecated When you launch a PowerShell session from SSMS in SQL Server 2012, it launches the full-fledged PowerShell session, with the updated SQLPS module loaded by default SQLServer is exposed as a PowerShell drive (PSDrive), which allows... When you launch PowerShell from Management Studio, you can immediately start navigating the SQLServerPowerShell hierarchy Installing SMO SQLServer Management Objects (SMO) was introduced withSQLServer 2005 to allow SQLServer to be accessed and managed programmatically SMO can be used in any NET language, including C#, VB.NET, and PowerShell SMO is the key to automating most SQLServer tasks SMO... installed, and the SQL Server- related assemblies need to be loaded 18 Chapter 1 Getting ready There are a few ways to get SMO installed: ff If you are installing SQL Server 2012, or already have SQL Server 2012, SMO can be installed by installing Client Tools SDK Get your install disk or image ready ff If you want just SMO installed without installing SQL Server, download the SQLServer Feature 2012 pack How . alt=""
SQL Server 2012
with PowerShell V3
Cookbook
Increase your productivity as a DBA, developer, or IT Pro, by using PowerShell with SQL Server
to. 168
Listing SQL Server jobs 178
Adding a SQL Server operator 181
Creating a SQL Server job 183
Adding a SQL Server event alert 187
Running a SQL Server job