Amazon Redshift Guia do Utilizador

Consulte online ou descarregue Guia do Utilizador para Software Amazon Redshift. Amazon Redshift User guide Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 255
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes

Resumo do Conteúdo

Página 1 - Amazon Redshift

Amazon RedshiftManagement GuideAPI Version 2012-12-01

Página 2

Database Audit LoggingYou can use the database audit logging feature to track information about authentication attempts,connections, disconnections, c

Página 3 - Table of Contents

If you select a smaller number of days to retain snapshots in the destination region, any automatedsnapshots that were taken before the new retention

Página 4

import com.amazonaws.services.redshift.model.DescribeClusterSnapshotsResult;import com.amazonaws.services.redshift.model.Snapshot;public class CreateA

Página 5

DescribeClusterSnapshotsRequest request = new DescribeClusterSnapshots Request() .withEndTime(creationDate) .withCluster

Página 6

Managing Snapshots Using the Amazon RedshiftCLI and APIYou can use the following Amazon Redshift CLI operations to manage snapshots.• authorize-snapsh

Página 7 - What Is Amazon Redshift?

Amazon Redshift DatabaseEncryptionTopics• Overview (p. 98)• Hardware Security Modules (p. 99)• Rotating Encryption Keys (p. 105)OverviewAmazon Redshif

Página 8 - Cluster Access and Security

(SOX), the Health Insurance Portability and Accountability Act (HIPAA), and other such regulations provideguidelines for handling specific types of da

Página 9 - Monitoring Clusters

You can use the following procedures to configure hardware security modules by using the AWSManagement Console.Creating an HSM Connection1. Sign into

Página 10 - Databases

5. After the connection is created, you can create an HSM client certificate. If you want to create anHSM client certificate immediately after creatin

Página 11 - Amazon Redshift Clusters

4. On the Create HSM Client Certificate page, type a name in the HSM Client Certificate Identifierbox to identify this client certificate.5. Click Nex

Página 12 - About Clusters and Nodes

c. Paste the public key into the open file and save it with the file name displayed in step 1 from theconfirmation page. Make sure that you save the f

Página 13 - Dense Compute Node Types

Amazon Redshift ClustersTopics• Overview (p. 5)• About Clusters and Nodes (p. 6)• Resizing a Cluster (p. 8)• Supported Platforms to Launch Your Cluste

Página 14 - Resizing a Cluster

Displaying the Public Key for an HSM Client Certificate1. Sign into the AWS Management Console and open the Amazon Redshift console at https://console

Página 15 - EC2-VPC Platform

Configuring HSM Using the Amazon Redshift CLIand APIYou can use the following Amazon Redshift CLI operations to manage hardware security modules.• cre

Página 16 - Maintenance Windows

2. In the navigation pane, click Clusters.3. In the list, click the cluster for which you want to rotate keys.4. Click Database, and then click Rotate

Página 17 - Renaming Clusters

Purchasing Amazon RedshiftReserved NodesTopics• Overview (p. 107)• Purchasing a Reserved Node Offering with the Amazon Redshift Console (p. 108)• Purc

Página 18

account will be billed for the up-front and recurring charges of the reserved nodes that you purchased.Amazon Redshift has a predefined list of the re

Página 19

Listing Reserved Node OfferingsTo list reserved node offerings1. Sign into the AWS Management Console and open the Amazon Redshift console at https://

Página 20 - Creating a Cluster

4. In the Purchase Reserved Nodes wizard, specify Node Type, Term, Offering Type, and Numberof Nodes.5. When the settings are as you want them, click

Página 21

Purchasing a Reserved Node Offering Using theAWS SDK for JavaThe following example demonstrates how to use the AWS SDK for Java to do the following:•

Página 22

public static String nodeTypeToPurchase = "dw.hs1.xlarge"; public static Double fixedPriceLimit = 10000.00; public static ArrayLis

Página 23

} private static void purchaseReservedNodeOffer() throws IOException { if (matchingNodes.size() == 0) { return; } else

Página 24

NoteAlthough the console displays this information in one field, it is two parameters in the AmazonRedshift API: ClusterVersion and ClusterRevisionNum

Página 25

System.out.format("Offering Type: %s\n", node.getOfferingType()); System.out.format("Duration: %s\n", node.getDurat

Página 26 - Modifying a Cluster

Controlling Access to AmazonRedshift ResourcesYou can use AWS Identity and Access Management (IAM) to control which AWS users can create,configure, or

Página 27 - To modify a cluster

Using IAM Users, Groups, and Policies for ClusterManagementAmazon Redshift uses AWS Identity and Access Management (IAM) to control which users in you

Página 28

To create the Administrators group1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/iam/.2. In the n

Página 29 - Rebooting a Cluster

"Resource": [ "arn:aws:redshift:us-east-1:123456789012:snapshot:my-cluster*" ] } ]}IAM Policy Action

Página 30

• Restoring a cluster from a snapshot.• Revoking cluster snapshot access.Some Amazon Redshift actions, such as copying a cluster snapshot and restorin

Página 31

Constructing an Amazon Redshift ARNYou can identify resources that are created in Amazon Web Services by a unique identifier called anAmazon Resource

