Method and system for a batch parser
First Claim
1. A method of issuing commands to multiple database servers using a single script, the method comprising:
- accessing the single script using a client software tool having access to multiple database servers, the script having parser-specific commands and a first set of database-specific commands;
selecting an operating mode of a batch parser from a plurality of operating modes comprising a first selectable operating mode in which the batch parser recognizes variables, commands, and batch delimiters, a second selectable operating mode in which the batch parser recognizes batch delimiters but not variables or commands, a third selectable operating mode in which the batch parser recognizes variables but not batch delimiters or commands, and a fourth selectable operating mode in which the batch parser cleans up internal batch parser states;
passing the script from the client software tool to the batch parser;
splitting, at the batch parser, the script into batches comprising parser-specific commands and the first set of database-specific commands, wherein a user-defined batch separator token is used to delimit batches and wherein a value following the user-defined batch separator token indicates a number of times a batch preceding the user-defined batch separator token is to be executed;
converting the parser-specific commands into a second set of database-specific commands;
passing the first set and the second set of database-specific commands back to the client software tool; and
sending the first set and second set of database-specific commands to the multiple database servers for execution.
2 Assignments
0 Petitions
Accused Products
Abstract
A method of generating commands for a database server includes accessing a script having parser-specific commands, a first set of database-specific commands and optional shell commands. A componentized batch parser splits out the different command types and converts the parser-specific commands into a second set of database-specific commands. The first set and second set of database-specific commands may be sent to a target database for execution. The optional shell commands may be executed by a user tool at a local console. The batch parser offers features including separation of parsing functions using batch separators, performing automatic substitution of tokens in the script with defined values or substitution of tokens by requesting token values via a client tool, stripping off comments and blanks spaces from processed commands, referencing and editing files outside the script, and the ability to connect to different servers.
-
Citations
30 Claims
-
1. A method of issuing commands to multiple database servers using a single script, the method comprising:
-
accessing the single script using a client software tool having access to multiple database servers, the script having parser-specific commands and a first set of database-specific commands; selecting an operating mode of a batch parser from a plurality of operating modes comprising a first selectable operating mode in which the batch parser recognizes variables, commands, and batch delimiters, a second selectable operating mode in which the batch parser recognizes batch delimiters but not variables or commands, a third selectable operating mode in which the batch parser recognizes variables but not batch delimiters or commands, and a fourth selectable operating mode in which the batch parser cleans up internal batch parser states; passing the script from the client software tool to the batch parser; splitting, at the batch parser, the script into batches comprising parser-specific commands and the first set of database-specific commands, wherein a user-defined batch separator token is used to delimit batches and wherein a value following the user-defined batch separator token indicates a number of times a batch preceding the user-defined batch separator token is to be executed; converting the parser-specific commands into a second set of database-specific commands; passing the first set and the second set of database-specific commands back to the client software tool; and sending the first set and second set of database-specific commands to the multiple database servers for execution. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A method of generating commands for multiple database servers using a single script, the method comprising:
-
accessing the single script using a client software tool having access to the multiple database servers, the script having parser-specific commands and a first set of database-specific commands; selecting an operating mode of a batch parser from a plurality of operating modes comprising a first selectable operating mode in which the batch parser recognizes variables, commands, and batch delimiters, a second selectable operating mode in which the batch parser recognizes batch delimiters but not variables or commands, a third selectable operating mode in which the batch parser recognizes variables but not batch delimiters or commands, and a fourth selectable operating mode in which the batch parser cleans up internal batch parser states; passing the script from the client software tool to the batch parser; splitting, at the batch parser, the script into batches comprising parser-specific commands and the first set of database-specific commands; converting the parser-specific commands into a second set of database-specific commands; passing the first set and the second set of database-specific commands back to the client software tool, wherein a user-defined batch separator token is used to delimit batches and wherein a value following the user-defined batch separator token indicates a number of times a batch preceding the user-defined batch separator token is to be executed; and storing the first set and second set of database-specific commands in preparation for multiple database server execution. - View Dependent Claims (14)
-
-
15. A system for generating commands for inserting data in multiple databases residing in multiple database servers via a single script, the system comprising:
-
at least one client tool, the client tool calling a batch server to support the generation of commands for a database; a processor having access to memory, the memory having commands which, when executed, perform steps comprising; accessing the single script and splitting the script into batches comprising parser-specific commands and a first set of database-specific insert commands using a client software tool having access to multiple databases, wherein a user-defined batch separator token is used to delimit batches and wherein a value following the user-defined batch separator token indicates a number of times a batch preceding the user-defined batch separator token is to be executed; selecting an operating mode of a batch parser from a plurality of operating modes comprising a first selectable operating mode in which the batch parser recognizes variables, commands, and batch delimiters, a second selectable operating mode in which the batch parser recognizes batch delimiters but not variables or commands, a third selectable operating mode in which the batch parser recognizes variables but not batch delimiters or commands, and a fourth selectable operating mode in which the batch parser cleans up internal batch parser states; passing the script from the client software tool to the batch parser; converting the parser-specific commands into a second set of database-specific insert commands at least in part by using the at least one client tool to request a token value from a user and substituting a token in the parser-specific commands with the requested token value; removing at least one of comments and blank spaces from at least one of the parser-specific commands and the database-specific insert commands before sending database-specific insert commands to a database server; passing the first set and the second set of database-specific insert commands back to the client software tool; and connecting to a first server, the first server having a database responsive to at least one of a first set of commands and a second set of commands; and a communication link for connecting to at least one server. - View Dependent Claims (16, 17, 18, 19, 20, 21)
-
-
22. A computer-readable storage medium having computer-executable instructions for performing a steps for issuing commands to multiple database servers via a single script, the steps comprising:
-
accessing the single script using a client software tool having access to multiple database servers, the script having parser-specific commands and a first set of database-specific commands; selecting an operating mode of a batch parser from a plurality of operating modes comprising a first selectable operating mode in which the batch parser recognizes variables, commands, and batch delimiters, a second selectable operating mode in which the batch parser recognizes batch delimiters but not variables or commands, a third selectable operating mode in which the batch parser recognizes variables but not batch delimiters or commands, and a fourth selectable operating mode in which the batch parser cleans up internal batch parser states; passing the script from the client software tool to the batch parser; splitting, at the batch parser, the script into batches comprising parser-specific commands and the first set of database-specific commands, wherein a user-defined batch separator token is used to delimit batches; converting the parser-specific commands into a second set of database-specific commands at least in part by using the client software tool to request a token value from a user and substituting a token in the parser-specific commands with the requested token value; passing the first set and the second set of database-specific commands back to the client software tool; and sending the first set and second set of database-specific commands to the multiple database servers for execution. - View Dependent Claims (23, 24, 25, 26, 27)
-
-
28. A computer-readable storage medium having computer-executable instructions for performing a steps for generating commands for multiple database servers using a single script, the steps comprising:
-
accessing the single script using a client software tool having access to the multiple database servers, the script having parser-specific commands and a first set of database-specific commands; selecting an operating mode of a batch parser from a plurality of operating modes comprising a first selectable operating mode in which the batch parser recognizes variables, commands, and batch delimiters, a second selectable operating mode in which the batch parser recognizes batch delimiters but not variables or commands, a third selectable operating mode in which the batch parser recognizes variables but not batch delimiters or commands, and a fourth selectable operating mode in which the batch parser cleans up internal batch parser states; passing the script from the client software tool to the batch parser; splitting, at the batch parser, the script into batches comprising parser-specific commands and the first set of database-specific commands, wherein a user-defined batch separator token is used to delimit batches and wherein a value following the user-defined batch separator token indicates a number of times a batch preceding the user-defined batch separator token is to be executed; converting the parser-specific commands into a second set of database-specific commands; passing the first set and the second set of database-specific commands back to the client software tool; and storing the first set and second set of database-specific commands in preparation for multiple database server execution. - View Dependent Claims (29, 30)
-
Specification