The xp_sls_cloud_browse command returns a list of objects located on the specified cloud storage path.
This topic covers:
exec master.dbo.xp_sls_cloud_browse
[@CloudVendor = N'AmazonS3'] --( AmazonS3 / AzureBlob / GoogleStorage / S3Compatible )
[, @CloudEndpoint = N'storageserver:port'] --( only for S3Compatible and AmazonS3 VPC )
[, @CloudAccessKey = N'***']
[, @CloudSecretKey = N'***]
[, @CloudBucketName = N'aabucket6']
[, @CloudFolderName = N'f1']
[, @CloudMaxItems = 2]
Tips:
To see the list of accepted arguments and data types for arguments, execute the following:
exec master.dbo.<procedure_name> show_help
To convert the script for use with the command-line utilities, execute the following:
exec master.dbo.<procedure_name> show_cmd, <xp_arguments>
Type: Varchar
The @CloudAccessKey argument specifies the name of the unique Cloud Web Service alphanumeric access key that identifies each user. The selections include Amazon Access Key, Azure Account Name, Google e-mail styled account, S3 Compatible Storage Access Key.
Type: Varchar
The @CloudAccessKeyEnc argument specifies the name of the encrypted unique Cloud Web Service alphanumeric access key that identifies each user.
Type: Varchar
The @CloudBucketName argument specifies the name of the container for cloud objects. Bucket names must be at least 3 and no more than 63 characters long. The selections are Amazon Bucket Name, Azure Container Name, Google Bucket Name, Google Bucket Name requirements are described at https://cloud.google.com/storage/docs/naming, S3 Compatible Storage Bucket Name,
Type: Varchar
The @CloudFolderName argument specifies the name of the folder for searching in cloud browse. It is a filter for output files.
This argument accepts variables. For more information, see LiteSpeed Variables.
The @CloudGovRegion argument enables a special restricted region for the US Government use in Amazon S3 and Azure Clouds. This argument accepts one of the following values:
Type: Varchar
The @CloudMaxItems argument specifies the number of rows to return from the cloud.
Note: The @CloudMaxItems argument can be very useful on large tables with thousands of records. Returning a large number of records can impact cloud performance. |
Type: Varchar
The @CloudRegionName argument specifies the name of the Cloud Web Service region to use for a bucket. Example values are but not limited to: us-east-1, us-east-2, us-west-1, us-west-2, ca-central-1, eu-central-1, eu-west-1, eu-west-2, ap-south-1, ap-southeast-1, ap-southeast-2, ap-northeast-1, ap-northeast-2, sa-east-1, N'Germany' and N'China'.
Type: Varchar
The @CloudSecretKey argument specifies the name of the Cloud Web Service secret key that is assigned when you initially get a Cloud account.
Type: Varchar
The @CloudSecretKeyEnc argument specifies the name of the encrypted Cloud Web Service secret key that is assigned when you initially get a Cloud account.
Type: Varchar
The @CloudVendor argument specifies the name of the cloud service provider. The argument accepts one of the following values: "AmazonS3", "AzureBlob", "GoogleStorage" or "S3Compatible".
Type: Varchar
The @CloudEndpoint argument specifies the endpoint for S3 Compatible Storage and custom endpoint for Amazon S3 service (in case of VPC). Format: servername:port .Example values: "servername", "servername:port", "ip:port", "10.0.0.200:9021".
Type: Boolean
The @CloudAcceptAllCertificates argument instructs LiteSpeed accept self-signed certificates for S3 Compatible Storage. This argument accepts one of the following values:
Note: Delete backups is not supported in Maintenance Plans with this option.
Type: Varchar
The @ProxyHost argument is optional and specifies the name of the proxy host name that is running the proxy server.
note: If the @ProxyHost argument is not defined, then the LiteSpeed core engine checks the local .ini files for the proxy parameters. If the proxy parameters are not detected, then the LiteSpeed core engine connects directly to the proxy servers. |
Type: Varchar
The @ProxyLogin argument is optional and specifies the proxy server login credential.
note: If not defined, then the LiteSpeed core engine checks the local .ini files for the proxy parameters. If the proxy parameters are not detected, then the LiteSpeed core engine connects directly to the proxy servers. |
Type: Varchar
The @ProxyPassword argument is optional and specifies the proxy server password credential.
note: If the @ProxyPassword argument is not defined, then the LiteSpeed core engine checks the local .ini files for the proxy parameters. If the proxy parameters are not detected, then the LiteSpeed core engine connects directly to the proxy servers. |
Type: Varchar
The @ProxyPasswordEnc argument is optional and specifies the encrypted proxy server password credential.
note: If the @ProxyPasswordEnc argument is not defined, then the LiteSpeed core engine checks the local .ini files for the proxy parameters. If the proxy parameters are not detected, then the LiteSpeed core engine connects directly to the proxy servers. |
The @ProxyPort argument is optional and contains the port number of the proxy server. The TCP/IP port values can be 1-65535.
note: If the @ProxyPort argument is not defined, then the LiteSpeed core engine checks the local .ini files for the proxy parameters. If the proxy parameters are not detected, then the LiteSpeed core engine connects directly to the proxy servers. |
The @UseSSL argument specifies that the connection uses SSL security. This argument accepts one of the following values:
exec master.dbo.xp_sls_cloud_browse
@CloudVendor = N'AmazonS3' -- vendor: AmazonS3 / AzureBlob / GoogleStorage / S3Compatible
, @CloudEndpoint = N'storageserver:port' -- only for S3Compatible and AmazonS3 VPC
, @CloudAccessKey = N'***' -- my key
, @CloudSecretKey = N'***' -- my key
, @CloudBucketName = N'aabucket1'
, @CloudFolderName = N'f1' -- f1/f2 – for subfolders
, @CloudMaxItems = 2-- number of returning rows. Works like TOP command in SQL.
A list of objects or error on failure.
To capture the output message, run the following:
declare @rmsg varchar(999)
exec master..<procedure_name> <arguments>, @resultmsg=@rmsg output
select @rmsg
To capture the output message and the result code, run the following:
declare @rc int
declare @rmsg varchar(999)
exec master..<procedure_name> <arguments>, @resultmsg=@rmsg output, @resultcode=@rc output
select @rc, @rmsg
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center