2

I recently needed to recover a database without backups or a transaction log and discovered the "-O" switch which, according to http://nntp-archive.sybase.com/nntp-archive/action/article/%3C3850ECE1.F29E6FBC@ictsoftware.de%3E, "is used for recovery purposes. It should only be used in rare situations where you cannot start the database and backups are not available."

This switch is not documented anywhere I could find.

My question is two fold: what exactly does the -O switch do, and is there any way to do what the -O switch does via START DATABASE command from the utility_db?

David Murdoch
  • 87,823
  • 39
  • 148
  • 191

1 Answers1

2

Undocumented switches are undocumented for a reason, usually because they're very dangerous. It's recommended that you never use any undocumented switches unless specifically advised to do so by SQL Anywhere support. I'm not going to answer the first question directly other than to say that this switch can be used during recovery but only in very specific circumstances. Use in any other circumstances can result in data loss.

The answer to the second question is no, there is no syntax (documented or not) that will make the START DATABASE statement do the same thing.

Disclaimer: I work for SAP in SQL Anywhere engineering.

Graeme Perrow
  • 56,086
  • 21
  • 82
  • 121
  • Thanks. Though not documenting something because it is "dangerous" doesn't make sense to me; I'd think dangerous things should have MORE documentation, not less. – David Murdoch Nov 06 '14 at 14:35
  • The -f switch fails on its own, and I'm okay with data loss and absolute corruption (since the database can't be opened any other way). I have a related question here: http://stackoverflow.com/questions/26742883/execute-sqlanywhere-11-command-without-rollback-on-windows-using-the-utility-db – David Murdoch Nov 06 '14 at 14:38