Página 32

The following table shows examples of ARNs for Amazon Redshift resources that have an AWS accountof 123456789012, that were created in the US East (No

Página 33

Example 1: Allow an IAM user full access to all Amazon Redshift actions and resourcesThe following policy allows access to all Amazon Redshift actions

Página 34

Example 3: Manage clustersThe following policy allows a user to create, delete, modify, and reboot all clusters, and then deniespermission to delete a

Página 35

being sent back to the client applications. For more information about leader nodes and compute nodes,go to Data warehouse system architecture in the

Página 36

Example 4: Allow a user to authorize and revoke snapshot accessThe following policy allows a user, for example UserA, to do the following:• Authorize

Página 37

], "Effect": "Allow" } ]}Example 5: Allow a user permissions to copy a cluster snapshot and restore a clusterfrom a

Página 38 - Cloud (VPC)

Example 6: Grant permission to Amazon Redshift and to common actions and resourcesfor related AWS servicesThe following example policy allows access t

Página 39 - Creating a Cluster in a VPC

} ]}API Version 2012-12-01127Amazon Redshift Management GuideExample Policies for Amazon Redshift

Página 40

Accessing Amazon RedshiftClusters and DatabasesThere are several management tools and interfaces you can use to create, manage, and delete AmazonRedsh

Página 41

• Signing an HTTP Request (p. 131)• Setting Up the Amazon Redshift CLI (p. 134)Amazon Redshift supports several management interfaces that you can use

Página 42

