Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 2 of 2 total |
Trying to use COPY FILE in a Job |
Sun, Oct 7 2018 12:51 PM | Permanent Link |
Jan Ferguson Data Software Solutions, Inc. Team Elevate | I'm trying to use COPY FILE in a Job (as shown below towards the end, pointed to by the arrows). I have been using this Job (without the COPY FILE command) for a LONG while and it works perfectly. When I add the COPY FILE to the Job I get the following error:
"ElevateDB Error #700 An error was found in the statement at line 19 and column 6 (Expected : but instead found FILE)" Can't I use COPY FILE in a Job? How can I accomplish copying a "EDBUpd" file, after it's created, to a physical directory on the remote machine? Thanks in advance, Jan BEGIN DECLARE DBCursor CURSOR FOR DBStmt; DECLARE DBName VARCHAR DEFAULT ''; PREPARE DBStmt FROM 'SELECT * FROM Databases'; OPEN DBCursor; FETCH FIRST FROM DBCursor ('Name') INTO DBName; WHILE NOT EOF(DBCursor) DO IF (DBName <> 'Configuration') THEN EXECUTE IMMEDIATE 'BACKUP DATABASE "' + DBName + '" AS "' + CAST(CURRENT_DATE AS VARCHAR(10)) + '-' + DBName + '" TO STORE "Backups" INCLUDE CATALOG'; COPY FILE DBName + ".EDBUpd" IN STORE "Backups" <------------ TO DBName".EDBUpd" IN STORE "Backups-Remote" <----------- END IF; FETCH NEXT FROM DBCursor ('Name') INTO DBName; END WHILE; CLOSE DBCursor; END |
Sun, Oct 7 2018 1:05 PM | Permanent Link |
Jan Ferguson Data Software Solutions, Inc. Team Elevate | Disregard my post. Brain must've gone dead. I forgot to include EXECUTE IMMEDIATE if front of the COPY FILE command. It's working now.
Jan Jan Ferguson wrote: Can't I use COPY FILE in a Job? How can I accomplish copying a "EDBUpd" file, after it's created, to a physical directory on the remote machine? |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |