How can I recover the Oracle database for the first time! I have been familiar with oracle for several years, but I have been engaged in development for a long time, and there are very few opportunities to back up data. Recently, the company's ERP has to do secondary development, and I have obtained the ERP source code, however, you cannot connect the databases on the connection line for development and testing. If a lot of dirty data is generated, it would be bad or worse if the database server is crashed. Only one copy of the database data can be used by yourself. The online system has timed Hot Standby database, and the entire database is backed up to another machine every night. I went up to the backup server last night to download the latest backup data. It's more than 1 GB, and the network is not powerful. I got down at a.m.. Why didn't I set a Timed Shutdown, that's silly. In fact, I have seen a large copy of the Data Backup book, but it is full of water, no practice, and I forgot to do it. I have written a lot of backup principles and many backup situations, I can write a 700 or 800-page book. The author is amazing. In fact, I just used a statement today: F: \ oracle> imp userid = talkie/password full = y file = sztalkie113_201304142320.dmp. That's right. This statement is dead, such a short statement cannot be executed. First of all: I created a database named talkie in database configuration assistant (talkie is the name of dongjia, haha). I won't talk about how to create it. it's almost the next step. There is no talkie account except the default login name and password. The password entered during database creation does not have a half-cent relationship with the global database name. I'm here to fan up a stupid error, the global database name as a login account in PL/SQL login always reported: ora-01017: account does not exist or wrong password, this is wrong. Second, you need to set up a listener after creating a database. I have configured a listener before, so configure tnsname. ora is enough. I have oracle10g installed the client and server, and find tnsname on the client. configure ora, for example, F: \ oracle \ product \ 10.2.0 \ client_1 \ network \ ADMIN, note that service_name = the global database name is OK. Now we can use PL/SQL. Scott/tiger should use system/manager to access alter user scott identified by tiger if the database is not unlocked during database creation, however, it seems that it is useless to unlock this account. We seldom use the default database account to connect to the database during development, so it is not safe. Step 3: Create your own database account. It is recommended that you use the default system account to log on. normal or sysdba roles do not matter, but sys or other accounts may not have sufficient permissions, if the system does not change the default password when creating a database, the default password is manager. Create user talkie identified by password; grant create user, drop user, alter user, create any view, drop any view, EXP_FULL_DATABASE, IMP_FULL_DATABASE, DBA, CONNECT, RESOURCE, create session to talkie; in this way, you have created your own account and granted permissions. The account name here must be the same as the account name for exporting the database. Otherwise, there will be errors later. Well, the account and password are all available here. If you can log on to PL/SQL just now, it will be able to log on. Then create a tablespace. I have not created a tablespace here, because I don't know what tablespace is in my database. An error is reported during data import, query the tablespaces. Or back up the tablespace separately and restore it to the new database. This makes it much easier. Fourth: it seems that everything is ready, and it is just a breeze. The article begins to say that restoring data is an imp command. Of course, oracle10G or above is another command, you cannot run this command in PL/SQL or SQL plus environments. You must run the command in the DOS environment of CMD. Then cd to the folder where you want to back up the data to store ah, pay attention to this step seems very important, I started into DOS and execute imp run not to report the error: SP2-0734: unknown command beginning "imp system... "-rest of line ignored, also do not use sqlplus/nolog to switch to the SQL environment, or do not use conn system/manager @ talkie or conn talkie/password @ talkie. Many of them are written on the Internet as follows: imp system/manager @ Global Database Name file =? Full = y ignore = y... the database restoration method does not indicate that this statement is executed in the white space, and errors are continuously reported. Fifth: The last error is: cd to the folder where the backup data is stored. Execute F: \ oracle> imp userid = talkie/password full = y file = sztalkie113_201304142320.dmp. There will be IMP-00002: failed to open for read. Why? The semicolons at the end are definitely not required. You should pay attention to those who have missed the SQL language. Because I create a new database without the need to add full, ignore, and so on. After writing this article, I have exported more than 1 GB of data. There should be more than million data records. As a result, many errors are reported because no tablespace is created. It seems that you have to repeat it. The final result is: the import is successful, but there are many warnings to warn your sister.