开发者

sql anywhere 5.5 database connect to sql anywhere 12

I have a database file created in sql anywhere 5.5 and I need it to connect to sql anywhere 12. I tried it but it won't accept it, saying that:

"This database was created on开发者_如何学编程 an older version of sql anywhere"


As of SQL Anywhere 10.0, the database server no longer reads database files created with older software; they must be rebuilt. The easiest way would be to unload your database into a new one using the dbunload tool. You can do this in one step:

dbunload -c uid=<user>;pwd=<password>;dbf=<DBFileName> -an <newDBFileName>

This will create a new database file that you can then run using the version 12 server. If you can't do this in a single step (sometimes a new server has trouble unloading an old database), you may have to do it in multiple steps:

  1. Use the dbunload utility that ships with the old software to unload the database using something like dbunload -c uid=<user>;pwd=<password>;dbf=<DBFileName> unload. This will create a directory called "unload" and store a bunch of .dat files in it. It will also create a "reload.sql" script.
  2. Shut down the old server.
  3. Use the dbinit utility that ships with the new software to create a new database with the appropriate settings (encryption, collation, page size, etc.).
  4. Start the new database and run dbisql -c uid=<user>;pwd=<password> reload.sql

Full disclosure: I work for Sybase in SQL Anywhere engineering.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