Amazon Redshift Uživatelská příručka

Procházejte online nebo si stáhněte Uživatelská příručka pro Software Amazon Redshift. Amazon Redshift User guide Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 255
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků

Shrnutí obsahu

Strany 1 - Amazon Redshift

Amazon RedshiftManagement GuideAPI Version 2012-12-01

Strany 2

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

Strany 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

Strany 4

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

Strany 5

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

Strany 6

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

Strany 7 - What Is Amazon Redshift?

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 17 - Renaming Clusters

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

Strany 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

Strany 19

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

Strany 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

Strany 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:•

Strany 22

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

Strany 23

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

Strany 24

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

Strany 25

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

Strany 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

Strany 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

Strany 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

Strany 29 - Rebooting a Cluster

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

Strany 30

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

Strany 31

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

Strany 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

Strany 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

Strany 34

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

Strany 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

Strany 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

Strany 37

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

Strany 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

Strany 39 - Creating a Cluster in a VPC

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

Strany 40

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

Strany 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

Strany 42

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

Strany 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

Strany 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

Strany 45

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

Strany 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

Strany 47

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

Strany 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

Strany 49

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

Strany 50

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

Strany 51

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

Strany 52

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

Strany 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,

Strany 54

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

Strany 55

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

Strany 56

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

Strany 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

Strany 58

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

Strany 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

Strany 60

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 66

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

Strany 67

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

Strany 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

Strany 69

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

Strany 70

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

Strany 71 - Query Group Wildcard

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

Strany 72

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

Strany 73

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

Strany 74

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

Strany 75

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

Strany 76

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 87

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

Strany 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

Strany 89 - Manual Snapshots

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

Strany 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

Strany 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

Strany 92

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

Strany 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

Strany 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

Strany 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

Strany 96

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

Strany 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

Strany 98

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

Strany 99 - Snapshot Copy

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

Strany 100

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 114 - Amazon Redshift Console

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 122 - Management

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

Strany 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

Strany 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

Strany 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

Strany 126

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

Strany 127

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

Strany 128

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

Strany 129 - Example 3: Manage clusters

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

Strany 130

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

Strany 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

Strany 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

Strany 133

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

Strany 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

Strany 135

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

Strany 136 - Command Line

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

Strany 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

Strany 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

Strany 139

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

Strany 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

Strany 141 - Step 2: Launch a Cluster

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

Strany 142

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

Strany 143

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

Strany 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

Strany 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

Strany 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

Strany 147

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 154 - System Requirements

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

Strany 155

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 161

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

Strany 162

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

Strany 163

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

Strany 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

Strany 165

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

Strany 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

Strany 167

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

Strany 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

Strany 169

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

Strany 170

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

Strany 171

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

Strany 172

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

Strany 173

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

Strany 174

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

Strany 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

Strany 176

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

Strany 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

Strany 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

Strany 179 - Redshift

Table of ContentsWhat Is Amazon Redshift? ...

Strany 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

Strany 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

Strany 182

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 187

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

Strany 188

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

Strany 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

Strany 190

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 197

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

Strany 198

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

Strany 199

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

Strany 200

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

Strany 201 - Creating an Alarm

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

Strany 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

Strany 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

Strany 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:/

Strany 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

Strany 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

Strany 207

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 212

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

Strany 213

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

Strany 214

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

Strany 215

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

Strany 216

ValueParameter Name0extra_float_digitsdefaultmax_cursor_result_set_sizedefaultquery_groupfalserequire_ssl$user, publicsearch_path0statement_timeout[{&

Strany 217

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

Strany 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

Strany 219 - Notification Subscription

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

Strany 220

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

Strany 221 - Database Audit Logging

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

Strany 222 - User Log

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

Strany 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

Strany 224 - Managing Log Files

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

Strany 225

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

Strany 226

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

Strany 227

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

Strany 228

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

Strany 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

Strany 230

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

Strany 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

Strany 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

Strany 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

Strany 234

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

Strany 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

Strany 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

Strany 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

Strany 238

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

Strany 239

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

Strany 240

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

Strany 241

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

Strany 242

• CreateClusterParameterGroup• DeleteClusterParameterGroup• DescribeClusterParameters• DescribeClusterParameterGroups• DescribeDefaultClusterParameter

Strany 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

Strany 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

Strany 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

Strany 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

Strany 247 - Tagging Requirements

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 255

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

Komentáře k této Příručce

Žádné komentáře