Microsoft SQL Server 2014 for Oracle DBAs Module 9

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.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Module 8 Importing and Exporting Data. Module Overview Transferring Data To/From SQL Server Importing & Exporting Table Data Inserting Data in Bulk.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Reprint Outstanding Transactions Report © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
Moving Data Lesson 23. Skills Matrix Moving Data When populating tables by inserting data, you will discover that data can come from various sources.
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.
Feature: Payroll and HR Enhancements © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Co- location Mass Market Managed Hosting ISV Hosting.
05 | Configuration and Deployment Richard Currey | Senior Technical Trainer–New Horizons United George Squillace | Senior Technical Trainer–New Horizons.
Week 5 – Chap. 5 Data Transfer DBAs often must transfer data to and from text files, Excel spreadsheets, Access, Oracle or other SQL Server databases This.
Module 11: Data Transport. Overview Tools and functionality in Oracle and their equivalents in SQL Server for: Data transport out of the database Data.
Feature: Purchase Order Prepayments II © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
var site="s15gizmodo" var site="s15gizmodo"
Node.js on Windows Azure Name Title Microsoft Corporation.
Feature: OLE Notes Migration Utility
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Migrating to Windows Azure SQL Database Name Title Microsoft Corporation.
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 …
Virtual techdays INDIA │ august 2010 SQL Data Loading Techniques Praveen Srivatsa │ Director, AsthraSoft Consulting Microsoft Regional Director,
© 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.
demo Demo.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
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.
Ramesh Meyyappan SQL Server Performance Tuning Consultant & Trainer SQLWorkshops.comSQLWorkshops.com / SQLIO.comSQLIO.com.
© 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.

Microsoft SQL Server 2014 for Oracle DBAs Module 8
Data Platform and Analytics Foundational Training
7/22/2018 9:21 PM BRK3270 Building a Better Data Solution: Microsoft SQL Server and Azure Data Services Joey D’Antoni Principal Consultant Denny Cherry.
Deploying and Configuring SSIS Packages
Installation and database instance essentials
Возможности Excel 2010, о которых следует знать
Server & Tools Business
Title of Presentation 12/2/2018 3:48 PM
System Center Application Management
TechEd /15/2019 8:08 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Visual Studio 2010 SharePoint Development Tools Overview
Feature: Document Attachment - Flow from Master Records
Microsoft Virtual Academy
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.
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
Developing Windows Azure Applications with Visual Studio
5/8/2019 3:20 AM bQuery-Tool 3.0 A new and elegant way to create queries and ad-hoc reports on your Baan/Infor ERP LN data. This Baan session is a query.
Шитманов Дархан Қаражанұлы Тарих пәнінің
Title of Presentation 5/24/2019 1:26 PM
日本初公開!? Vista の新機能を実演 とっちゃん わんくま同盟 7/23/2019 9:09 AM
Presentation transcript:

Microsoft SQL Server 2014 for Oracle DBAs Module 9 11: Monitoring and performance tuning Microsoft SQL Server 2014 for Oracle DBAs Module 9   Data transport

Other Transfer Methods Module Overview 10: Data transport Other Transfer Methods  

Lesson 1: Getting data into and out of SQL Server 10: Data transport Demonstration: Bulk Copy and Bulk Insert  

Data out Oracle tools Data Pump Export Utility SQL*Plus DBMS_OUTPUT 10: Data transport Oracle tools Data Pump Export Utility SQL*Plus DBMS_OUTPUT UTL_FILE SQL Server tools SQL Server Integration Services (SSIS) BCP Sqlcmd.exe PowerShell SELECT or PRINT Linked Servers  1. Data Pump Export utility: Used for copying data and metadata into a series of operating system files called a dumpfile set. The dumpfile set can be moved to another system and loaded by the Data Pump Import utility. SSIS provides functionality similar to the Data Pump. SQL*Plus: Although this utility is primarily used to execute SQL and PL/SQL, it does have a SPOOL feature, which is used on a daily basis to create delimited files out of database data. DBMS_OUTPUT: Used to present output from stored procedures, triggers, or packages. This Oracle package is useful for debugging purposes UTL_FILE: Used to read or write to operating system files from inside PL/SQL programs using a restricted version of the I/O stream file. This feature can be used to create delimited or binary files from inside the database without any external utility. Oracle 12c SQL Server 2014

