In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to restore the Sybase SQL Anywhere database, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
SybaseSQLAnywhere is a small database product developed by Sybase, which has single-user version and multi-user version, and can be installed on Win95, Win98, NT, Netware and other platforms. The following editor to explain how to restore the Sybase SQL Anywhere database?
How to recover a Sybase SQL Anywhere database
The SQLAnywhere database consists of two files with suffixes of .db and .log, respectively. The .db file is used to store database information (including table structure, view, data, etc.). The .log file is a log file, which is used to record every operation that affects the database, such as creating or deleting objects such as tables, views, triggers, inserting, deleting, modifying data in the table, and so on. So as long as the contents of the .log file are converted into SQL statements, then an empty database is built, and then these SQL statements are executed, and the problem of data recovery is solved. Sybase provides several utilities to accomplish the above functions.
Now assume that the database system files are named mydb.db and mydb.log, respectively. If the mydb.db has been destroyed. Now create a new database, assuming the files are named new.db and new.log, respectively.
Use utilities such as dbtranw.exe,DB32W.EXE,rtsqlw.exe provided by Sybase to complete the recovery, as shown in the following table.
How to recover a Sybase SQL Anywhere database
Step command function
1.Dbtranw-r-k-ymydb.logdb.sql put .log
A SQL statement that converts the contents of a file into
2.Attrib-rmydb.db
Modify the property of the read-only file mydb.db to be writable
3.Attrib-rmydb.log
Modify the property of the read-only file mydb.log to be writable
4.Copynew.dbmydb.db
Overwrite the corrupted old library file with the new empty library file
5.Copynew.logmydb.log
Overwrite the old log file with the new log file
6.DB32W.EXE-dmydb.db
Start the database SQLAnywhere
7.Rtsqlw-Q Murc "userid=dba
Password=sql "readdb.sql
Execute SQL statements that are poured out from a .log file
The function of the first step is to convert the old log file into SQL statements, and put it in a file called db.sql, paying special attention to it can only be operated before step 5, otherwise the log file will be overwritten by new.log, resulting in unable to recover data. The function of the last step is to read the SQL statement from the file db.sql and execute it, assuming that the database user name is dba and the password is sql. For more detailed usage of each command and parameter data, see the appropriate help. I would like to remind users that .log files cannot be deleted casually, otherwise the recovered data will be incomplete.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.