I’m following instructions from one of Sybase’s engineers for cloning one of my databases. It’s not working in a Servoy environment and this Sybase engineer has no experience working with Servoy.
Here’s what I’ve done.
Duplicated the target .db and .log files. Renamed them.
Opened the sybase.config file and added the new database to the list.
With these changes Servoy can’t find its repository. If I restore my backup of sybase.config file all is well, Servoy runs.
What steps are we missing?
What’s going on here? In the long run I plan to set up Servoy twice on the same server – one copy for production, the other as a demo. In the meantime I’m doing some prep work on my development system. I had been hoping to point to the cloned database and perform some tests.
I tried to do the same thing a while back and ran into similar problems. You say you want a clone, so I assume that means that you do not care about the data, but just want a copy of the same data structure.
What I ended up doing was something like this (please forgive me if my explanation is sketchy…it has been a while since I did this). I opened my solution. Then I opened Sybase Central. Then I right-clicked servoy_repository (the one immediately under Adaptive Server Anywhere 9) and selected create database. Then I followed the wizard to create the new database.
Next I added the new database to the sybase.conf file and opened Servoy and added the connection to the new database file. I think I then exported my solution. Next I removed the old connection so that I would be asked for the connection when I imported the renamed solution. Then I imported my solution as a renamed solution. When asked for the connection I pointed to the new connection which pointed to the new database. Then servoy automatically created the database structure within the new database for me.
I do not know if I explained all of the sequences above in exactly the right order, but hopefully I explained enough for you to understand the general concept.
For the purposes of this project I want both the structure and the data.
Here’s the error message I’m getting from the Sybase log:
I. 01/07 12:26:57. Running on Windows XP Build 2600 Service Pack 2
I. 01/07 12:27:06. Note: Page size too small for database “servoy_repository”
E. 01/07 12:27:06. Database cannot be started – seven_office.log not expecting any operations in transaction log
I. 01/07 14:05:17. Running on Windows XP Build 2600 Service Pack 2
I. 01/07 14:05:26. Note: Page size too small for database “servoy_repository”
The database server will start with a certain page size. If you attempt to load a database with a larger page size you will get this error message.
To force the database server to use a specific page size, use the -gp switch. This can be done in the servoy sybase.config file
-ti 0 -x tcpip{dobroadcast=no} -zr all -o sybase_db/sybase_log.txt -gp 4096
To determine how big your page size is for your demo database, from the command line issue the following command where mydb.db is your database and fully qualified if is it not in the same directory.
dbinfo -c “uid=dba;pwd=sql;eng=info;dbf=mydb.db”
In Sybase Central you can also get this information by right clicking on the database and selecting properties. The properties page will have this information.
The error message regarding the log file indicates that the log file setting for your database is not using the appropriate file. I am not sure how your database was created. But to change the log file setting you can do one of the following things.
2.1) In Sybase Central, select the Adaptive Server Anywhere plug-in and on the right pane select utilities. You will see change log file settings. This wizard will enable you to change the log file for your demo database.
2.2) Issue the following command where mydb.db is your database and fully qualified if is it not in the same directory. This command will change the log file to newlogfilename.log.
dblog -t newlogfilename.log mydb.db
I am assuming that you could not get this database running so I am expecting that the server is not using the file.