Demonstration: Exporting data using PowerShell 10: Data transport In this demonstration you will learn to: Manage data export with PowerShell Demonstration Steps Click Start → Run, type notepad.exe, and then enter the first few lines of the script below: #extract_contact.ps1 #This script will extract information for contacts #and write the results into text files named with the type name. Write-Host "Opening Connection" -foregroundcolor "green" $cn = new-object System.Data.SqlClient.SqlConnection("Data Source=SQLTBWS\INST01;Integrated Security=SSPI;Initial Catalog=AdventureWorks2012"); $cn.Open() Write-Host "Connection Opened and submitting query" -foregroundcolor "green" This code documents our script name and gives a brief description of what we are about to do. It then opens a connection to the database. Enter the next set of lines into the script: $q = "SELECT p.[FirstName]" $q = $q + " ,ISNULL(p.[MiddleName], '') as [MiddleName]" $q = $q + " ,p.[LastName]" $q = $q + " ,ISNULL(pp.[PhoneNumber], '') as [Phone]" $q = $q + " ,ISNULL(pe.[EmailAddress], '') as [Email]" $q = $q + " ,p.[PersonType]" $q = $q + " FROM [AdventureWorks2012].[Person].[Person] p" $q = $q + " LEFT JOIN [AdventureWorks2012].[Person].[PersonPhone] pp" $q = $q + " ON p.[BusinessEntityID] = pp.[BusinessEntityID]" $q = $q + " LEFT JOIN [AdventureWorks2012].[Person].[EmailAddress] pe" $q = $q + " ON p.[BusinessEntityID] = pe.[BusinessEntityID]" $q = $q + " WHERE p.[PersonType] <> 'EM'" $q = $q + " AND pp.[PhoneNumberTypeID] <> 1" $q = $q + " ORDER BY p.[PersonType], p.[BusinessEntityID]" (More notes on the next slide)

Data in SQL Server tools SQL Server Integration Services (SSIS) 10: Data transport SQL Server tools SQL Server Integration Services (SSIS) BCP Bulk Insert Sqlcmd.exe PowerShell SELECT INTO Linked Servers Oracle tools Data Pump Import Utility SQL*Plus CREATE TABLE   Parts Payroll Person SQL Server 2014

SQL Server data transport SQL Server offers several Bulk Copy commands and tools: BCP, the Bulk Copy utility, is used to transfer large volumes of data in and out of a database To export—data is dumped into a flat file in a delimited format To import—data is first exported from the source database or program and then imported into SQL Server database BULK INSERT command can be used within Transact-SQL programs to insert large volumes of data from a flat file Bulk copy API can be used in ODBC, OLE DB, SQL-DMO and SMO applications OPENROWSET (BULK…) can also be used to bulk import large object data in SQL Server  

Demonstration: Bulk Copy and Bulk Insert 10: Data transport In this demonstration you will learn to: Extract the data with the Bulk Copy Program (bcp) Use bcp and Bulk Insert to import data into new tables Demonstration Steps Click Start, Run and enter cmd, then enter the following command: bcp /? You see the parameters available for using bcp.Enter and run the following command: bcp AdventureWorks2012.HumanResources.Employee format null -T -S SQLTBWS\INST01 -N -f e:\Scripts\emp.fmt Navigate to e:\scripts Type the following to review the format NOTEPAD emp.fmt Close Notepad.Enter and turn the following command (notice the only difference is the ‘-x’ included to generate an XML file and the extension name change) : bcp AdventureWorks2012.HumanResources.Employee format null -T -S SQLTBWS\INST01 -N -x -f e:\Scripts\emp.xml NOTEPAD emp.xml Close Notepad.Enter and run the following command: bcp AdventureWorks2012.HumanResources.Employee out e:\Scripts\emp.bcp -S SQLTBWS\INST01 -T - N This will export the HumanResources.Employee table from the AdventureWorks2008 database. The parameters indicate the server name, the fact that we’re using a trusted connection, and to use native mode to store the data in the exported file, which we called emp.bcp. Wide Native mode preserves all of the SQL Server data types based on unicode and is the best way to move large amounts of data from one SQL Server database to another. Other formats are more suited to (More notes on the next slide)