The AmazonRedshiftClient class defines methods that map to underlying Amazon Redshift QueryAPI actions. (These actions are described in the Amazon Red

Página 43 - Cluster Subnet Groups

2. Put the code that you want to run in a .java file, and save the file in the src folder. To illustrate theprocess, we use the code from Managing Clu

Página 44

function includes the text of your request and your secret access key. The hash function returns a hashvalue that you include in the request as your s

Página 45

&NodeType=dw.hs1.xlarge &Version=2012-12-01 &x-amz-algorithm=AWS4-HMAC-SHA256 &x-amz-credential=AKIAIOSFODNN7EXAMPLE/20121207

Página 46

compute nodes, you purchase what are called reserved node offerings.You purchase one offering foreach compute node that you want to reserve.When you r

Página 47

Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20121207/us-east-1/redshift/aws4_request, SignedHeaders=content-type;host;x-amz-date,

Página 48

• Step 6: Delete Your Sample Cluster (p. 138)To help you get started using the command line interface, this section shows how to perform basicadminist

Página 49

Parameter Value for This ExerciseParameter NameTopSecret1Master Passworddw1.xlarge or the node size that you want to use.For more information, see Abo

Página 50

To allow network ingress to your cluster, type the following command:aws redshift authorize-cluster-security-group-ingress --cluster-security-group-na

Página 51

Step 5: Create Tables, Upload Data, and Try Example QueriesFor information about creating tables, uploading data, and issuing queries, go to the Amazo

Página 52

• Configure an ODBC Connection (p. 144)• Configure Security Options for Connections (p. 158)JDBC and ODBC Drivers for Amazon RedshiftTo work with data

Página 53

Configure a JDBC ConnectionYou can use a JDBC connection to connect to your Amazon Redshift cluster from many third-party SQLclient tools.To do this,

Página 54

jdbc:redshift://endpoint:port/databaseNoteA JDBC URL specified with the former format of jdbc:postgresql://endpoint:port/databasewill still work.Value

Página 55

JDBC Driver Configuration OptionsTo control the behavior of the Amazon Redshift JDBC driver, you can append the configuration optionsdescribed in the

Página 56

DescriptionDefaultValueMatchingPostgr-eSQL Op-tion Ex-ists?JDBC OptionThe amount of logging information output by the driver.By default, no logging is

Página 57

You can get the dig utility as part of the BIND software download. For more information on BIND, go toBIND in the Internet Systems Consortium document

Página 58

DescriptionDefaultValueMatchingPostgr-eSQL Op-tion Ex-ists?JDBC OptionThe user name to use to connect to the Amazon Red-shift server.YesUIDConfigure a

Página 59

ValueFieldThe user name of a user account that has permission to connect to the database.This value is a database permission, not an Amazon Redshift p

Página 60

Install and Configure the Amazon Redshift ODBC Driver on MicrosoftWindows Operating SystemsSystem RequirementsYou install the Amazon Redshift ODBC dri

Página 61

3. Select the System DSN tab if you want to configure the driver for all users on the computer, or theUser DSN tab if you want to configure the driver

Página 62 - Amazon Redshift Parameter

• Retrieve Entire Result Into Memory. Select this option if you want query results to be returned allat once to the SQL client tool or application. Th

Página 63 - Result Set

• unixODBC 2.3.0 or later. For more information about the unixODBC driver manager and links todownload it, go to the unixODBC website.• An Amazon Reds

Página 64

zypper install AmazonRedshiftODBC-1.x.x.xxxx-x.x86_64.rpmImportantWhen you have finished installing the drivers, configure them for use on your system

Página 65

Configure the ODBC Driver on Linux and Mac OS X Operating SystemsOn Linux and Mac OS X operating systems, you use an ODBC driver manager to configure

Página 66

Database=database_namelocale=localeThe following example shows the configuration for odbc.ini on Linux operating systems:[ODBC Data Sources]Amazon_Red

Página 67

Use the following format on Linux operating systems:[ODBC Drivers]driver_name=Installed...[driver_name]Description=driver_descriptionDriver=path/drive

Página 68 - User Group Wildcard

For more information about Amazon Virtual Private Cloud (Amazon VPC), go to the Amazon VPC productdetail page.Choose a PlatformYour AWS account is cap

Página 69

Configuring Environment Variables for Driver Configuration FilesIn order for the Amazon Redshift ODBC driver to function properly, you need to set a n

Página 70

ODBC Driver Configuration OptionsYou can use the configuration options described in the following table to control the behavior of theAmazon Redshift

Página 71 - Query Group Wildcard

DescriptionDefaultValueMatchingPostgr-eSQL op-tion ex-ists?ODBC OptionThe number of seconds of inactivity before the driversends a TCP keepalives pack

Página 72

DescriptionDefaultValueMatchingPostgr-eSQL op-tion ex-ists?ODBC OptionWhen this option is enabled (1), the driver returns TEXTcolumns as LONG VARCHAR

Página 73

DescriptionDefaultValueMatchingPostgr-eSQL op-tion ex-ists?ODBC OptionWhen this option is enabled (1), the driver returns dataas Unicode character typ

Página 74

Amazon Redshift supports the Elliptic Curve Diffie—Hellman Ephemeral (ECDHE) key agreement protocol.With ECDHE, the client and server each have an ell

Página 75

Resultrequire_SSL(server)sslmode (cli-ent)The connection is encrypted and the server certificate is verified.falseverify-caConnect Using the Server Ce

Página 76

${JAVA_HOME}/bin/keytool -keystore <keystore_name> -alias <alias> -import -file<certificate_filename>Where <keystore_name> is

Página 77

The following is an example connection string for SQL Workbench/J:jdbc:redshift://examplecluster.abc123xyz789.us-west-2.redshift.amazon aws.com:5439/d

Página 78 - Operating Systems

2. Go to the Installing and starting SQL Workbench/J page. Follow the instructions for installing SQLWorkbench/J on your system.NoteSQL Workbench/J re

Página 79 - Creating a Parameter Group

• EU (Ireland) region: 22:00-06:00 UTCWhile Amazon Redshift is performing maintenance, it terminates any queries or other operations that arein progre

Página 80 - Modifying a Parameter Group

If the Please select one driver dialog box displays, select com.amazon.redshift.jdbc4.Driver orcom.amazon.redshift.jdbc41.Driver and click OK. SQL Wor

Página 81

Test the SQL Workbench/J ConnectionAfter you configure your JDBC or ODBC connection, you can test the connection by running an examplequery.1. If you

Página 82 - Deleting a Parameter Group

Connect to Your Cluster by Using the psql ToolAfter you create an Amazon Redshift cluster, you can use psql, a terminal-based front end fromPostgreSQL

Página 83 - SDK for Java

3. At a command prompt, specify the connection information by using either command line parametersor a connection information string. To use parameter

Página 84

For more information about connection information string parameters, see http://www.postgresql.org/docs/8.4/static/libpq-connect.html.To connect by us

Página 85

4. At the psql password prompt, enter the password for the <userid> user.You are connected to the cluster, and you can interactively enter comma

Página 86

Example : Connect to a Cluster by Using JavaThe following example connects to a cluster and runs a sample query that returns system tables. It is notn

Página 87

//Retrieve two columns. String catalog = rs.getString("table_catalog"); String name = rs.getString(&

Página 88 - Amazon Redshift Snapshots

Example Connect to a Cluster by Using .NETThe following example connects to a cluster and runs a sample query that returns system tables. It doesnot s

Página 89 - Manual Snapshots

// Make a connection using the psqlODBC provider. OdbcConnection conn = new OdbcConnection(connString);

Página 90 - Sharing Snapshots

You might rename a cluster if you want to change the cluster to which your applications connect withouthaving to change the endpoint in those applicat

Página 91

Your client connection to the database appears to hang or timeout when running long queries, such asa COPY command. In this case, you might observe th

Página 92

sysctl net.inet.tcp.keepidlesysctl net.inet.tcp.keepintvlsysctl net.inet.tcp.keepinitsysctl net.inet.tcp.always_keepaliveTo change DSN timeout setting

Página 93 - Creating a Manual Snapshot

• If you created your Amazon Redshift cluster in a VPC, you need to add your client CIDR/IP addressto the VPC security group in Amazon VPC. For more i

Página 94 - Copying an Automated Snapshot

Review the MTU value for the Ethernet adapter in the output. If the value is not 1500, run the followingcommand to set it:netsh interface ipv4 set sub

Página 95

SELECT ut.userid, trim(u.usename), COUNT(text) as count FROM stl_utilitytext ut JOIN pg_user u ON ut.userid = u.usesysid WHERE ut.text LIKE 'SAVE

Página 96

Monitoring Amazon RedshiftCluster PerformanceTopics• Overview (p. 179)• Summary of Amazon Redshift Performance Data (p. 180)• Working with Performance

Página 97 - Sharing a Cluster Snapshot

(as compared to Bytes/s in Amazon CloudWatch), which is a more relevant unit for the typical storagespace of a node.• Performance data for the nodes o

Página 98

DescriptionMetricThe number of database connections to a cluster.Units: CountDimensions: ClusterIdentifierDatabaseConnec-tionsIndicates the health of

Página 99 - Snapshot Copy

DescriptionMetricThe percent of disk space used.Units: PercentDimensions: NodeID, ClusterIdentifierPercenta-geDiskSpaceUsedThe average number of disk

Página 100

The following table describes different aspects of query and load data you can access in the AmazonRedshift console.DescriptionQuery/Load DataA list o

Página 101

Managing Clusters Using the ConsoleThis topic explains how to work with clusters in the Amazon Redshift console.You can use the Clusterssection in the

Página 102

Health of the cluster (e.g. healthy), whether the cluster is undergoing maintenance, and count of recentevents. From the dashboard, select a cluster t

Página 103 - CLI and API

By default, the performance view displays cluster performance over the past hour. If you need to finetune the view you have filters that you can use a

Página 104 - Encryption

The following example shows the NetworkReceiveThroughput for a cluster with two nodes. It showsa line for the leader and two compute nodes. Note that

Página 105 - Hardware Security Modules

Use the button bar, shown following, to refresh the data in the table, to configure the columns that appearin the table, or to open the Amazon Redshif

Página 106 - Creating an HSM Connection

3. In the Cluster list, click the cluster you want to open.4. Click the Queries tab.5. Do one of the following:• In the list, select the query or quer

Página 107 - API Version 2012-12-01

Analyzing Query ExecutionThe Query Execution Details section of the Query view provides information about the way the querywas processed.This section

Página 108

The Avg statistic shows the average execution time for the step across data slices, and the percentageof the total query runtime that represents. The

Página 109

The information on the Plan tab is analogous to running the EXPLAIN command in the database. TheEXPLAIN command examines your query text, and returns

Página 110 - Deleting an HSM Connection

For more information about the difference between the explain plan and system views and logs, go toMapping the Query Plan to System Views in the Amazo

Página 111 - Rotating Encryption Keys

5. In the query list, find the query you want to work with, and click the query ID in the Query column.In the following example, the queries are sorte

Página 112 - Redshift CLI and API

Amazon Redshift: Management GuideCopyright © 2015 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.The following are trademarks of

Página 113 - Reserved Nodes

Creating a ClusterBefore you create a cluster, review the information in the Overview (p. 5) of this section.To create a cluster1. Sign in to the AWS

Página 114 - Amazon Redshift Console

Viewing Cluster Metrics During Load OperationsWhen you view cluster performance during load operations, you can identify queries that are consumingres

Página 115

6. In the new Query tab that is opened, you can view the details of the load operation.At this point, you can work with the Query tab as shown in View

Página 116

3. In the Cluster list, select the cluster for which you want to view cluster performance during queryexecution.4. Select the Events+Alarms tab.5. Cli

Página 117 - AWS SDK for Java

7. In the list of alarms, find your new alarm.You may need to wait a few moments as sufficient data is collected to determine the state of thealarm as

Página 118

• First, you specify the metric dimension to work with. A dimension is a name-value pair that helps youto uniquely identify a metric. The dimensions f

Página 119

Amazon Redshift EventsTopics• Overview (p. 199)• Viewing Events Using the Console (p. 199)• Viewing Events Using the AWS SDK for Java (p. 201)• View

Página 120 - Amazon Redshift CLI and API

An event source type indicates what the event was about. The following source types are possible:Cluster, Cluster Parameter Group, Cluster Security Gr

Página 121 - Redshift Resources

Viewing Events Using the AWS SDK for JavaThe following example lists the events for a specified cluster and specified event source type.The examplesho

Página 122 - Management

} } while (marker != null); } static void printEvent(Event event) { if (event == null) {

Página 123

text message, or a call to an HTTP endpoint. For example, all regions support email notifications, butSMS notifications can only be created in the US

Página 124

• It must be from 8 to 64 characters in length.• It must contain at least one uppercase letter.• It must contain at least one lowercase letter.• It mu

Página 125

• Subscription specifies a source type of cluster, a source ID of my-cluster-1, a category of Monitoring,and a severity of ERROR.The subscription will

Página 126

DescriptionEventSeverityEvent IDAmazonRedshiftCategoryYour Amazon Redshift cluster [cluster name] wasmodified to use parameter group [parameter groupn

Página 127

DescriptionEventSeverityEvent IDAmazonRedshiftCategoryThe resize for your Amazon Redshift cluster[cluster name] is in progress.Your cluster is inread-

Página 128

DescriptionEventSeverityEvent IDAmazonRedshiftCategoryThe Amazon Redshift cluster [cluster name] can-not be created using EIP [IP address]. The EIPcan

Página 129 - Example 3: Manage clusters

DescriptionEventSeverityEvent IDAmazonRedshiftCategoryCluster security group [group name]was created.INFOREDSHIFT-EVENT-4002SecurityCluster security g

Página 130

DescriptionEvent Sever-ityEvent IDAmazon Red-shift CategoryThe user snapshot [snapshot name] for yourAmazon Redshift cluster [cluster name] failedat [

Página 131

ii. Select an event severity from the Severity dropdown menu. If you select Any, events withseverities of either INFO or ERROR are published. If you s

Página 132

e. Use one of three tabs to specify the Amazon SNS topic the subscription will use to publishevents.i. To select an existing Amazon SNS topic by from

Página 133

5. To create the subscription, click Create.To delete the definition without creating a subscription, clickCancel. To return to the subscription setti

Página 134 - Clusters and Databases

a. Use the Subscription Settings pane to change the event filter criteria. As you select the criteria,the Subscribed Events list displays the Amazon R

Página 135

5. On the Additional Configuration page, specify values for the following options, and then clickContinue.a. Under Provide the optional additional con

Página 136 - Command Line

Removing a Source Identifier from an Amazon Redshift EventNotification SubscriptionYou can remove a source identifier (the Amazon Redshift source gene

Página 137 - Signing an HTTP Request

Database Audit LoggingTopics• Overview (p. 215)• Amazon Redshift Logs (p. 215)• Enabling Logging (p. 217)• Managing Log Files (p. 218)• Troubleshootin

Página 138 - Example Signature Calculation

The user activity log is useful primarily for troubleshooting purposes. It tracks information about the typesof queries that both the users and the sy

Página 139

DescriptionColumn nameAction that occurred. Valid values:• Alter• Create• Drop• RenameactionIf true (1), indicates that the user has create database p

Página 140 - Installation Instructions

The connection log, user log, and user activity log are enabled together by using the AWS ManagementConsole, the Amazon Redshift API Reference, or the

Página 141 - Step 2: Launch a Cluster

Account IDRegion361669875840Asia Pacific (Singapore) region762762565011Asia Pacific (Sydney) regionThe bucket policy uses the following format, where

Página 142

"Action": "s3:GetBucketAcl", "Resource": "arn:aws:s3:::AuditLogs" } ]}For more information about creatin

Página 143

Using AWS CloudTrail for Amazon RedshiftThis service supports AWS CloudTrail, which is a service that records AWS calls for your AWS accountand delive

Página 144 - Connecting to a Cluster

7. Optionally, in the S3 Key Prefix box, type a prefix to add to the S3 bucket.8. Click Save.After you configure audit logging, the Cluster details pa

Página 145

Disabling Audit Logging Using the Console1. Sign into the AWS Management Console and open the Amazon Redshift console at https://console.aws.amazon.co

Página 146 - Configure a JDBC Connection

your own CMK gives you more flexibility, including the ability to create, rotate, disable,define access controls for, and audit the encryption keys us

Página 147

Tutorial: Resizing Clusters inAmazon RedshiftTopics• Overview (p. 224)• Resize Operation Overview (p. 224)• Snapshot, Restore, and Resize Operation Ov

Página 148

the amount of data and the number of nodes in the smaller cluster. It can take anywhere from a coupleof hours to a couple of days.When you start the r

Página 149

4. Resize the target cluster. Select the new node type, number of nodes, and other settings for the targetcluster.5. Review the loads from your ETL pr

Página 150 - Configure an ODBC Connection

PrerequisitesBefore you start this tutorial, make sure that you have the following prerequisites:• A sample cluster. In this example, you’ll start wit

Página 151

Step 2: Delete the Sample ClusterAfter you are sure that you no longer need the sample cluster, you can delete it. In a productionenvironment, whether

Página 152 - Windows Operating Systems

• Step 2: Restore the Snapshot into the Target Cluster (p. 230)• Step 3: Verify Data in the Target Cluster (p. 231)• Step 4: Resize the Target Cluster

Página 153

5. In the navigation pane, click Snapshots and verify that a new manual snapshot is being created. Thesnapshot status will be creating.Step 2: Restore

Página 154 - System Requirements

Snapshot Identifier: check the snapshot name, examplecluster-source.•• Cluster Identifier: type examplecluster-target.• Port: leave the port number as

Página 155

FROM pg_table_def WHERE tablename = 'sales'; -- Find total sales on a given calendar date.SELECT sum(qtysold) FROM sales, date WHERE

Página 156

5. Click Resize.6. Click Status, and review the resize status information to see the resize progress.Step 5: Copy Post-Snapshot Data from the Sourceto

Página 157 - Configuring the odbc.ini File

Cluster Subnet GroupSelect the Amazon Redshift subnet group in which to launch the cluster.NoteThis option is available only for clusters in a VPC.Pub

Página 158

First, you’ll use the following COPY statements to load new data from Amazon S3 to the tables in yourAmazon Redshift TICKIT database in the target clu

Página 159

2. In the navigation pane, click Clusters, and then click the cluster to open. If you are using the samecluster from this tutorial, click exampleclust

Página 160

2. In the navigation pane, click Clusters, and then click the cluster to open. If you are using the samecluster names from this tutorial, click exampl

Página 161

Limits in Amazon RedshiftTopics• Quotas and Limits (p. 237)• Naming Constraints (p. 238)Quotas and LimitsAmazon Redshift has quotas that limit the num

Página 162

Naming ConstraintsThe following table describes naming constraints within Amazon Redshift.• A cluster identifier must contain only lowercase character

Página 163

• A cluster security group name must contain no more than255 alphanumeric characters or hyphens.• It must contain only lowercase characters.• It must

Página 164 - Connect Using SSL

Tagging Resources in AmazonRedshiftTopics• Tagging Overview (p. 240)• Managing Resource Tags Using the Console (p. 241)• Managing Tags Using the Amazo

Página 165

• EC2 security group• HSM connection• HSM client certificate• Parameter group• Snapshot• Subnet groupTagging RequirementsTags have the following requi

Página 166

After you add key pairs to a resource, they display in the Applied Tags section; this is the tag set for theresource.You can modify a tag value, but y

Página 167

DescriptionResourceIn the left navigation pane, click Security. On the HSM Certificates tab, select acertificate from the list. Then click Manage Tags

Página 168 - Install SQL Workbench/J

d. Under Optionally create a basic alarm for this cluster, configure the following options, andthen click Continue:Create CloudWatch AlarmClick Yes if

Página 169

• CreateCluster• CreateClusterParameterGroup• CreateClusterSecurityGroup• CreateClusterSnapshot• CreateClusterSubnetGroup• CreateHsmClientCertificate•

Página 170

Document HistoryThe following table describes the important changes to the Amazon Redshift Management Guide.Latest documentation update: April 30, 201

Página 171

Release DateDescriptionChangeJanuary 26, 2015Added a troubleshooting topic about an issue wherequeries fail to complete in the SQL client tool and the

Página 172

Release DateDescriptionChangeOctober 30, 2014Added links to the Microsoft Visual C++ 2010 Redistribut-able Packages that are required for Amazon Redsh

Página 173

Release DateDescriptionChangeApril 18, 2014Added statement about Amazon Redshift support for theElliptic curve Diffie—Hellman (ECDH) key agreementprot

Página 174

Release DateDescriptionChangeDecember 6, 2013Added information about the new user activity log and theenable_user_activity_logging database parameterf

Página 175

7. After you initiate the creation process, click Close.The cluster might take several minutes to beready to use.You can monitor the status of the ope

Página 176

If you decrease the automated snapshot retention period, existing automated snapshots whose settingsfall outside of the new retention period are delet

Página 177

Shutting Down or Deleting a ClusterIf you no longer need your cluster, you can shut it down or delete it. If you plan to provision a new clusterwith t

Página 178

After you initiate the shutdown of the cluster, it can take several minutes for the cluster to be shutdown.You can monitor the status in the cluster l

Página 179 - Redshift

Table of ContentsWhat Is Amazon Redshift? ...

Página 180

4. In the Reboot Clusters window, confirm that you want to reboot this cluster, and then click Reboot.It can take several minutes for the cluster to b

Página 181

3. On the Configuration tab of the cluster details page, click Cluster and then click Resize.4. In the Resize Clusters window, configure the resize pa

Página 182

Getting Information About Cluster ConfigurationTo get cluster configuration details1. Sign in to the AWS Management Console and open the Amazon Redshi

Página 183 - Set MTU on Mac OS X

3. Click the Status tab.The status summary page is displayed as shown in the following screenshot.Taking a Snapshot of a ClusterYou can take a snapsho

Página 184

4. In the Create Snapshot dialog box, do the following:a. In the Cluster Identifier box, click the cluster that you want to take a snapshot of.b. In t

Página 185 - Cluster Performance

5. In the Edit Alarm window, edit any values that you want to change, such as the percentage orminutes.6. To change the Amazon SNS topic that the alar

Página 186 - Amazon Redshift Metrics

For step-by-step instructions to run the following example, see Running Java Examples for AmazonRedshift Using Eclipse (p. 130).You need to update the

Página 187

ModifyClusterRequest request = new ModifyClusterRequest() .withClusterIdentifier(clusterIdentifier) .withPreferredMaintenance

Página 188

You can use the following Amazon Redshift APIs to manage clusters.• CreateCluster• DeleteCluster• DescribeClusters• DescribeClusterVersions• DescribeO

Página 189 - Redshift Console

If you have a publicly accessible cluster in a VPC, and you want to connect to it by using the privateIP address from within the VPC, you must set the

Página 190

Configuring the wlm_json_configuration Parameter ... 69Managing Parameter Groups Using the Co

Página 191 - Cluster Metrics: Examples

Started Guide. Make a note of the VPC identifier, subnet, and subnet's availability zone.You willneed this information when you launch your clust

Página 192

Now you are ready to use the cluster.You can follow the Getting Started steps to test the cluster byuploading sample data and trying example queries.M

Página 193 - Terminating a Running Query

all service levels, you might want to create separate VPC security groups, one for each service level.Youcan then associate these VPC security groups

Página 194 - Viewing Query Details

(highlighted), you can edit or delete it.The details of the selected security group are shown under ClusterSubnet Group Details.Creating a Cluster Sub

Página 195 - Analyzing Query Execution

5. Click Yes, Create.The new group will be displayed in the list of cluster subnet groups.Modifying a Cluster Subnet GroupTo modify a cluster subnet g

Página 196

Do this...To...In the lists of subnets in use for the group, click Remove next tothe subnet to remove.Click Save.Remove a subnet from thegroup.Deletin

Página 197

• Creating a cluster subnet group.• Listing metadata about a cluster subnet group.• Modifying a cluster subnet group.For step-by-step instructions to

Página 198

DescribeClusterSubnetGroupsRequest request1 = new DescribeClusterSubnet GroupsRequest() .withClusterSubnetGroupName(clusterSubnetGr

Página 199

subnet.getSubnetAvailabilityZone().getName(), subnet.getSub netStatus()); } }}Manage Cluster Subnet Groups Using Amazon

