Changes for page JDBC2XML Usage
Last modified by christoph_lechleitner@iteg_at on 2013-10-08 03.37:51
From version 1.1
edited by christoph_lechleitner@iteg_at
on 2012-08-03 05.41:00
on 2012-08-03 05.41:00
Change comment:
There is no comment for this version
To version 9.1
edited by christoph_lechleitner@iteg_at
on 2013-10-08 03.37:50
on 2013-10-08 03.37:50
Change comment:
Added auth options to most command introductions
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -2,26 +2,34 @@ 2 2 3 3 This section refers to the command-line tool. For information on the uses of the java library, please refer to our [[java documentation>>doc:JDBC2XML.Java Library Documentation.WebHome]]. 4 4 5 -= =={{id name="JDBC2XMLUsage-Aliases"/}}Aliases===5 += {{id name="JDBC2XMLUsage-Commands"/}}Commands = 6 6 7 -JDBC2XML r egistersunderseveralaliases on thecommandline, to coverthemost commonusecases. They arepresentedhere with minimaloptions, seeafull listof optionsbelow.7 +JDBC2XML provides several commands, triggering different operations. 8 8 9 - ===={{idname="JDBC2XMLUsage-DumpingaDBtoXML:"/}}DumpingaDBtoXML: ====9 +The following command overview only shows the absolut minimal number of options. 10 10 11 +Usually more options are needed, especially {{code language="none"}}--user{{/code}}, {{code language="none"}}--password{{/code}}, and (Linux only, see bottom) {{code language="none"}}--jdbc-drivers{{/code}}. 12 + 13 +See far below for a full list of options, as well as examples for JDBC URLs. 14 + 15 +==== {{id name="JDBC2XMLUsage-DumpingaDBtoXML"/}}Dumping a DB to XML ==== 16 + 11 11 {{code language="none"}} 12 -jdbc2xml --url <jdbc-url> --file <path-to-file> 18 +jdbc2xml --url <jdbc-url> --user <jdbc-user> --password <jdbc-password> --file <path-to-file> 13 13 {{/code}} 14 14 15 - ==== {{id name="JDBC2XMLUsage-RestoringaDBfromXML:"/}}RestoringaDBfromXML:====21 +See below for details and example for JDBC URLs. 16 16 23 +==== {{id name="JDBC2XMLUsage-RestoringaDBfromXML"/}}Restoring a DB from XML ==== 24 + 17 17 {{code language="none"}} 18 -xml2jdbc --file <path-to-file> --url <jdbc-url> 26 +xml2jdbc --file <path-to-file> --url <jdbc-url> --user <jdbc-user> --password <jdbc-password> 19 19 {{/code}} 20 20 21 21 ==== {{id name="JDBC2XMLUsage-CopyingfromoneDBtoanother"/}}Copying from one DB to another ==== 22 22 23 23 {{code language="none"}} 24 -jdbc2jdbc --from-url <jdbc-url> --to-url <jdbc-url> 32 +jdbc2jdbc --from-url <jdbc-url> --to-url <jdbc-url> --user <jdbc-user> --password <jdbc-password> 25 25 {{/code}} 26 26 27 27 ==== {{id name="JDBC2XMLUsage-ParseandcopyanXMLfile"/}}Parse and copy an XML file ==== ... ... @@ -35,20 +35,36 @@ 35 35 ==== {{id name="JDBC2XMLUsage-TestDBconnectionandserverstatus"/}}Test DB connection and server status ==== 36 36 37 37 {{code language="none"}} 38 -jdbcping --url <jdbc-url> 46 +jdbcping --url <jdbc-url> --user <jdbc-user> --password <jdbc-password> 39 39 {{/code}} 40 40 41 41 ==== {{id name="JDBC2XMLUsage-ExtractpartsofaDB"/}}Extract parts of a DB ==== 42 42 43 43 {{code language="none"}} 44 -jdbcextr --url <jdbc-url> --file <path-to-file> 52 +jdbcextr --url <jdbc-url> --user <jdbc-user> --password <jdbc-password> --file <path-to-file> 45 45 {{/code}} 46 46 47 -== ={{id name="JDBC2XMLUsage-Fulllistofoptions"/}}Fulllistof options===55 +== {{id name="JDBC2XMLUsage-JDBCURLs"/}}JDBC URLs == 48 48 57 +JDBC URLs basically look like {{code language="none"}}jdbc:servertype://host[:port]/db?options{{/code}}., but some Databases and/or JDBC Drivers like other variants. 58 + 59 +Typical examples are: 60 + 61 +{{code language="none"}} 62 +# MySQL 63 +jdbc:mysql://localhost:3306/MYDATABASE?useCursorFetch=true 64 + 65 +# MSSQL 66 +jdbc:sqlserver://localhost:1433;databaseName=MYDATABASE; 67 +{{/code}} 68 + 69 +The use of cursor fetching in mysql is highly recommended in order to circumvent java heap space exceptions while dumping the content of large tables. 70 + 71 +== {{id name="JDBC2XMLUsage-Fulllistofoptions"/}}Full list of options == 72 + 49 49 ==== {{id name="JDBC2XMLUsage-Databaseaccess"/}}Database access ==== 50 50 51 -JDBC URL to access the DB (like jdbc:servertype:~/~/host[:port]/db[?options]):75 +JDBC URL to access the DB. 52 52 53 53 {{code language="none"}} 54 54 --from-url "jdbcurl" ... ... @@ -143,13 +143,13 @@ 143 143 --driver drivername 144 144 {{/code}} 145 145 146 - linux only: add given drivers to the classpath170 +Linux only: add given drivers to the classpath 147 147 148 148 {{code language="none"}} 149 149 --jdbc-drivers jarfilename[;jarfilename...] 150 150 {{/code}} 151 151 152 -==== {{id name="JDBC2XMLUsage-Optionsfor translationtojdbc"/}}Options fortranslation tojdbc ====176 +==== {{id name="JDBC2XMLUsage-Optionsforjdbcbehaviour"/}}Options for jdbc behaviour ==== 153 153 154 154 Change the batch size for inserts (def.: 1000) 155 155 ... ... @@ -163,7 +163,7 @@ 163 163 --transactional 164 164 {{/code}} 165 165 166 -==== {{id name="JDBC2XMLUsage-Optionsfor translationfromxml"/}}Options fortranslationfrom xml====190 +==== {{id name="JDBC2XMLUsage-Optionsforxmlreading"/}}Options for xml reading ==== 167 167 168 168 Enable schema checking on the xml file 169 169 ... ... @@ -177,7 +177,7 @@ 177 177 --create-fk-indices 178 178 {{/code}} 179 179 180 -==== {{id name="JDBC2XMLUsage-Optionsfor translationtoxml"/}}Options fortranslationto xml====204 +==== {{id name="JDBC2XMLUsage-Optionsforxmlcreation"/}}Options for xml creation ==== 181 181 182 182 Force or supress pretty printing of xml data 183 183 ... ... @@ -230,3 +230,14 @@ 230 230 {{code language="none"}} 231 231 --debug-startup 232 232 {{/code}} 257 + 258 +=== {{id name="JDBC2XMLUsage-Driverpackagesandpaths,andotherBackendspecifictips"/}}Driver packages and paths, and other Backend specific tips === 259 + 260 +See 261 + 262 +(% style="list-style-type: square;" %) 263 +* [[MySQL Tips>>doc:JDBC2XML.JDBC2XML Usage.MySQL Tips.WebHome]] 264 +* [[doc:JDBC2XML.JDBC2XML Usage.MSSQL Tips.WebHome]] 265 +* [[doc:KH.Database Tips.JDBC Snippets.WebHome]] with common JDBC URL examples 266 + 267 +
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -656 8791 +656916 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://clazzes.atlassian.net/wiki/spaces/JDBC2XML/pages/656 879/JDBC2XML Usage1 +https://clazzes.atlassian.net/wiki/spaces/JDBC2XML/pages/656916/JDBC2XML Usage