Changes for page JDBC2XML Usage
Last modified by christoph_lechleitner@iteg_at on 2013-10-08 03.37:51
From version 6.1
edited by christoph_lechleitner@iteg_at
on 2012-11-27 04.29:08
on 2012-11-27 04.29:08
Change comment:
added exclude hint for MSSQL system tables
To 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
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -2,26 +2,18 @@ 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- Commands"/}}Commands =5 +=== {{id name="JDBC2XMLUsage-Aliases"/}}Aliases === 6 6 7 -JDBC2XML provides several commands, triggeringdifferent operations.7 +JDBC2XML registers under several aliases on the command line, to cover the most common usecases. They are presented here with minimal options, see a full list of options below. 8 8 9 - Thefollowingcommand overview only shows theabsolutminimalnumberof options.9 +==== {{id name="JDBC2XMLUsage-DumpingaDBtoXML:"/}}Dumping a DB to XML: ==== 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 - 17 17 {{code language="none"}} 18 18 jdbc2xml --url <jdbc-url> --file <path-to-file> 19 19 {{/code}} 20 20 21 - Seebelow fordetails and exampleforJDBCURLs.15 +==== {{id name="JDBC2XMLUsage-RestoringaDBfromXML:"/}}Restoring a DB from XML: ==== 22 22 23 -==== {{id name="JDBC2XMLUsage-RestoringaDBfromXML"/}}Restoring a DB from XML ==== 24 - 25 25 {{code language="none"}} 26 26 xml2jdbc --file <path-to-file> --url <jdbc-url> 27 27 {{/code}} ... ... @@ -52,27 +52,11 @@ 52 52 jdbcextr --url <jdbc-url> --file <path-to-file> 53 53 {{/code}} 54 54 55 -== {{id name="JDBC2XMLUsage- JDBCURLs"/}}JDBCURLs ==47 +=== {{id name="JDBC2XMLUsage-Fulllistofoptions"/}}Full list of options === 56 56 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 - 73 73 ==== {{id name="JDBC2XMLUsage-Databaseaccess"/}}Database access ==== 74 74 75 -JDBC URL to access the DB .51 +JDBC URL to access the DB (like jdbc:servertype:~/~/host[:port]/db[?options]): 76 76 77 77 {{code language="none"}} 78 78 --from-url "jdbcurl" ... ... @@ -167,13 +167,13 @@ 167 167 --driver drivername 168 168 {{/code}} 169 169 170 - Linux only: add given drivers to the classpath146 +linux only: add given drivers to the classpath 171 171 172 172 {{code language="none"}} 173 173 --jdbc-drivers jarfilename[;jarfilename...] 174 174 {{/code}} 175 175 176 -==== {{id name="JDBC2XMLUsage-Optionsforjdbc behaviour"/}}Options for jdbcbehaviour====152 +==== {{id name="JDBC2XMLUsage-Optionsfortranslationtojdbc"/}}Options for translation to jdbc ==== 177 177 178 178 Change the batch size for inserts (def.: 1000) 179 179 ... ... @@ -187,7 +187,7 @@ 187 187 --transactional 188 188 {{/code}} 189 189 190 -==== {{id name="JDBC2XMLUsage-Optionsfor xmlreading"/}}Options forxmlreading====166 +==== {{id name="JDBC2XMLUsage-Optionsfortranslationfromxml"/}}Options for translation from xml ==== 191 191 192 192 Enable schema checking on the xml file 193 193 ... ... @@ -201,7 +201,7 @@ 201 201 --create-fk-indices 202 202 {{/code}} 203 203 204 -==== {{id name="JDBC2XMLUsage-Optionsfor xmlcreation"/}}Options forxml creation ====180 +==== {{id name="JDBC2XMLUsage-Optionsfortranslationtoxml"/}}Options for translation to xml ==== 205 205 206 206 Force or supress pretty printing of xml data 207 207 ... ... @@ -254,34 +254,3 @@ 254 254 {{code language="none"}} 255 255 --debug-startup 256 256 {{/code}} 257 - 258 -=== {{id name="JDBC2XMLUsage-Driverpackagesandpaths"/}}Driver packages and paths === 259 - 260 -====== {{id name="JDBC2XMLUsage-MySQL-Driver"/}}MySQL-Driver ====== 261 - 262 -{{code language="none"}} 263 -apt-get install libmysql-java 264 - 265 -jdbc2xml ... --jdbc-drivers /usr/share/java/mysql-connector-java.jar 266 -{{/code}} 267 - 268 -====== {{id name="JDBC2XMLUsage-MSSQL-Driver"/}}MSSQL-Driver ====== 269 - 270 -{{code language="none"}} 271 -apt-get install apache-karaf-mssql 272 - 273 -jdbc2xml ... --jdbc-drivers /usr/share/apache-karaf/lib/sqljdbc4.jar 274 -{{/code}} 275 - 276 -=== {{id name="JDBC2XMLUsage-Typicalspecialoptions"/}}Typical special options === 277 - 278 -===== {{id name="JDBC2XMLUsage-MSSQL"/}}MSSQL ===== 279 - 280 -{{code language="none"}} 281 -# MSSQL likes to create system tables which should not be exported or imported 282 -jdbc2xml ... --exclude-tables sysdiagrams,trace_xe_event_map,trace_xe_action_map 283 -{{/code}} 284 - 285 - 286 - 287 -
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -6568 201 +656879 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://clazzes.atlassian.net/wiki/spaces/JDBC2XML/pages/6568 20/JDBC2XML Usage1 +https://clazzes.atlassian.net/wiki/spaces/JDBC2XML/pages/656879/JDBC2XML Usage