Página 200

Amazon Redshift Cluster SecurityGroupsWhen you provision an Amazon Redshift cluster, it is locked down by default so nobody has access toit. To grant

Página 201 - Creating an Alarm

Configuring Connections in Amazon Redshift ... 138Connecting to Clusters From Client To

Página 202

might want to create separate cluster security groups, one for each company.You can add rules in eachcluster security group to identify the Amazon EC2

Página 203 - CloudWatch Console

You cannot delete the default cluster security group, but you can modify it by authorizing or revokingingress access.To add or modify the rules associ

Página 204

Tagging a Cluster Security GroupTo tag a cluster security group1. Sign into the AWS Management Console and open the Amazon Redshift console at https:/

Página 205 - Amazon Redshift Events

b. Add a tag.• In the Add Tags section, type a key/value pair for the tag.• Click Apply Changes.For more information about tagging an Amazon Redshift

Página 206 - Filtering Events

5. In the Add Connection Type dialog, do one of the following:a. Add an ingress rule based on CIDR/IP.• In the Connection Type box, click CIDR/IP.• In

Página 207

Revoking Ingress Rules for a Cluster SecurityGroupTo revoke ingress rules for a cluster security group1. Sign into the AWS Management Console and open

Página 208 - Overview

a. Remove a tag.• In the Applied Tags section, select Delete next to the tag you want to remove.• Click Apply Changes.b. Add a tag.NoteTagging an EC2

