You have to be a super user to be able change the owner of a procedure. Below is the syntax
Continue readingCategory: Redshift

How to Rename a Procedure in Redshift database
Below is the sql command to rename a stored procedure where proc_name is the name of the procedure and datatype1,
Continue reading
How to find the size of a Redshift database
To determine the size of a database in Redshift cluster, use the below query. SELECT database, SUM(size) as “size in
Continue reading
How to find the size of a schema in Redshift
Use the below query to determine the size of all schemas in Redshift database. SELECT schema, SUM(size) as “size in
Continue reading
How to find the size of a table in Redshift
SVV_TABLE_INFO view shows information of all user-defined tables.Use the below query to determine the size of a table in Redshift
Continue reading
How to cancel a running query in Redshift
Run the below query to identify the query that needs to be cancelled and copy the ‘pid’. select pid, user_name,
Continue reading
How to drop a materialized view in Redshift database
Use the below command to drop a materialized view where mv_name is the name of the materialized view. DROP MATERIALIZED
Continue reading
How to copy data from a file in S3 bucket to Redshift tables
Copy using iam role: copy schemaname.tablename from ‘s3://bucketname/filename’ iam_role ‘arn of iam role’ DELIMITER ‘|’ ESCAPE; Copy using credentials: copy
Continue reading
How to insert data into Redshift tables.
Below is the syntax to insert a row into redshift table using sql statement. The list of values should be
Continue reading
How to vacuum a table in Redshift database
Run the below command to perform full vacuum of a table to 95%.
Continue reading