Lesson 2: Understanding SQL Server Integration Services 10: Data transport SSIS tools  

Introducing SQL Server Integration Services (SSIS) 10: Data transport SQL Server Integration Services offers several tools to extract, transform and load data from multiple data sources into SQL Server databases and vice versa Provides control over data flow, looping and conditioning Packages can be built using SSIS designer in Business Intelligence Development Studio Import / Export wizard Database Export utility  

Elements of Integration Services 10: Data transport SQL Server Integration Services Service (MsDtsSrvr.exe) Package Control flow elements Containers Tasks Precedence constraints Data flow elements Event handlers Variables Configurations  

SSIS tools SSIS tools are used to create, modify and execute packages 10: Data transport SSIS tools are used to create, modify and execute packages SSIS Import / Export wizard Assists in building simple packages to import, export, and transform data or to copy database objects SSIS Designer inside SQL Server Data Tools (SSDT) Graphical application that lets us build and debug packages containing complex workflows, multiple connections to heterogeneous data sources, and event-driven logic SSIS Package Execution utilities dtexecui.exe dtexec.exe dtutil.exe is a tool used to manage SSIS packages  

Lesson 3: Other Transfer Methods 10: Data transport Change Data Capture Service for Oracle by Attunity  

Using the Copy Database wizard 10: Data transport Copy Data Wizard (CDW) can be used to copy or move databases across SQL Server instances Provides two methods: Attach / Detach Using SQL Server Management Objects (SMO) A proxy account must be created in order to run SSIS package created by CDW  

Demonstration: Database Import/Export wizard 10: Data transport In this demonstration you will learn to: Move infrequent data transformations with a wizard Demonstration Steps In SQL Server Management Studio, open a New Query window and execute the following T-SQL statements to clear the US Addresses table: USE AdventureWorks2012 GO TRUNCATE TABLE Person.US_AddressList GORight-click the AdventureWorks2012 database and select Tasks, Import Data. In the Welcome to SQL Server Import and Export Wizard click Next. In the Data Source dialog, set the server name to SQLTBWS\INST01, the authentication to Use Windows Authentication, and the database to AdventureWorks2012, and click Next. Select the exact same values for the Destination dialog. In the Specify Table Copy or Query dialog, select the “Write a Query” button and click Next. In the Source Query dialog, enter the following query in the SQL Statement property: SELECT p.[BusinessEntityID] ,p.[FirstName] ,p.[LastName] ,a.[AddressLine1] ,a.[AddressLine2] ,a.[City] ,s.[StateProvinceCode] ,s.[CountryRegionCode] ,a.[PostalCode] (More notes on the next slide)

Copying databases to Windows Azure 10: Data transport Deploy database to Windows Azure VM wizard Used to deploy a database to a virtual machine hosted on Windows Azure. Microsoft manages the VM hosting, you manage the database on the VM. Deploy database to Windows Azure SQL Database wizard Used to deploy to Windows Azure SQL Database service This service is fully managed by Microsoft  

Change Data Capture Service for Oracle by Attunity 10: Data transport Affordable, efficient and real-time data integration of Oracle data Uses Oracle transaction logs to load data into SQL Server Uses SQL Server Change Data Capture to reflect changes to the data Can be extended using Attunity Oracle CDC for SSIS for more complex scenarios  

Other Transfer Methods Module Overview 10: Data transport Other Transfer Methods  Next module Back up and recovery

© 2014 Microsoft Corporation. All rights reserved © 2014 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.