Página 209

For more information about tagging an Amazon Redshift resource, see How to Manage Tags in theAmazon Redshift Console (p. 243).Deleting a Cluster Secur

Página 210 - Messages

4. In the Delete Cluster Security Groups dialog box, click Continue.If the cluster security group is used by a cluster, you will not be able to delete

Página 211

By default, when a new cluster security group is created, it has no ingress rules.This example modifiesa new cluster security group by adding two ingr

Página 212

Step 7: Delete the Source Cluster ... 235Step 8: Clean Up Your Environme

Página 213

.withClusterSecurityGroupName(clusterSecurityGroupName) .withCIDRIP("192.168.40.5/32"); ClusterSecurityGroup r

Página 214

null."); return; } System.out.println("\nPrinting security group results:"); for (ClusterSecurityGroup

Página 215

Amazon Redshift ParameterGroupsTopics• Overview (p. 56)• Configuring the Maximum Size of a Cursor Result Set (p. 57)• Configuring Workload Management

Página 216

ValueParameter Name0extra_float_digitsdefaultmax_cursor_result_set_sizedefaultquery_groupfalserequire_ssl$user, publicsearch_path0statement_timeout[{&

Página 217

number of cursors for your cluster, and to achieve the ideal balance between maximum result set sizeand concurrency.ImportantBefore you modify this pa

Página 218 - Subscription

of range for the cluster. If you change the parameter value and want to return to the default setting, resetthe parameter to 0.After you change this v

Página 219 - Notification Subscription

ValueJSON PropertyConsole FieldThenum-berofquer-iesthatcanruncon-cur-rentlyinaqueue.Whenaqueuereachesthecon-cur-rencylevel,anysub-sequentquer-ieswaiti

Página 220

ValueJSON PropertyConsole FieldAcomma-sep-ar-atedlistofusergroupnames.Whenmem-bersoftheusergrouprunquer-iesinthedata-base,theirquer-iesareroutedtotheq

Página 221 - Database Audit Logging

ValueJSON PropertyConsole Fielduser_group_wild_cardUser Group WildcardAPI Version 2012-12-0162Amazon Redshift Management GuideConfiguring Workload Man

Página 222 - User Log

ValueJSON PropertyConsole FieldABooleanvaluethatin-dic-ateswheth-ertoen-ablewild-cardsforusergroups.Ifthisis0,wild-cardsaredis-abled;ifthisis1,wild-ca

Página 223 - Enabling Logging

What Is Amazon Redshift?Welcome to the Amazon Redshift Cluster Management Guide. Amazon Redshift is a fully managed,petabyte-scale data warehouse serv

Página 224 - Managing Log Files

ValueJSON PropertyConsole Fieldrun-ningquer-ies.Acomma-sep-ar-atedlistofquerygroups.Whenmem-bersofthequerygrouprunquer-iesinthedata-base,theirquer-ies

Página 225

ValueJSON PropertyConsole Fieldquery_group_wild_cardQuery Group WildcardAPI Version 2012-12-0165Amazon Redshift Management GuideConfiguring Workload M

Página 226

ValueJSON PropertyConsole FieldABooleanvaluethatin-dic-ateswheth-ertoen-ablewild-cardsforquerygroups.Ifthisis0,wild-cardsaredis-abled;ifthisis1,wild-c

Página 227

ValueJSON PropertyConsole Fieldrun-ningquer-ies.Themax-im-umtime,inmil-li-seconds,quer-iescanrunbe-forebe-ingcan-celled.max_execution_timeTimeoutAPI V

Página 228

ValueJSON PropertyConsole FieldTheamountofmemorytoal-loc-atetothequeue.Thetotalamountofmemoryacrossallqueuesmustequal100per-cent,soifyousetthisprop-er

Página 229

user groups or query groups for the default queue.The default queue must always be the last queue inthe WLM configuration.As with other parameters, yo

Página 230

"q2_second_property_name":"q2_second_property_value", ... } ... ]&

