![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
PS: The unload/reload was done with ASA 9.0.2.3249. The reload prompted me to stop/exit/continue on those errors, I continued because I wanted to see whether the data was then correct. |
#3
| |||
| |||
|
|
In article <MPG.1ebcaf6d57da076b989852 (AT) forums (DOT) sybase.com>, tinu (AT) mindpower (DOT) com says... PS: The unload/reload was done with ASA 9.0.2.3249. The reload prompted me to stop/exit/continue on those errors, I continued because I wanted to see whether the data was then correct. This is what the reload outputs: --- Could not execute statement. Syntax error near '(end of line)' on line 12 SQLCODE=-131, ODBC 3 State="42000" File: "reload.sql" on line 8485, column 1 CREATE EVENT "Daily Backup" ENABLE AT ALL HANDLER begin declare destination varchar(200); declare db_filename varchar(40); declare validate_result long varchar; declare slash_pos integer; set destination=db_property('file'); set slash_pos=locate(destination,'\\',-1); set db_filename="right"(destination,length(destination )-slash_pos); set destination=replace("left"(destination,slash_pos)+ 'backup','\\','\\'); backup database directory destination transaction log rename wait before sta rt wait after end with comment 'Daily Backup' You can continue executing, stop executing, or quit ISQL completely. 1. Stop 2. Continue 3. Exit Select an option: 2 (Continuing after error) Could not execute statement. Variable 'validate_result' not found SQLCODE=-260, ODBC 3 State="42000" File: "reload.sql" on line 8497, column 3 select messages into validate_result from sa_validate(check_type = 'full') You can continue executing, stop executing, or quit ISQL completely. 1. Stop 2. Continue 3. Exit Select an option: 2 (Continuing after error) Could not execute statement. Syntax error near 'end' on line 6 SQLCODE=-131, ODBC 3 State="42000" File: "reload.sql" on line 8499, column 3 if validate_result <> 'No error detected' then set validate_result=string('Verify after backup: Could not validate ',db_f ilename,'. Errors: ',validate_result); message validate_result type warning to console; call Mail_Alert('klicket (AT) klicket (DOT) net','support (AT) klicket (DOT) net','smtp.klicket. net','Validate after Backup failed',validate_result) end if end You can continue executing, stop executing, or quit ISQL completely. 1. Stop 2. Continue 3. Exit Select an option: 2 (Continuing after error) Could not execute statement. Syntax error near 'BEGIN declare destination varchar(200); declare db_filename varchar(40); declare validate' on line 2 SQLCODE=-131, ODBC 3 State="42000" File: "reload.sql" on line 8506, column 1 COMMENT TO PRESERVE FORMAT ON EVENT "Daily Backup" IS {BEGIN declare destination varchar(200); declare db_filename varchar(40); declare validate_result long varchar; declare slash_pos integer; set destination = db_property ('file'); set slash_pos = locate (destination, '\', -1 ); set db_filename = right (destination, length(destination) - slash_pos); set destination = replace (left (destination, slash_pos) + 'backup', '\', '\ \'); backup database directory destination transaction log rename wait before start wait after end with comment 'Daily Backup' You can continue executing, stop executing, or quit ISQL completely. 1. Stop 2. Continue 3. Exit Select an option: 2 --- The script relaod.sql contains those lines beginning with 8485 --- CREATE EVENT "Daily Backup" ENABLE AT ALL HANDLER begin declare destination varchar(200); declare db_filename varchar(40); declare validate_result long varchar; declare slash_pos integer; set destination=db_property('file'); set slash_pos=locate(destination,'\\',-1); set db_filename="right"(destination,length(destination )-slash_pos); set destination=replace("left"(destination,slash_pos)+ 'backup','\\','\\'); backup database directory destination transaction log rename wait before start wait after end with comment 'Daily Backup'; select messages into validate_result from sa_validate(check_type = 'full'); if validate_result <> 'No error detected' then set validate_result=string('Verify after backup: Could not validate ',db_filename,'. Errors: ',validate_result); message validate_result type warning to console; call Mail_Alert('klicket (AT) klicket (DOT) net','support (AT) klicket (DOT) net','smtp.klicket.net','Validate after Backup failed',validate_result) end if end go COMMENT TO PRESERVE FORMAT ON EVENT "Daily Backup" IS {BEGIN declare destination varchar(200); declare db_filename varchar(40); declare validate_result long varchar; declare slash_pos integer; set destination = db_property ('file'); set slash_pos = locate (destination, '\', -1 ); set db_filename = right (destination, length(destination) - slash_pos); set destination = replace (left (destination, slash_pos) + 'backup', '\', '\\'); backup database directory destination transaction log rename wait before start wait after end with comment 'Daily Backup'; select messages into validate_result from sa_validate (check_type = 'full'); if validate_result <> 'No error detected' then set validate_result = string ('Verify after backup: Could not validate ', db_filename, '. Errors: ', validate_result); message validate_result type warning to console; call Mail_Alert ('klicket (AT) klicket (DOT) net', 'support (AT) klicket (DOT) net', 'smtp.klicket.net', 'Validate after Backup failed', validate_result); end if END } go --- It seems to me that this is a bug ... the event runs fine every day on ASA 9.0.2.3269 ... the backup IS made. However, why does unload/reload generate a buggy relaod.sql? Note that the unload/reload is done with the ASA 9.0.2.3249 64 Bit developer edition. Any help / comments appreciated ... I will find a work aournd I hope for those .. but I am curious who / waht causes the problem. Thanks Martin |
#4
| |||
| |||
|
|
The "with comment" clause is not valid on the "image backup" form of the BACKUP statement, only the "archive backup" format... at least, that's what the Help says. Anyway, "with comment" doesn't buy you much IMO. Breck |
#5
| |||
| |||
|
|
In article <98f952ddovp0sm9vrb40lvjohsse8jfra8 (AT) 4ax (DOT) com>, NOSPAM__bcarter (AT) risingroad (DOT) com says... The "with comment" clause is not valid on the "image backup" form of the BACKUP statement, only the "archive backup" format... at least, that's what the Help says. Anyway, "with comment" doesn't buy you much IMO. Breck Well then, how does it come? I have NOT set any comment .. the comment is because formatting is preserved, so then this is a bug in the unload? Martin |
#6
| |||
| |||
|
|
I'm talking about the "BACKUP ... WITH COMMENT" clause, not the "COMMENT TO PRESERVE FORMAT". Here is your backup statement from the event... backup database directory destination transaction log rename wait before start wait after end with comment 'Daily Backup'; |
#7
| |||
| |||
|
|
In article <bgsb52llsp004qee224ot6oid4395ruo18 (AT) 4ax (DOT) com>, NOSPAM__bcarter (AT) risingroad (DOT) com says... I'm talking about the "BACKUP ... WITH COMMENT" clause, not the "COMMENT TO PRESERVE FORMAT". Here is your backup statement from the event... backup database directory destination transaction log rename wait before start wait after end with comment 'Daily Backup'; Understood and thanks. still, I did not do anyhting there, so is it a bug or is it a bug? Martin |
#8
| |||
| |||
|
|
In article <MPG.1ebcaf6d57da076b989852 (AT) forums (DOT) sybase.com>, tinu (AT) mindpower (DOT) com says... PS: The unload/reload was done with ASA 9.0.2.3249. The reload prompted me to stop/exit/continue on those errors, I continued because I wanted to see whether the data was then correct. This is what the reload outputs: --- Could not execute statement. Syntax error near '(end of line)' on line 12 SQLCODE=-131, ODBC 3 State="42000" File: "reload.sql" on line 8485, column 1 CREATE EVENT "Daily Backup" ENABLE AT ALL HANDLER begin declare destination varchar(200); declare db_filename varchar(40); declare validate_result long varchar; declare slash_pos integer; set destination=db_property('file'); set slash_pos=locate(destination,'\\',-1); set db_filename="right"(destination,length(destination )-slash_pos); set destination=replace("left"(destination,slash_pos)+ 'backup','\\','\\'); backup database directory destination transaction log rename wait before sta rt wait after end with comment 'Daily Backup' You can continue executing, stop executing, or quit ISQL completely. 1. Stop 2. Continue 3. Exit Select an option: 2 (Continuing after error) Could not execute statement. Variable 'validate_result' not found SQLCODE=-260, ODBC 3 State="42000" File: "reload.sql" on line 8497, column 3 select messages into validate_result from sa_validate(check_type = 'full') You can continue executing, stop executing, or quit ISQL completely. 1. Stop 2. Continue 3. Exit Select an option: 2 (Continuing after error) Could not execute statement. Syntax error near 'end' on line 6 SQLCODE=-131, ODBC 3 State="42000" File: "reload.sql" on line 8499, column 3 if validate_result <> 'No error detected' then set validate_result=string('Verify after backup: Could not validate ',db_f ilename,'. Errors: ',validate_result); message validate_result type warning to console; call Mail_Alert('klicket (AT) klicket (DOT) net','support (AT) klicket (DOT) net','smtp.klicket. net','Validate after Backup failed',validate_result) end if end You can continue executing, stop executing, or quit ISQL completely. 1. Stop 2. Continue 3. Exit Select an option: 2 (Continuing after error) Could not execute statement. Syntax error near 'BEGIN declare destination varchar(200); declare db_filename varchar(40); declare validate' on line 2 SQLCODE=-131, ODBC 3 State="42000" File: "reload.sql" on line 8506, column 1 COMMENT TO PRESERVE FORMAT ON EVENT "Daily Backup" IS {BEGIN declare destination varchar(200); declare db_filename varchar(40); declare validate_result long varchar; declare slash_pos integer; set destination = db_property ('file'); set slash_pos = locate (destination, '\', -1 ); set db_filename = right (destination, length(destination) - slash_pos); set destination = replace (left (destination, slash_pos) + 'backup', '\', '\ \'); backup database directory destination transaction log rename wait before start wait after end with comment 'Daily Backup' You can continue executing, stop executing, or quit ISQL completely. 1. Stop 2. Continue 3. Exit Select an option: 2 --- The script relaod.sql contains those lines beginning with 8485 --- CREATE EVENT "Daily Backup" ENABLE AT ALL HANDLER begin declare destination varchar(200); declare db_filename varchar(40); declare validate_result long varchar; declare slash_pos integer; set destination=db_property('file'); set slash_pos=locate(destination,'\\',-1); set db_filename="right"(destination,length(destination )-slash_pos); set destination=replace("left"(destination,slash_pos)+ 'backup','\\','\\'); backup database directory destination transaction log rename wait before start wait after end with comment 'Daily Backup'; select messages into validate_result from sa_validate(check_type = 'full'); if validate_result <> 'No error detected' then set validate_result=string('Verify after backup: Could not validate ',db_filename,'. Errors: ',validate_result); message validate_result type warning to console; call Mail_Alert('klicket (AT) klicket (DOT) net','support (AT) klicket (DOT) net','smtp.klicket.net','Validate after Backup failed',validate_result) end if end go COMMENT TO PRESERVE FORMAT ON EVENT "Daily Backup" IS {BEGIN declare destination varchar(200); declare db_filename varchar(40); declare validate_result long varchar; declare slash_pos integer; set destination = db_property ('file'); set slash_pos = locate (destination, '\', -1 ); set db_filename = right (destination, length(destination) - slash_pos); set destination = replace (left (destination, slash_pos) + 'backup', '\', '\\'); backup database directory destination transaction log rename wait before start wait after end with comment 'Daily Backup'; select messages into validate_result from sa_validate (check_type = 'full'); if validate_result <> 'No error detected' then set validate_result = string ('Verify after backup: Could not validate ', db_filename, '. Errors: ', validate_result); message validate_result type warning to console; call Mail_Alert ('klicket (AT) klicket (DOT) net', 'support (AT) klicket (DOT) net', 'smtp.klicket.net', 'Validate after Backup failed', validate_result); end if END } go --- It seems to me that this is a bug ... the event runs fine every day on ASA 9.0.2.3269 ... the backup IS made. However, why does unload/reload generate a buggy relaod.sql? Note that the unload/reload is done with the ASA 9.0.2.3249 64 Bit developer edition. Any help / comments appreciated ... I will find a work aournd I hope for those .. but I am curious who / waht causes the problem. Thanks Martin |
![]() |
| Thread Tools | |
| Display Modes | |
| |