Connect with life www.connectwithlife.co.in L.Srividya Architect Advisor | Microsoft India.

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Preface Demo A Quick Thank You How Did We Do It?
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Feature: Reprint Outstanding Transactions Report © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Purchase Requisitions - Requester © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
demo Default WANGPSLookup Default WANGPS.
Feature: Payroll and HR Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Interactivity Navigating a data model Working with large quantities of data Entry Editing and adding data User feedback and validation Presentation.
Connect with life Bijoy Singhal Developer Evangelist | Microsoft India |
Co- location Mass Market Managed Hosting ISV Hosting.
Martin Bell SQL Server MVP Blog:
Windows 7 Training Microsoft Confidential. Windows ® 7 Compatibility Version Checking.
Multitenant Model Request/Response General Model.
Connect with life Praveen Srvatsa Director | AsthraSoft Consulting Microsoft Regional Director, Bangalore Microsoft MVP, ASP.NET.
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
Announcing Demo Announcing.
Feature: OLE Notes Migration Utility
Feature: SmartList Usability Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
 Rico Mariani Architect Microsoft Corporation.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Print Remaining Documents © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Connect with life Connect with life
Windows Azure Connect Name Title Microsoft Corporation.
NEXT: Overview – Sharing skills & code.
A Windows Azure application runs multiple instances of each role A Windows Azure application behaves correctly when.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Document Attachment –Replace OLE Notes © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Feature: Suggested Item Enhancements – Sales Script and Additional Information © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows.
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
SQL Server SQL Azure Visual Studio“Quadrant” SQL Server Modeling Services Entity Framework ADO.NET“M”/EDM Data Services …
Ian Ellison-Taylor General Manager Microsoft Corporation PC27.
Connect with life Vinod Kumar Technology Evangelist | Microsoft
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

customer.
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Connect with life Vedant Kulshreshtha Technology Solutions Professional – SharePoint | Microsoft India
demo Demo.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Feature: Suggested Item Enhancements – Analysis and Assignment © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and.
Windows Azure SQL Data Sync Name Title Microsoft Corporation.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Sr. Dir. – Systems Architecture Inlet Technologies.
Requirements Gathering Architectural Design DevelopmentUAT Visual Design Production Polish Concept Ideation Interaction Design.
Connect with life Cheryl Johnson VSTS Solution Expert | Canarys Automations Pvt Ltd Performance Testing.

Connect with life Bijoy Singhal Microsoft India Jadeja Dushyantsinh A Microsoft India.
MIX 09 4/17/2018 4:41 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Возможности Excel 2010, о которых следует знать
Office Mac /30/2018 © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Title of Presentation 12/2/2018 3:48 PM
From DTS to SSIS, Redesign or Upgrade
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
Шитманов Дархан Қаражанұлы Тарих пәнінің
Title of Presentation 5/24/2019 1:26 PM
Building Data-Driven Applications Using "Quadrant" and "M"
Presentation transcript:

Connect with life L.Srividya Architect Advisor | Microsoft India

Agenda Brief introduction to Windows PowerShell Briefly outline the SQL Server PowerShell architecture Demo using PowerShell with SQL Server

Task based scripting technology that uses the.Net2.0 Framework Windows PowerShell 1.0 currently supports Windows XP SP2, Windows Server 2003, Windows Vista and Windows Server upported on multiple platforms (x86, x64 & Itanium) and by multiple language technologies (English language, Localized and Multilingual User Interface). Windows PowerShell An Introduction

CMDlets – Built-in commands in.NET language. Users can create their own CMDLets and use them in Powershell Functions – Functions created dynamically with PowerShell commands Scripts – text files with.PS1 files & have one or more PowerShell commands Applications – Existing Windows commands that work inside of Powershell Windows PowerShell Categories of commands

Windows PowerShell contd.. PowerShell.exe: shell for interactively editing and running PowerShell commands, or running.ps1 script files Core language elements, such as operators, variables, arrays, and constants Cmdlets: Commands with parameters Stop-Process –name Calc #comment – stops calc.exe Verb-Noun names: Get-Item, Set-Location Can be aliased using shorter names: gci, pa Support for file system paths Get-Help cmdlet to provide help

SQL Server 2008 PowerShell Leverages the power of the SQL Server management object models Not a replacement for Transact-SQL scripts, but another tool to be used for scripting SQLPS.EXE SqlServerProviderSnapin100 SqlServerCmdletSnapin100

SQL 2008 PowerShell in SSMS

SQL Server 2008 PowerShell SQLSERVER:\ drive over SMO, PBM,DC, RegisteredServers Encode-SqlNameDecode-SqlNameConvert-UrnToPath SQLSERVER:\ drive over SMO, PBM,DC, RegisteredServers Encode-SqlNameDecode-SqlNameConvert-UrnToPathInvoke-SqlcmdInvoke-PolicyEvaluationInvoke-SqlcmdInvoke-PolicyEvaluation SQLPS.exe Microsoft.SqlServer.Management.PSSnapins.dllMicrosoft.SqlServer.Management.PSProvider.dll

PowerShell in Agent SQL Server Agent: SQL Server PowerShell subsystem Can now create PowerShell job steps Very similar to command prompt job steps Launches sqlps.exe with an input script

PowerShell Providers Implement a powershell drive Navigation similar to file paths: cmdletCanonical Alias cmd AliasUNIX Shell Alias Description Get-Locationglpwd Get the current node. Set-Locationslcd, chdir Change the current node. Get-ChilditemgcidirlsList the objects stored at the current node. Get-ItemgiReturn the properties of the current node. Move-ItemmimovemvMove an object. Rename-ItemrnirnrenRename an object. Remove-Itemridel, rdrm, rmdirRemove an object.

SQL Server PowerShell Provider Implements a SQLSERVER: drive. The SQLSERVER: drive implements four folders to support SQL Server management object models: FolderObject Models SQLSERVER:\SQLMicrosoft.SqlServer.Management.SMO Microsoft.SqlServer.Management.SMO.Agent Microsoft.SqlServer.Management.SMO.Broker Microsoft.SqlServer.Management.SMO.Mail SQLSERVER:\SQLPolicyMicrosoft.SqlServer.Management.DMF Microsoft.SqlServer.Management.Facets SQLSERVER:\SQLRegistrationMicrosoft.SqlServer.Management.RegisteredServers SQLSERVER:\DataCollectionMicrosoft.SqlServer.Management.Collector Microsoft.SqlServer.Management.CollectorEnum

SQLSERVER: PowerShell Paths You already know the object hierarchy: it’s very similar to the Object Explorer tree But it is slightly different (it’s the SMO model) Navigate using the PowerShell commands and their command prompt aliases Use dir (gci) and cd (sl) to investigate the path structure At each node you can use the methods and properties of the underlying management class

SQLSERVER: PowerShell Paths Structure Paths follow the hierarchy of the underlying object model 1 st node: SQLSERVER:\ 2 nd node: SQL\, SQLPolicy\, SQLRegistration\, or \DataCollection 3 rd and 4 th nodes: ComputerName\InstanceName 5 th and higher nodes alternate between collection classes and object classes

Create a Database Using SMO Create a database in the default instance on the local computer: cd SQLSERVER:\SQL\localhost\DEFAULT\Databases $MyDBVar = New-Object Microsoft.SqlServer.Management.SMO.Database $MyDBVar.Parent = (Get-Item..) $MyDBVar.Name = “NewDB” $MyDBVar.Create() dir $MyDBVar.Drop()

SQL Server Identifiers SQL Server identifiers allow characters which PowerShell may try to interpret Have three ways to deal with them: Encode hex value: %28local%29 This one always works Escape with ` character: `(local`) Quote: cd “SQLSERVER:\SQL\(local)” Use Encode-Sqlname and Decode-Sqlname to encode or decode quoted identifiers.

Final PowerShell Reminder While you can leverage a lot of what you learned from the command prompt, you’ll need to familiarize yourself with the new environment. While PowerShell looks a lot like the command prompt environment, it’s not exactly the same. While Invoke-Sqlcmd looks a lot like sqlcmd.exe, it’s not exactly the same.

SQL Server PowerShell Microsoft Confidential

The Road Ahead Incorporate PowerShell 2.0 Incorporate the PowerShell 2.0 visual editor Add support for other SQL Server management object models Analysis Services, Reporting Services, SSIS Additional cmdlets based on customer demand and common scenarios Additional documentation

References SQL Server 2008 Books Online: SQL Server PowerShell Overview SQL Server PowerShell Help Learning PowerShell Books Windows PowerShell in ActionWindows PowerShell in Action by Bruce Payette Windows PowerShell Cookbook Windows PowerShell Cookbook by Lee Holmes Whitepapers Windows Powershell Website

Feedback / QnA Your Feedback is Important! Please take a few moments to fill out our online feedback form at: > For detailed feedback, use the form at Or us at Use the Question Manager on LiveMeeting to ask your questions now!

© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.