Página 231

Rules for Configuring WLM by Using the AWS CLI in the Command Lineon the Linux and Mac OS X Operating Systems• The entire JSON structure must be enclo

Página 232

NoteFor readability purposes, the example is displayed on two lines, but in the actual AWS CLI thiswould be one line.aws redshift modify-cluster-param

Página 233 - Step 1: Resize the Cluster

You can create, modify, and delete parameter groups by using the Amazon Redshift console. All of thetasks start from the parameter group list.In the p

Página 234

• Amazon Redshift API Reference• SDK References in Tools for Amazon Web ServicesAmazon Redshift Management OverviewThe Amazon Redshift service manages

Página 235 - Step 1:Take a Snapshot

Modifying a Parameter GroupIf the parameter group you are modifying is associated with a cluster, then the changes you make to theparameter group appl

Página 236

5. To edit the workload management configuration, in the parameter group list, click the row of theparameter group you want to modify, and then click

Página 237

Do this...To...Use the Up and Down buttons to change the or-der that queries are assigned to queues basedon users and query groups. For more informati

Página 238

Associating a Parameter Group with a ClusterEach cluster you provision has one parameter group associated with it.You can associate a parametergroup w

Página 239

Because this example replaces the WLM configuration, this JSON configuration also defines the defaultqueue with no specific user group or query group.

