![]() ![]() Select * into bkup_tbl_test.t2 from bkup_tbl_test.t1 Insert into bkup_tbl_test.t1 values ( 1,1 ) grant connect to bkup_tbl_test Ĭreate table bkup_tbl_test.t1 ( a1 int, a2 int ) ![]() This creates a user and 5 tables with just 1 row of data in each. All of them would require this code to be run first. For instance, with SAP HANA Cloud, data lake objects created by HANA and the SYSRDL#CG user are not accessible to other users unless granted permissions.īelow are some examples of using this procedure. This procedure will not get around and security issues. For SAP IQ, this option is not used as you cannot use BACKUP TABLE to cloud storageĪs mentioned, this procedure has been parameterized enough to allow for it to run in SAP HANA Cloud, data lake as well as on-premise in SAP IQ.For Azure, S3, AliCloud, and GCP follow the HANA Cloud, data lake manuals on proper formatting of the connection string. For HANA Cloud, data lake this option is not needed if you backup to HANA Cloud, data lake files.cloud_credentials - Necessary cloud credentials, if needed, to backup the tables to cloud storage.For SAP IQ, an encryption key is optional.For HANA Cloud, data lake you MUST specify an encryption key.encryption_key - if you wish to encrypt the backup, specify the key here.The subdirectory will be named table_owner.table_name.Within that directory, the procedure will create a subdirectory, per table, so that it is easier to read a directory listing. output_dir - You must specify the output directory for the objects.schema_owner - This is the owner of the objects you wish to backup.It will also run in either SAP IQ 16.1 SP05 (and later) or HANA Cloud, data lake. Set tbl_backup= 'backup table '||towner||'.'||tname Where lower ( suser_name( creator ) ) = lower( schema_owner ) Select suser_name( creator) as towner, table_name tname , in cloud_credentials varchar(1000) default NULL , in encryption_key varchar(128) default NULL This procedure does not extract the table schema, that must be done via other toolsĭrop procedure if exists sp_iqschemabackup.It does not copy views, materialized views, or catalog tables. This procedure will only copy the IQ based tables.This procedure is just sample code showing what is possible. ![]() However, we can use this feature and use a wrapper procedure that calls it for each object we wish to backup to disk.Ĭonsider this stored procedure to use the BACKUP TABLE feature to implement a schema backup. Now, backup table won’t solve the problem on its own as it is designed to back up a single object, table, to disk. Now, for the good news… While there is no feature to backup or export a schema, we can use a feature that has been in SAP HANA Cloud, data lake since March 2021 and one that is part of SAP IQ 16.1 SP05 (2H 2021): BACKUP Table While SAP HANA and SAP HANA Cloud, HANA database support this feature via the EXPORT statement, SAP HANA Cloud, data lake and SAP IQ do not have similar syntax built in to it. More and more this year, I am fielding questions about whether or not SAP HANA Cloud, data lake or SAP IQ support schema level backups. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |