I'm trying to run the following dbmlsync command line:

dbmlsync -c uid=dba;pwd=sql -x c:\my\offline\log\directory

When I run it dbmlsync displays its help screen with a message that says,

Error in command near "c:\my\offline\log\directory"

What did I do wrong?

asked 11 May '11, 14:14

Dave%20Wellstood's gravatar image

Dave Wellstood
2262410
accept rate: 0%

edited 15 Mar '13, 22:02

Mark%20Culp's gravatar image

Mark Culp
23.3k9132275


The problem here is that the command line is ambiguous.

The -x option can be followed by a size (for example -x 1024) or it can be specified on its own which is equivalent to -x 0.

Dbmlsync assumes that if the thing following a -x does not start with a - or a / then it is the size. This is the correct assumption unless the -x comes immediately before the offline log directory which is the only command line option that does not start with a - or a /.

So in the case above dbmlsync is trying to treat c:\my\offline\log directory as the size parameter for the -x option. It cannot convert this value to an integer so it reports an error.

There are 2 ways to work around this:

  1. Replace -x with -x 0.
  2. Rearrange the options on the command line so that the -x option does not come immediately before the offline log directory. (ex dbmlsync -x -c uid=dba;pwd=sql c:\my\offline\log\directory
permanent link

answered 11 May '11, 14:25

Dave%20Wellstood's gravatar image

Dave Wellstood
2262410
accept rate: 0%

edited 11 May '11, 14:28

Try dbmlsync -c uid=dba;pwd=sql -x 0 c:myofflinelogdirectory

permanent link

answered 11 May '11, 14:27

Breck%20Carter's gravatar image

Breck Carter
26.9k438609883
accept rate: 21%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×298
×20

question asked: 11 May '11, 14:14

question was seen: 1,544 times

last updated: 15 Mar '13, 22:02