Página 240

private static void describeClusterParameterGroups() { DescribeClusterParameterGroupsResult result = client.describeClusterPara me

Página 241

} } private static void describeClusterParameters(String parameterGroupName) { DescribeClusterParametersRequest request = new Des

Página 242

• CreateClusterParameterGroup• DeleteClusterParameterGroup• DescribeClusterParameters• DescribeClusterParameterGroups• DescribeDefaultClusterParameter

Página 243 - Limits in Amazon Redshift

Amazon Redshift SnapshotsTopics• Overview (p. 82)• Managing Snapshots Using the Console (p. 86)• Managing Snapshots Using the AWS SDK for Java (p. 94

Página 244 - Naming Constraints

To disable automated snapshots, set the retention period to zero. If you disable automated snapshots,Amazon Redshift stops taking snapshots and delete

Página 245

AWS Accounts and IAM CredentialsBy default, an Amazon Redshift cluster is only accessible to the AWS account that creates the cluster.The cluster is l

Página 246 - Tagging Resources in Amazon

Restoring a Cluster from a SnapshotA snapshot contains data from any databases that are running on your cluster, and also information aboutyour cluste

Página 247 - Tagging Requirements

"Effect":"Allow", "Action":[ "redshift:AuthorizeSnapshotAccess", "redshift:R

Página 248

]}• Once access to a snapshot has been revoked from an AWS account, no users in that account canaccess the snapshot, even if they have IAM policies

Página 249 - To add tags to a resource

Creating a Manual SnapshotYou can create a manual snapshot of a cluster from the snapshots list as follows. Or, you can take asnapshot of a cluster in

Página 250

Deleting a Manual SnapshotTo delete a manual snapshot1. Sign into the AWS Management Console and open the Amazon Redshift console at https://console.a

Página 251 - Document History

• In the Time Range box, click a time range that will narrow your search appropriately.• In the Type box, click automated.• In the Cluster box, click

Página 252

5. Click Restore From Snapshot.6. In the Restore Cluster from Snapshot dialog box, do the following:a. In the Cluster Identifier box, type a cluster i

Página 253

The following is an example of restoring a snapshot into a cluster that uses the EC2-VPC platform.The following is an example of restoring a snapshot

Página 254

• In the Time Range box, click a time range that will narrow your search appropriately.• In the Type box, click manual or automated.• In the Cluster b

Página 255

5. Click Save Configuration.After you configure cross-region snapshot copy, the Cluster detail page updates with the information inthe Backup, Mainten

Comentários a estes Manuais

Sem comentários