Java User Interface Programming Guide
â— Book Information
Author: (US) Kenneth F. Krutsch
ISBN: 7-5053-7497-4
Publication date :2002-2
Publishers: Publishing, the media industry: book
Cip approved: (2002) 009871, Size: 1 / 16
Length: 447
Price: 44 yuan
â— Profile
Foreword
The book for Internet browser environment, details of Java customized user interaction component design and realization method. Main objective is to explain how to build a common, and the Web browser application.
In introducing the custom components in the process of development, from the first book for teaching a simple refining example, and then through the actual code comprehensive introduction to the design and development process, and examples in the documentation are available on the p2p . Wrox.com website.
The book for custom user interface components and frameworks of Java developers to use to readers familiar with the Java language, and the AWT and JFC / Swing a certain degree of understanding.
â— text Featured
1. Context of the survey / focus groups - you start designing your product, you should first find out who are your customers, as well as products such as they are off work. You can focus groups, market research data, or to use, you can also do some of the context of the investigation. In the context of the so-called investigation anthropology from the very practical approach. You only need to enter the "field house" and to observe your users. You can visit some in the workplace or at home, look at what is their current interest in the completion of your work. You can observe their interpersonal relationships, their experience, and then try to determine their mental model. Do these methods is very simple, you just do not know how to observe some of the technical people, it could be relatives or friends. If your position is very neutral, cling to a data collection is the attitude of, you will be surprised at your harvest. Observed in the entire process, you should be very passive observer, able to resist want to "help" the desire.
2. Create task lists, user needs - Next, you will need to identify users through your products to realize what kind of mandate, which is the most important and most common. With the use of user needs, you can gradually understood through you, the user would like to finish what kind of mandate.
3. Development of a prototype - from your mind will be drawn to this prototype to draw diagrams on paper or procedures or graphics programs. Verbal discussion of what is right is usually the result of a very rigid. Your ideas will be painted tables will immediately help you see your design shortcomings. When you own the design expressed through drawing, you will make it easier to see whether this can be realized. Drawing and up faster than the revised code more easily.
â— directory
Chapter 1 custom user interface components What is the custom components to establish why the design and implementation of custom components of the custom components to the development of customized components coding thrust Summary
Chapter 2 programmers visual design of the user interface design exciting What are the advantages of how good design, the user interface has completed an attractive interface and clear all the contents of the visual elements integrated Summary
Chapter 3 basic paradigm - Bandong switch scene settings to achieve the planning stage stage senior questions will be used Swing upgrade Summary Switch
Chapter 4 Movieline
Scene settings using custom components to address specific problems implementing the Summary
Chapter 5 TreePanel
Scene set up the planning stage of implementing the auxiliary Summary
Chapter 6 of the scenes set Applyable components supporting the planning stage of implementing the Summary
Chapter 7 TablePanel
Scene set up the planning stage of implementing the auxiliary Summary
Chapter 8 SlidePanel
Scene set up the planning stage of implementing the auxiliary Summary
Chapter 9 Framework
Background on the planning stage supporting categories: Param
Implementation phase Summary
Chapter 10 customizable user interface design specification document what is the product development process planning software maintainability test limit how do you know when completed Summary
Chapter 11 re-decomposition technology component maintenance procedures reflected the evolution Summary
Appendix A user interface design resources
Servlet operating environment for software installation and programming environment settings WAP
(Guide to the Windows2000/Jswdk1.01/jdk1.3 example)
1: Download Jswdk1.01 (jswdk1_0_1-win.zip 745Kb)
2: Download Jdk1.3 (j2sdk1_3_0-win.exe 29.4 MB)
Installed more than two text, please do the following Windows2000 Path, PathClass set (not yet set IIS WAP operating environment, WAP86 Refer to the "establishment of WAP Guide"):
(1): Right-click "My Computer" - "attributes" - "High" - "Environment Variables"
(2): "system variables" box "new …."
Variable name "path"
Variable value "d: \ path jdk1.3 \ bin"
(3) "OK" after the then "new …."
Variable name "classpath"
Variable value "d: \ jdk1.3 \ lib \ tools.jar; D: \ xing \ servlet \ swdk1_0_1-win \ jswdk-1.0.1 \ lib \ servlet.jar; D: \ xing \ servlet \ swdk1_0_1-win \ jswdk-1.0.1 \ webserver.jar "
Jump Start: The Executive jswdk-1.0.1 directory of startserver.bat
Note: Installation of the path as you install the case may be, on its own modification of the same below!
3, testing whether installations success:
In IE, type: "http://localhost:8080" If successful, you will see the following pages:
4, add a test of virtual directory (testwml):
(1), open jswdk-1.0.1 directory of webserver.xml, and in and between Accession: ""
(2), "D: \ xing \ servlet \ swdk1_0_1-win \ jswdk-1.0.1 \" under a "WEB-INF \ servlets \" directory.
(In this way, when the WAP simulator type: http://localhost:8080/testwml/servlet/wap86test Jswdk testwml automatically in the directory under WEB-INF \ servlets \ find in wap86test.class)
(3), restart services: Executive jswdk-1.0.1 directory and then the implementation of the stopserver.bat startserver.bat
[B] generated by WML servlet [/ b]
1. Source wap86test.java:
Import java.io. *;
Import javax.servlet .*;
Import javax.servlet.http .*;
Public class wap86test extends HttpServlet (
Public void service (HttpServletRequest request, HttpServletResponse
Response) throws ServletException, IOException (
Response.setContentType ( "text / vnd.wap.wml");
PrintWriter out = response.getWriter ();
Out.println ("");
Out.println ( "out.println (" \ "http://www.wapforum.org/DTD/wml_1.1.xml \ ">");
Out.println ("");
Out.println ("");
Out.println ( "
");
Out.println ( "Date and Time Service
");
Out.println ( "Date is:" + new java.util.Date ());
Out.println ( "
");
Out.println ("");
Out.println ("");
)
)
2: Compile source
"Start" - "Run …" - type "javac D: \ xing \ servlet \ swdk1_0_1-win \ jswdk-1.0.1 \ testwml \ WEB-INF \ servlets \ wap86test.java"
At this point you see in the "D: \ xing \ servlet \ swdk1_0_1-win \ jswdk-1.0.1 \ testwml \ WEB-INF \ servlets \" directory will be more than a wap86test.class
Document!
If you would like to see more information compiler, in the MS-DOS window, type the above order.
3: success!
Design Model State
State definition: different state, different acts, or that every state has a corresponding behaviour.
When to use?
State model in the use of more practical for the "state of the switch." Because we often use If elseif else switch to the state, if the state against this judgement switch recurring, we will have to think whether the State can adopt the model.
Not only under the state but also in accordance with attributes. If an object's properties different from the conduct of the addressee is not the same this point in the database system of a relatively high frequency, we often in a data table in the rear, coupled with the property attribute meaning field for the identification records of the special nature of some of the records of such properties change (switching) and may occur at any time, it is possible to use State.
Whether or not to use?
In actual use, such as switching the status of switching are many, but sometimes not so obvious, depending on your experience and depth of understanding of the system.
Here, we must set out a "switch switching state" and "general state judge," there are some differences, "the general state of judgement" if there is .. elseif structure, such as:
If (which == 1) state = "hello";
Else if (which == 2) state = "hi";
Else if (which == 3) state = "bye";
This is a "general state of judgement" state value is based on the different variables to determine which, and which did not state relations. Changed if:
If (state.euqals ( "bye")) state = "hello";
Else if (state.euqals ( "hello")) state = "hi";
Else if (state.euqals ( "hi")) state = "bye";
This is the "switch switching state" is the state of the state from "hello" switch to "hi" and then switched to "" bye "in the switch to" hello ", as if a rotary switches, which can change state State use of the model.
If the above is a simple "hello "–>" hi "–>" bye "–>" hello" in one direction switch, it may not necessarily need to use the State model, because many State will be established model of type, complex , but if another act occurred: the above switch direction in turn switches, or any need to switch, we need the State.
NEXT cases:
(Public class Context
Private Color state = null;
Public void push () (
/ / If the current state of the red switch to blue
If (state == Color.red) = Color.blue state;
/ / If the current state of the switch to blue green
Else if (state == Color.blue) = Color.green state;
/ / If the current state of the black switch to red
Else if (state == Color.black) = Color.red state;
/ / If the current state of the green switch to black
Else if (state == Color.green) = Color.black state;
Sample sample = new Sample (state);
Sample.operate ();
)
Public void pull () (
/ / State and push the opposite switch
If (state == Color.green) = Color.blue state;
Else if (state == Color.black) = Color.green state;
Else if (state == Color.blue) = Color.red state;
Else if (state == Color.red) = Color.black state;
Sample2 sample2 = new Sample2 (state);
Sample2.operate ();
)
)
In the example, we have two push push and pull movement Rafah, the two switch, the Context change color, thus, we need to optimize the use of its State model.
Also note: But on the previous cases, state changes, but simply the color assignment, the specific actions is very simple, enormous State for the specific behavior, so, in this case, the actual use did not have to use State mode, it would increase the number of sub-categories, the simple variable complex.
For example: bank accounts, often in the Open and Close state of the state conversion.
For example: the classic TcpConnection, Tcp create a state of the closure of three interception, and repeatedly change its creation interception closed the specific behavior is not a simple 12 will be completed for the use of State
For example: POP mail account, there will be four state start HaveUsername Authorized quit, each state corresponding acts should be relatively large. Suitable for the use of State
For example: the selection of different tools in the toolbox, and can be regarded as the switch between different tools for the use of State. Graphics such as specific procedures, users can choose a different mapping tool box linear curve, this state switch can be used State.
State how to use the two types of entities involved in need:
1.state manager for state management is the switch, as in the above examples of actual Context is a state manager in the state manager in the state of the switching action.
2. Abstract class or interface of the parent, the state is to carry this different kind of father of different categories.
Context to the above example we need to amend it, and the establishment of two types of entities.
Step 1: First establishment of a father categories:
(Public abstract class State
Public abstract void handlepush (Context c);
Public abstract void handlepull (Context c);
Public abstract void getcolor ();
)
Father of the method corresponds to the state manager of switching behavior in the state manager in the Context of this case is, there are two switch push and pull push pull. Well, the father of the state to deal with the two specific actions: handlepush () handlepull (); also need access to a push or pull the outcome of the method getcolor ()
Below is the realization of specific sub-categories:
Public class BlueState extends State (
Public void handlepush (Context c) (
/ / According to push approach "if the state is switching to blue green";
C.setState (new GreenState ());
)
Public void handlepull (Context c) (
/ / According to pull method "If the state is the blue switch to red";
C.setState (new RedState ());
)
Public abstract void getcolor () (return (Color.blue))
)
The same category of other states to achieve the same as blue.
Step 2: State manager should be to rewrite this is the case of Context:
(Public class Context
Private Sate state = null; / / we will be the original Color state into a new State state;
/ / SetState state is used to change the status of the use of state setState achieve switching pulic void setState (State state) (
This.state = state;
)
Public void push () (
/ / State of the details of the switch, in this case it was the color changes have been encapsulated in the sub-category of handlepush achieve here without concern state.handlepush (this);
/ / Sample to be used as a switch in the state results, the use of getColor ()
Sample sample = new Sample (state.getColor ());
Sample.operate ();
)
Public void pull () (
State.handlepull (this);
Sample2 sample2 = new Sample2 (state.getColor ());
Sample2.operate ();
)
)
So far, it has achieved the State refactorying process.
These are just a very simple example, in practical application, or handelpull handlepush processing is complex.
JSP syntax (11) include
<jsp:include>
Includes a static or dynamic document.
JSP syntax
<Jsp: include page = "(relativeURL | <= expression%%>)" flush = "true" />
Or
<Jsp: include page = "(relativeURL | <= expression%%>)" flush = "true">
<Jsp: param name = "parameterName" value = "(parameterValue | <= expression%%>)" /> +
</ Jsp: include>
Examples
<jsp:include Page="scripts/login.jsp" />
<jsp:include Page="copyright.html" />
<jsp:include Page="/index.html" />
<jsp:include Page="scripts/login.jsp">
<jsp:param Name="username" value="jsmith" />
</ Jsp: include>
Description
<jsp:include> Elements allows you to include dynamic and static document, the two documents contain the results are different. If the document is a static document, this is only to contain the contents of the documents contained in the document to add jsp, and if the dynamics of this document, then that document will be included by Jsp compiler implementation (and all similar asp )
You can not judge from the file name on a document is dynamic or static, for example, there may only be aspcn.asp some of the information it contains, without the need for implementation. <jsp:include> To deal with the two documents at the same time, so you do not need to include when judging this document is dynamic or static.
If this is a dynamic document contains, then you can also use <jsp: param> also passing a parameter name and parameter value.
Attribute
Page = "(relativeURL | <= expression%%>)"
Parameters for a relative path, or on behalf of a relative path expressions.
Flush = "true"
Here you must use flush = "true", you can not use false value. Default values for the false
<Jsp: param name = "parameterName" value = "(parameterValue | <= expression%%>)" /> +
<jsp:param> Clauses allow you to transfer one or more parameters to dynamic document
You can use more than one page <jsp: param> Transfer to a number of parameters,
LOGÃSystemLogger.java
Import java.io. *;
Import java.util .*;
Import java.text .*;
Public class SystemLogger implements Runnable (
Public static int DEBUG = 0;
Public static int INFO = 1;
Public static int NOTICE = 2;
Public static int WARNING = 3;
Public static int ERROR = 4;
Public static int FATAL_ERROR = 5;
Public static int MIN_LEVEL = 0;
Public static int MAX_LEVEL = 5;
Public static int DAILY = 0;
Public static int HOURLY = 1;
Private static String [] = (LEVEL_DESC
"
"
"
"
"
"
);
Private PrintWriter out;
Private int level = DEBUG;
Private DateFormat dateFormat = new SimpleDateFormat ( "yyyy.MM.dd HH: mm: ss");
Private boolean needToCloseOutput = false;
Private Thread thread = null;
Private String filePrefix = "";
Private int switchingFrequency = DAILY;
Private Vector listeners = null;
/ / - Start of Singleton Pattern ———————– / /
Private static SystemLogger instance = null;
Public static SystemLogger getInstance () (
If (instance == null) (
Instance = new SystemLogger ();
)
Return instance;
)
Protected SystemLogger () (
/ / Set default output to System.out:
SetOutput (System.out);
)
/ / — End of Singleton Pattern ————————- / /
Public synchronized void setOutput (
String filePrefix, boolean autoSwitching, int frequency) (
This.filePrefix = filePrefix;
This.switchingFrequency =
(Frequency! & Frequency = DAILY! = HOURLY)? DAILY: frequency;
If (autoSwitching) (
If (thread == null) (
Thread = new Thread (this);
Thread.start ();
)
Else ()
If (thread! = Null) (
Thread t = thread;
Thread = null;
T.interrupt ();
)
SetOutput (filePrefix +. "Log");
)
)
Private synchronized void setOutput (String filename) (
PrintWriter newOutput = null;
Try (
NewOutput = new PrintWriter (new FileOutputStream (filename, true));
) Catch (IOException e) (
LogError ( "System logger failed to open file" + filename, e);
Return;
)
If (out! = Null & needToCloseOutput) (
LogInfo ( "System logger output closed and switched to the" + filename);
Out.close ();
)
Out = newOutput;
NeedToCloseOutput = true;
LogInfo ( "System logger started with output to" + filename);
LogInfo ( "System logger option (autoSwitching =" +
((Thread == null)? "False":
"True, frequency =" +
((SwitchingFrequency == DAILY)? "Daily":
((SwitchingFrequency == HOURLY)? "Hourly": "unknown"))) +
")");
)
Private synchronized void recycleOutput () (
SimpleDateFormat df;
If (switchingFrequency == DAILY) (
Df = new SimpleDateFormat ( "yyyy-MM-dd");
Else ()
Df = new SimpleDateFormat ( "yyyy-MM-dd-HH");
)
String filename = filePrefix + "-" + df.format (new Date ()) +. "Log";
SetOutput (filename);
)
Public void run () (
Int currentDayOfMonth = -1;
Int currentHourOfDay = -1;
For (;;) (
Calendar calendar = Calendar.getInstance ();
Calendar.setTime (new Date ());
Int dd = calendar.get (Calendar.DAY_OF_MONTH);
Int hh = calendar.get (Calendar.HOUR_OF_DAY);
Int mm = calendar.get (Calendar.MINUTE);
Int ss = calendar.get (Calendar.SECOND);
Int ms = calendar.get (Calendar.MILLISECOND);
If ((switchingFrequency == & DAILY
(Dd! = CurrentDayOfMonth)) | |
(SwitchingFrequency == & HOURLY
(Dd! CurrentDayOfMonth = | | hh! = CurrentHourOfDay))) (
RecycleOutput ();
)
LogDebug ( "Calendar dd =" + + dd
"Hh =" + + hh
"Mm =" + mm +
"Ss =" + + ss
"Ms =" + ms);
CurrentDayOfMonth = dd;
CurrentHourOfDay = hh;
Int sleep;
If (switchingFrequency == DAILY) (
Sleep = 86400000 - (((hh * 60 + mm) * 60 + ss) * 1000 + ms);
Else ()
Sleep = 3600000 - ((mm * 60 + ss) * 1000 + ms);
)
Sleep + = 500; / / add 0.5 sec. For tolerance.
LogDebug (
"System logger will switch its output to a new file after" +
Sleep + "milliseconds.");
Try (
Thread.sleep (sleep);
) Catch (InterruptedException e) (
LogDebug ( "System logger auto-switching thread interrupted");
)
If (Thread.currentThread ()! = This.thread) (
Break;
)
)
LogDebug ( "System logger auto-switching thread terminated.");
)
Public synchronized void setOutput (OutputStream os) (
If (out! = Null & needToCloseOutput) (
LogInfo ( "System logger output closed.");
Out.close ();
Out = null;
)
Out = new PrintWriter (os);
NeedToCloseOutput = false;
LogInfo (
"System logger started with output as" +
((Os == System.out)?
"System.out": "OutputStream" + os.toString ()));
)
Public synchronized void setOutput (PrintWriter writer) (
If (out! = Null & needToCloseOutput) (
LogInfo ( "System logger output closed.");
Out.close ();
Out = null;
)
Out = writer;
NeedToCloseOutput = false;
LogInfo ( "System logger started with output as PrintWriter" +
Writer.toString ());
)
Public synchronized void close () (
LogInfo ( "System logger requested to be closed down.");
If (thread! = Null) (
Thread t = thread;
Thread = null;
T.interrupt ();
Try (
Wait (500);
) Catch (InterruptedException e) ()
)
If (out! = Null & needToCloseOutput) (
Out.close ();
Out = null;
)
Listeners = null;
)
/ **
Specifies the level of the messages to be logged.
* /
Public void setLevel (int level) (
This.level = level;
)
/ **
Returns the current logging level.
@ Return the current logging level.
* /
Public int getLevel () (
Return this.level;
)
/ **
Logs a message with the specified log level and associated
Exception.
@ Param logLevel the level of the message.
@ Param msg the message string.
@ Param e an optional exception associated with the message.
* /
Public void log (int logLevel, String msg, Exception e) (
If (null out == | | this.level> logLevel) (
Return;
)
LogLevel = logLevel <MIN_LEVEL? MIN_LEVEL: logLevel;
LogLevel logLevel => MAX_LEVEL? MAX_LEVEL: logLevel;
String line;
Synchronized (this) (
Line = "#" + dateFormat.format (new Date ()) + ""
+ LEVEL_DESC [logLevel] + "" + msg;
Out.println (line);
If (e! = Null) (
E.printStackTrace (out);
)
Out.flush ();
)
If (listeners! = Null) (
SystemLoggerListener listener;
SystemLoggerEvent evt =
New SystemLoggerEvent (this, logLevel, msg, e, line);
For (Enumeration en = ((Vector) listeners.clone ()). Elements ();
En.hasMoreElements ()) (
Try (
Listener = (SystemLoggerListener) en.nextElement ();
Listener.messageLogged (evt);
) Catch (Exception e1) ()
)
)
)
/ **
Logs a debug message with an exception.
@ Param msg the message string
@ Param e the excetpion.
* /
Public void logDebug (String msg, Exception e) (
Log (DEBUG, msg, e);
)
/ **
Logs a debug message without an exception.
@ Param msg the message string
@ Param e the excetpion.
* /
Public void logDebug (String msg) (
Log (DEBUG, msg, null);
)
/ **
Logs an info message with an exception.
@ Param msg the message string
@ Param e the excetpion.
* /
Public void logInfo (String msg, Exception e) (
Log (INFO, msg, e);
)
/ **
Logs an info message without an exception.
@ Param msg the message string
@ Param e the excetpion.
* /
Public void logInfo (String msg) (
Log (INFO, msg, null);
)
/ **
Logs a notice message with an exception.
@ Param msg the message string
@ Param e the excetpion.
* /
Public void logNotice (String msg, Exception e) (
Log (NOTICE, msg, e);
)
/ **
Logs a notice message without an exception.
@ Param msg the message string
@ Param e the excetpion.
* /
Public void logNotice (String msg) (
Log (NOTICE, msg, null);
)
/ **
Logs a warning message with an exception.
@ Param msg the message string
@ Param e the excetpion.
* /
Public void logWarning (String msg, Exception e) (
Log (WARNING, msg, e);
)
/ **
Logs a warning message without an exception.
@ Param msg the message string
@ Param e the excetpion.
* /
Public void logWarning (String msg) (
Log (WARNING, msg, null);
)
/ **
Logs an error message with an exception.
@ Param msg the message string
@ Param e the excetpion.
* /
Public void logError (String msg, Exception e) (
Log (ERROR, msg, e);
)
/ **
Logs an error message without an exception.
@ Param msg the message string
@ Param e the excetpion.
* /
Public void logError (String msg) (
Log (ERROR, msg, null);
)
/ **
Logs a fatal error message with an exception.
@ Param msg the message string
@ Param e the excetpion.
* /
Public void logFatalError (String msg, Exception e) (
Log (FATAL_ERROR, msg, e);
)
/ **
Logs a fatal error message without an exception.
@ Param msg the message string
@ Param e the excetpion.
* /
Public void logFatalError (String msg) (
Log (FATAL_ERROR, msg, null);
)
Public synchronized void addSystemLoggerListener (
SystemLoggerListener listener) (
If (listeners == null) (
Listeners = new Vector ();
)
Listeners.addElement (listener);
)
Public void removeSystemLoggerListener (
SystemLoggerListener listener) (
If (listener! = Null) (
Listeners.removeElement (listener);
)
)
)
With J2EE BEA WebLogic launch new server software
[Ccidnet.com - BEA Systems, Inc. for the April 30 launch WebLogic Server version 7.0 is currently being widely publicized the software for new network services and Java support.
BEA's San Francisco Division senior product marketing manager Eric Stahl said that the release of the BEA application server software version 7.0 with J2EE (Java 2 Enterprise Edition) 1.3 standard. J2EE 1.3 standard to provide EJB (Enterprise JavaBeans) version 2.0 support. EJB 2.0 also enhance the capacity of the continuity of management, so as to improve the connectivity of the database.
In addition, version 7.0 BEA company also added a new developer tools, application software to achieve the packaging and installation process automation. That the design of the products intended to support large-scale application software installation.
BEA to JVM (java virtual machine), as part of version 7.0, which has a strong publicity. The company has also adopted the Appeal Virtual Machine, and strive to provide a platform from the JVM. Stahl said: "It is not a developer in the provision for Windows and Linux platforms are not bound by the JVM.
Stahl also noted that the 7.0 version of Java information services through enhanced the function of the transmission of information, thus enhancing system availability.
Log4j the official version 1.2 released
Log4j 1.2 recently released the final release version 1.2 (RC1), Log4j is an open source logging development kits, Log4j increase of 1.2 JMX support JDBC logging, the log Show graphics, I / O buffer capability and can be facilitate the development kits from JDK1.4 logging in the transplanted to log4j.
Download log4j: http://jakarta.apache.org/log4j/docs/download.html
Category on the date format conversion
/ **
* Title:
* Description: ots
* Copyright: Copyright (c) 2001
* Company: NMT
* @ Author Colin
* @ Version 1.0
* /
Import java.sql.Timestamp;
Import java.util .*;
Import java.text .*;
(Public class FormatUtil
/ **
* @ Param Calendar
* @ Return String 2001/12/13 Format
* /
Public static String CalendarToStr (Calendar cal) (
SimpleDateFormat format = new SimpleDateFormat ( "yyyy / MM / dd");
If (cal! = Null) (
Date date = cal.getTime ();
Return format.format (date);
Else ()
Return "";
)
)
/ **
* @ Param Calendar
* @ Return a Sunday Calendar in the Week
* /
Public static Calendar starCalOfWeek (Calendar day) (
Int temp = day.get (Calendar.DAY_OF_WEEK);
Switch (temp) (
Case 1:
Return day;
Case 2:
Day.add (Calendar.DATE, -1);
Return day;
Case 3:
Day.add (Calendar.DATE, -2);
Return day;
Case 4:
Day.add (Calendar.DATE, -3);
Return day;
Case 5:
Day.add (Calendar.DATE, -4);
Return day;
Case 6:
Day.add (Calendar.DATE, -5);
Return day;
Case 7:
Day.add (Calendar.DATE, -6);
Return day;
Default:
Return day;;
)
)
/ **
* @ Param Calendar
* @ Return a Satday Calendar in the Week
* /
Public static Calendar endCalOfWeek (Calendar day) (
Int temp = day.get (Calendar.DAY_OF_WEEK);
Switch (temp) (
Case 1:
Day.add (Calendar.DATE, 6);
Return day;
Case 2:
Day.add (Calendar.DATE, 5);
Return day;
Case 3:
Day.add (Calendar.DATE, 4);
Return day;
Case 4:
Day.add (Calendar.DATE, 3);
Return day;
Case 5:
Day.add (Calendar.DATE, 2);
Return day;
Case 6:
Day.add (Calendar.DATE, 1);
Return day;
Case 7:
Return day;
Default:
Return day;;
)
)
Public static Date StrToDate (String str) (
If (str.length () == 0) (
Return null;
)
Int start = str.indexOf ('/');
String year str.substring = (0, start);
Start + +;
Int start1 = str.indexOf ('/', start);
String month = str.substring (start, start1);
String day = str.substring (start1 + 1);
Date date = new Date ();
Calendar cal = Calendar.getInstance ();
Cal.setTime (date);
Cal.set (Calendar.YEAR, Integer.parseInt (year));
Cal.set (Calendar.MONTH, Integer.parseInt (month) - 1);
Cal.set (Calendar.DATE, Integer.parseInt (day));
SimpleDateFormat sdf = new SimpleDateFormat ( "yyyy / MM / dd");
System.out.println (sdf.format (cal.getTime ()));
Return cal.getTime ();
)
Public static Calendar StrToCalendar (String str) (
If (str.length () == 0) (
Return null;
)
Int start = str.indexOf ('/');
String year str.substring = (0, start);
Start + +;
Int start1 = str.indexOf ('/', start);
String month = str.substring (start, start1);
String day = str.substring (start1 + 1);
Date date = new Date ();
Calendar cal = Calendar.getInstance ();
Cal.setTime (date);
Cal.set (Calendar.MONTH, Integer.parseInt (month) - 1);
Cal.set (Calendar.DATE, Integer.parseInt (day));
Return cal;
)
/ **
* @ Param Calendar
* @ Return String Sun Mon etc. Format
* /
Public static String dayOfWeek (Calendar day) (
Int temp = day.get (Calendar.DAY_OF_WEEK);
Switch (temp) (
Case 1:
Return "Sun";
Case 2:
Return "Mon";
Case 3:
Return "Tue";
Case 4:
Return "Wed";
Case 5:
Return "Thu";
Case 6:
Return "Fri";
Case 7:
Return "Sat";
Default:
Return "";
)
)
/ **
* @ Param String Date Format 2001/12/13
* @ Return String Sun Mon etc. Format
* /
Public static String dayOfWeek (String inDay) (
Calendar cal = Calendar.getInstance ();
Cal.setTime (StrToDate (inDay));
Int temp = cal.get (Calendar.DAY_OF_WEEK);
Switch (temp) (
Case 1:
Return "Sun";
Case 2:
Return "Mon";
Case 3:
Return "Tue";
Case 4:
Return "Wed";
Case 5:
Return "Thu";
Case 6:
Return "Fri";
Case 7:
Return "Sat";
Default:
Return "";
)
)
Public static Timestamp StrToTimestamp (String timestampStr, String pattern)
Throws ParseException (
Java.util.Date date = null;
SimpleDateFormat format = new SimpleDateFormat (pattern);
Try (
Date = format.parse (timestampStr);
) Catch (ParseException e) (
Throw e;
)
Return date == null? Null: new Timestamp (date.getTime ());
)
)
Oracle imp / exp note
Oracle imp / exp note exp / imp explain order
Exp / imp two oracle order can be said to be the most commonly used in the order.
ORACLE database there are two types of backup methods. The first category is the physical backup, the method restore the integrity of the database, but the database must be running in the naturalization block mode (non-return business database in the block mode operation), and the great need for external storage devices, such as tape libraries; section second-class backup for the backup logic, business databases used this way, this method does not require database running on the naturalization block mode, the backup not only simple but also the need for an external storage device.
Logical database backup method
ORACLE database logical backup divided into three modes: Table backup, users backup and full backups.
Table mode backup a user specified object model (Table). This commonly used business database backup.
If the backup to the local paper, use the following commands:
Exp icdmain / icd rows = y indexes = n compress = n buffer = 65536
Volsize feedback = 100,000 = 0
File = exp_icdmain_csd_yyyymmdd.dmp
Log = exp_icdmain_csd_yyyymmdd.log
= Icdmain.commoninformation tables, icdmain.serviceinfo, icdmain.dealinfo
If the direct-to-tape backup devices, the use of the following commands:
Exp icdmain / icd rows = y indexes = n compress = n buffer = 65536
Volsize feedback = 100,000 = 0
File = / dev/rmt0
Log = exp_icdmain_csd_yyyymmdd.log
= Icdmain.commoninformation tables, icdmain.serviceinfo, icdmain.dealinfo
Note: In the disk space permitting, should first backup to the local server, and then copied to tape. For speed considerations, so as not to direct backup to tape devices.
User mode backup of a user mode all objects. This commonly used business database backup.
If the backup to the local paper, use the following commands:
Exp icdmain / icd owner icdmain rows = = = y indexes n compress = n buffer = 65536
Volsize feedback = 100,000 = 0
File = exp_icdmain_yyyymmdd.dmp
Log = exp_icdmain_yyyymmdd.log
If the direct-to-tape backup devices, the use of the following commands:
Exp icdmain / icd owner icdmain rows = = = y indexes n compress = n buffer = 65536
Volsize feedback = 100,000 = 0
File = / dev/rmt0
Log = exp_icdmain_yyyymmdd.log
Note: If disk space, the proposed backup to disk and then copied to tape. If your database data smaller,
This approach can be backup.
Fully complete database backup mode. Operational databases do not use this backup. Backup order:
Exp icdmain / icd rows = y indexes = n compress = n buffer = 65536
Volsize feedback = 100000 full = y = 0
File = exp_fulldb_yyyymmdd.dmp (tape for equipment / dev/rmt0)
Log = exp_fulldb_yyyymmdd.log
The database backup, incremental backup recommended that the backup only changes since the last backup data. Incremental backup commands:
Exp icdmain / icd rows = y indexes = n compress = n buffer = 65536
Volsize feedback = 100,000 = 0 = y inctype full incremental =
File = exp_fulldb_yyyymmdd.dmp (tape for equipment / dev/rmt0)
Log = exp_fulldb_yyyymmdd.log
Note: The incremental backups must meet the following conditions:
1.
Only complete database backup effective, and the first time need full = y parameters, the future needs inctype = increment
Al parameters.
2. EXP_FULL_DATABASE users must have a role in the system.
3. Traffic smaller may use database backup.
4. If disk space, the proposed backup to disk, and then backup to tape.
Business methods and database backup cycle with EXP backup prior to running in the SYS user CATEXP.SQL document (if the document has been in operation before, do not implement this script).
No special that does not allow the implementation of backup client orders.
Backup command reference table mode backup order.
From the disk file backup to tape backup if the first document to the local disk, you need to dump to tape devices.
1. For Show host configuration tape equipment, use the following commands:
Lsdev-Cc tape
The results show that as in the example below:
Rmt0 Available 30-58-00-2,0 SCSI 4mm Tape Drive
Rmt1 Defined 30-58-00-0,0 SCSI 4mm Tape Drive
Available equipment indicating the tape is available equipment.
2. Show For the contents of tape storage, use the following commands:
Tar-tvf / dev/rmt0
The results show that as in the example below:
- Rw-r - r - 300 400 8089 600 Jan 11 14:33:57 2001 exp_icdmain_20010111.dmp
If the show is as follows similar content, said that the tape is the backup data from the database directly to the backup tape,
Rather than dump from the local disk to tape backup files, the operating system does not recognize.
Tar: 0511-193 An error occurred while reading from the media.
There is an input or output error.
Or
Tar: 0511-169 A directory checksum error on media; -267331077 not equal to
2
5626.
3. New tape or no need to retain the existing data tape, use the following commands:
Tar-cvf / dev/rmt0 exp_icdmain_yyyymmdd.dmp
Note: A. The Order will unconditionally coverage of the existing data on the tape.
B. documents were not included path information, such as: / backup / exp_icdmain_yyyymmdd.dmp.
4. For the need to retain the existing data tape, use the following commands:
Tar-rvf / dev/rmt0 exp_icdmain_yyyymmdd.dmp
Note: The order will be added to the document exp_icdmain_yyyymmdd.dmp tape of the end of the existing data do not cover.
Special emphasis: If backup when directly from the database backup to tape, the tape will not be allowed on to the additional copy of any other document, or the backup data failure.
5. For a dump to tape will be on the backup files copied to the local hard disk, use the following commands:
A. tape will be on all the documents copied to the local drive current directory
Tar-xvf / dev/rmt0
B. will be designated on the tape copy files to the local hard drive current directory
Tar-xvf / dev/rmt0 exp_icdmain_yyyymmdd.dmp
As for backup time at the backup of the system I / O have a greater impact, therefore, suggested that after 23:00 backup work.
Oracle database version of the business recovery programmes must be in accordance with the resumption backup plan was finalized. As a business database tables and user backup backup combination of programmes,
Therefore, the recovery of database operations must be in accordance with the actual situation and users resume use table with the resumption of the programme.
Rehabilitation programmes database table into the logic of restoration of recovery, restoration of users, fully restored three models.
Table mode in accordance with this table will be based on the data backup model resume.
A. restore backup data from the full content of local files if recovery, the use of the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0
File = exp_icdmain_cs
D_yyyymmdd.dmp
Log = imp_icdmain_csd_yyyymmdd.log
If the equipment from tape restoration, use the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0 file = / dev/rmt0
Log = imp_icdmain_csd_yyyymmdd.log
B. Restoration of backup data in the table if designated resume from the local paper, use the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0
File = exp_icdmain_cs
D_yyyymmdd.dmp
Log = imp_icdmain_csd_yyyymmdd.log
= Commoninformation tables, serviceinfo
If the equipment from tape restoration, use the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0
File = / dev/rmt0
Log = imp_icdmain_csd_yyyymmdd.log
= Commoninformation tables, serviceinfo
Users will be based on this model according to user mode backup data recovery.
A. restore backup data from the full content of local files if recovery, the use of the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0
File = exp_icdmain_yy
Yymmdd.dmp
Log = imp_icdmain_yyyymmdd.log
If the equipment from tape restoration, use the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0 file = / dev/rmt0
Log = imp_icdmain_yyyymmdd.log
B. Restoration of backup data in the table if designated resume from the local paper, use the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0
File = exp_icdmain_yy
Yymmdd.dmp
Log = imp_icdmain_yyyymmdd.log
= Commoninformation tables, serviceinfo
If the equipment from tape restoration, use the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0 file = / dev/rmt0
Log = imp_icdmain_yyyymmdd.log
= Commoninformation tables, serviceinfo
If fully model for the complete backup mode, the following recovery methods:
If resume from the local paper, use the following commands:
Imp system / manager rows = y indexes = n commit = y buffer = 65536
Ignore feedback = 100,000 = y volsize full = y = 0
File = exp_icdmain_yyyymmdd.dmp
Log = imp_icdmain_yyyymmdd.log
If the equipment from tape restoration, use the following commands:
Imp system / manager rows = y indexes = n commit = y buffer = 65536
Ignore feedback = 100,000 = y volsize full = y = 0
File = / dev/rmt0
Log = imp_icdmain_yyyymmdd.log
Parameter Description
1. Ignore parameters
Oracle recover data in the process of restoring a table when the table already exists.
According to ignore the parameters set up to decide how to operate.
If ignore = y, Oracle implementation of the CREATE TABLE statement is not directly inserted into the data in the table, if inserted records violated the restrictive conditions, such as primary key constraint,
The records will not be inserted wrong, but legal records would add to the table.
If ignore = n, Oracle is not the implementation of the CREATE TABLE statement, but would not Inserting data into a form, but neglected the table mistakes, continue to recover under a table.
2. Indexes parameters in the process of restoring data, if n = indexes, the index of the list will not be restored, but the only primary key corresponding to unconditionally resume Index, which is to ensure data integrity.
Character set conversion for single-byte character sets (such as US7ASCII), the recovery time, the database automatically switch character set for the session (NLS_LANG parameters); for multi-byte character sets (such as ZHS16CGB231280), restore, as far as possible, should be the same character set (avoid conversion), if conversion, the characters in the target database output database is a superset of the character set.
Recovery of operational databases using Table recovery programme. IMP used in the restoration, in the first SYS
Users running CATEXP.SQL document (if the document has been in operation before, do not implement this script), and then the following order:
IMP ICDMAIN / ICD FILE = = LOG file name LOG file name ROWS = Y
COMMIT = Y BUFFER = Y IGNORE = Y TABLES = table Note: To restore the table reference to backup the table. Recovery is in the original table on the basis of cumulative data. No special that allowed the resumption of the implementation of client orders
Will be a database of all users of a certain Table I. In addition to a database of users the following examples
Exp userid = system / manager owner = username1 file = expfile.dmp
Imp userid = system / manager fromuser username1 touser = = = y file username2 ignore = expfile.dmp
Will be a database of all users of a certain Table I. In addition to a database of users the following examples
Exp userid = system / manager owner = username1 file = expfile.dmp
Imp userid = system / manager fromuser username1 touser = = = y file username2 ignore = expfile.dmp
ORACLE database there are two types of backup methods. The first category is the physical backup, the method restore the integrity of the database, but the database must be running in the naturalization block mode (non-return business database in the block mode operation), and the great need for external storage devices, such as tape libraries; section second-class backup for the backup logic, business databases used this way, this method does not require database running on the naturalization block mode, the backup not only simple but also the need for an external storage device.
Logical database backup method
ORACLE database logical backup divided into three modes: Table backup, users backup and full backups.
Table mode backup a user specified object model (Table). This commonly used business database backup.
If the backup to the local paper, use the following commands:
Exp icdmain / icd rows = y indexes = n compress = n buffer = 65536
Volsize feedback = 100,000 = 0
File = exp_icdmain_csd_yyyymmdd.dmp
Log = exp_icdmain_csd_yyyymmdd.log
= Icdmain.commoninformation tables, icdmain.serviceinfo, icdmain.dealinfo
If the direct-to-tape backup devices, the use of the following commands:
Exp icdmain / icd rows = y indexes = n compress = n buffer = 65536
Volsize feedback = 100,000 = 0
File = / dev/rmt0
Log = exp_icdmain_csd_yyyymmdd.log
= Icdmain.commoninformation tables, icdmain.serviceinfo, icdmain.dealinfo
Note: In the disk space permitting, should first backup to the local server, and then copied to tape. For speed considerations, so as not to direct backup to tape devices.
User mode backup of a user mode all objects. This commonly used business database backup.
If the backup to the local paper, use the following commands:
Exp icdmain / icd owner icdmain rows = = = y indexes n compress = n buffer = 65536
Volsize feedback = 100,000 = 0
File = exp_icdmain_yyyymmdd.dmp
Log = exp_icdmain_yyyymmdd.log
If the direct-to-tape backup devices, the use of the following commands:
Exp icdmain / icd owner icdmain rows = = = y indexes n compress = n buffer = 65536
Volsize feedback = 100,000 = 0
File = / dev/rmt0
Log = exp_icdmain_yyyymmdd.log
Note: If disk space, the proposed backup to disk and then copied to tape. If your database data smaller,
This approach can be backup.
Fully complete database backup mode. Operational databases do not use this backup. Backup order:
Exp icdmain / icd rows = y indexes = n compress = n buffer = 65536
Volsize feedback = 100000 full = y = 0
File = exp_fulldb_yyyymmdd.dmp (tape for equipment / dev/rmt0)
Log = exp_fulldb_yyyymmdd.log
The database backup, incremental backup recommended that the backup only changes since the last backup data. Incremental backup commands:
Exp icdmain / icd rows = y indexes = n compress = n buffer = 65536
Volsize feedback = 100,000 = 0 = y inctype full incremental =
File = exp_fulldb_yyyymmdd.dmp (tape for equipment / dev/rmt0)
Log = exp_fulldb_yyyymmdd.log
Note: The incremental backups must meet the following conditions:
1.
Only complete database backup effective, and the first time need full = y parameters, the future needs inctype = increment
Al parameters.
2. EXP_FULL_DATABASE users must have a role in the system.
3. Traffic smaller may use database backup.
4. If disk space, the proposed backup to disk, and then backup to tape.
Business methods and database backup cycle with EXP backup prior to running in the SYS user CATEXP.SQL document (if the document has been in operation before, do not implement this script).
No special that does not allow the implementation of backup client orders.
Backup command reference table mode backup order.
From the disk file backup to tape backup if the first document to the local disk, you need to dump to tape devices.
1. For Show host configuration tape equipment, use the following commands:
Lsdev-Cc tape
The results show that as in the example below:
Rmt0 Available 30-58-00-2,0 SCSI 4mm Tape Drive
Rmt1 Defined 30-58-00-0,0 SCSI 4mm Tape Drive
Available equipment indicating the tape is available equipment.
2. Show For the contents of tape storage, use the following commands:
Tar-tvf / dev/rmt0
The results show that as in the example below:
- Rw-r - r - 300 400 8089 600 Jan 11 14:33:57 2001 exp_icdmain_20010111.dmp
If the show is as follows similar content, said that the tape is the backup data from the database directly to the backup tape,
Rather than dump from the local disk to tape backup files, the operating system does not recognize.
Tar: 0511-193 An error occurred while reading from the media.
There is an input or output error.
Or
Tar: 0511-169 A directory checksum error on media; -267331077 not equal to
2
5626.
3. New tape or no need to retain the existing data tape, use the following commands:
Tar-cvf / dev/rmt0 exp_icdmain_yyyymmdd.dmp
Note: A. The Order will unconditionally coverage of the existing data on the tape.
B. documents were not included path information, such as: / backup / exp_icdmain_yyyymmdd.dmp.
4. For the need to retain the existing data tape, use the following commands:
Tar-rvf / dev/rmt0 exp_icdmain_yyyymmdd.dmp
Note: The order will be added to the document exp_icdmain_yyyymmdd.dmp tape of the end of the existing data do not cover.
Special emphasis: If backup when directly from the database backup to tape, the tape will not be allowed on to the additional copy of any other document, or the backup data failure.
5. For a dump to tape will be on the backup files copied to the local hard disk, use the following commands:
A. tape will be on all the documents copied to the local drive current directory
Tar-xvf / dev/rmt0
B. will be designated on the tape copy files to the local hard drive current directory
Tar-xvf / dev/rmt0 exp_icdmain_yyyymmdd.dmp
As for backup time at the backup of the system I / O have a greater impact, therefore, suggested that after 23:00 backup work.
Oracle database version of the business recovery programmes must be in accordance with the resumption backup plan was finalized. As a business database tables and user backup backup combination of programmes,
Therefore, the recovery of database operations must be in accordance with the actual situation and users resume use table with the resumption of the programme.
Rehabilitation programmes database table into the logic of restoration of recovery, restoration of users, fully restored three models.
Table mode in accordance with this table will be based on the data backup model resume.
A. restore backup data from the full content of local files if recovery, the use of the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0
File = exp_icdmain_cs
D_yyyymmdd.dmp
Log = imp_icdmain_csd_yyyymmdd.log
If the equipment from tape restoration, use the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0 file = / dev/rmt0
Log = imp_icdmain_csd_yyyymmdd.log
B. Restoration of backup data in the table if designated resume from the local paper, use the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0
File = exp_icdmain_cs
D_yyyymmdd.dmp
Log = imp_icdmain_csd_yyyymmdd.log
= Commoninformation tables, serviceinfo
If the equipment from tape restoration, use the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0
File = / dev/rmt0
Log = imp_icdmain_csd_yyyymmdd.log
= Commoninformation tables, serviceinfo
Users will be based on this model according to user mode backup data recovery.
A. restore backup data from the full content of local files if recovery, the use of the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0
File = exp_icdmain_yy
Yymmdd.dmp
Log = imp_icdmain_yyyymmdd.log
If the equipment from tape restoration, use the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0 file = / dev/rmt0
Log = imp_icdmain_yyyymmdd.log
B. Restoration of backup data in the table if designated resume from the local paper, use the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0
File = exp_icdmain_yy
Yymmdd.dmp
Log = imp_icdmain_yyyymmdd.log
= Commoninformation tables, serviceinfo
If the equipment from tape restoration, use the following commands:
Imp icdmain / icd fromuser icdmain touser = = = y indexes icdmain rows = n
Commit = y buffer = 65536 = 100000 ignore feedback = n volsize = 0 file = / dev/rmt0
Log = imp_icdmain_yyyymmdd.log
= Commoninformation tables, serviceinfo
If fully model for the complete backup mode, the following recovery methods:
If resume from the local paper, use the following commands:
Imp system / manager rows = y indexes = n commit = y buffer = 65536
Ignore feedback = 100,000 = y volsize full = y = 0
File = exp_icdmain_yyyymmdd.dmp
Log = imp_icdmain_yyyymmdd.log
If the equipment from tape restoration, use the following commands:
Imp system / manager rows = y indexes = n commit = y buffer = 65536
Ignore feedback = 100,000 = y volsize full = y = 0
File = / dev/rmt0
Log = imp_icdmain_yyyymmdd.log
Parameter Description
1. Ignore parameters
Oracle recover data in the process of restoring a table when the table already exists.
According to ignore the parameters set up to decide how to operate.
If ignore = y, Oracle implementation of the CREATE TABLE statement is not directly inserted into the data in the table, if inserted records violated the restrictive conditions, such as primary key constraint,
The records will not be inserted wrong, but legal records would add to the table.
If ignore = n, Oracle is not the implementation of the CREATE TABLE statement, but would not Inserting data into a form, but neglected the table mistakes, continue to recover under a table.
2. Indexes parameters in the process of restoring data, if n = indexes, the index of the list will not be restored, but the only primary key corresponding to unconditionally resume Index, which is to ensure data integrity.
Character set conversion for single-byte character sets (such as US7ASCII), the recovery time, the database automatically switch character set for the session (NLS_LANG parameters); for multi-byte character sets (such as ZHS16CGB231280), restore, as far as possible, should be the same character set (avoid conversion), if conversion, the characters in the target database output database is a superset of the character set.
Recovery of operational databases using Table recovery programme. IMP used in the restoration, in the first SYS
Users running CATEXP.SQL document (if the document has been in operation before, do not implement this script), and then the following order:
IMP ICDMAIN / ICD FILE = = LOG file name LOG file name ROWS = Y
COMMIT = Y BUFFER = Y IGNORE = Y TABLES = table Note: To restore the table reference to backup the table. Recovery is in the original table on the basis of cumulative data. No special that allowed the resumption of the implementation of client orders
Posted on 2007-07-03 18:09 brock Reading (36) Comments (0) edit collections cited
Work sleep, you impunity to India - India witnessed Chinese engineers Record
A lot of business trips, with my foreign service colleagues and the company's joint-venture partners in China together with partners to five days in India, the Indian left deep deep impression. In a fair, and not hurt the feelings of the third world brothers and said: I unaccustomed India. Not with the brain, the words blurted out: India too his mother times. Originally Pashang class fraternal feelings, do not want to write to the pain of friends and enemies. Later my friends have wanted to hear that times really after is too cumbersome, the fees simply write about things that save the future.
For the sake of justice, and never mentioned any guarantee Modified literature and seen what say anything, so as not to be unfair to blame, but because the limited perspective on the inevitable result of the sweeping. In passing sentence, plus the way, the only thing I know is that I be the person to own one of the goals. Huchui because love the atmosphere, the conclusion of chaos, the people behind that is the length of my weaknesses, I would like to overcome this problem.
Sunday arrangements to travel to India will not ring true. I wonder is it because they had fought with the relationship, China has no one direct flight to India, only follow Malaysia, Singapore and other countries to. A trip to take more than 12 hours.
In Kuala Lumpur Airport began to have many Indians, covered Suanchou (Hanwei originally thought, but knows other reasons, and behind Negotiations). No votes for the concept of the queue, I stand a meter, each to all Indians to a standing directly in front of me, or are run directly from the people around votes. But this is not unusual, my compatriots do not have such at the quality of the vast majority of the population, Our were used.
3:00 middle of the night, the plane, came to the hall, hundreds of people line clearance from the two teams, probably because of the time late, only two counters the staff, but had only three counters. Team after another long curved, acid smell Pubi. Bats fly overhead, not everyone in the storm. Accompanied by a foreigner凑近I quietly said: I have already started miss China.
India went to the front of a foreign colleague told me to do ideological and preparations, the airport will Matelashi unlike any I have seen in an airport, the plane fell almost directly on the street, and then the outside is more than 1000-Heilian Dangling. I do倒没so terrible, at least with Heilian We must not do as a negative factor, it is the concept of the Western developed countries, we are all brothers Let's just.
To the hotel window to see the road, do not see, a few days later is the fact that even during the day also do not see any, because there is nothing on. Many cattle sleep in the street, I think we all know that cattle in India is God, and not killing. There are many wild dogs, eyes red, as is crazy, very scary.
I went to the Chennai, according to Chinese音译not pleasant to the ear. Madras-called original Matelashi, India's fourth largest metropolitan area, not far from the sea. We live in a city that the two most expensive hotel one night hundred US dollars, plus 40 dollars for what in tax. After a few days of experience here that is full of foreigners in the Beizai. Indians see foreigners, slaughtered up is no psychological burden, sending your rich than we do. For example, this 140 a few dollars overnight, in China, said that booking What is the money all count, 100 dollars, to the hotel here is that the whole meaning of what is not counted tax, state tax is collected. It is very cunning.
Hotel rooms are inverted India antique flavor, with a lot of marble and thick carpet. But the silver Liangliang fastening opened the faucet, water is light yellow, a little sand. Afternoon of the second day of rain, night is dark yellow water. Bedside bottled water can be used. Listen to persuade colleagues, I also brush their teeth with bottled water. The basic principle is that no water imports, because India, or at least in this city, not on the water system.
Out car early Monday, a one hour to the company's factories, hotels 5:00 after work, the next few days so basic itinerary.
A lobby, the hotel courtyard the whole car is broken, the British style of the 1930s ended a round of the cars from India's largest automobile company made (of course, hidden behind the company is state-owned). My British colleagues are pleased to see these vehicles that reminded him of his childhood.
Walk in the street to see the streetscape that terrible, and construction of urban infrastructure facilities, such as roads, a water and waste emissions, and so on the whole, as the British left the background, it seems that since the British left on their own after what have not done it. Small town, few blocks, a small county with China almost scale, cottage few more buildings, buildings of no more than five layers. What are the top cottage, a private grass roof. Building cement Yueyue reactor. Road is only a few small cement or asphalt, to leave the main road on all the dirt roads. Only the whole wall shoulder high above painting over the campaign slogans and candidates head. Montreal sewage waste. On the whole people. In the station, Moshi, who has been able to point to the middle road. Basically national costumes. One-third are not shoes, and the remaining two-third of the 90 percent of people wear the folder big toe slippers.
Roadside tree, the days still blue, pollution than China's large cities are small. But on the exhaust smell was terrible weight, their cars are all very poor quality. Basically had no car imports, the China-made cars and their place, with them than Xiali cars are a luxury. Not many cars, but all cars are totally disregarded traffic order, and all the cars are dispersed indiscriminately opened on the road, regardless of line, regardless around to the time when drilling. When will the two vehicles is generally off until the final seconds, only to let out their situation is even worse in the city. Continuous cottage, nearly half of the grass roof. Roadside about every five meters is a pile of garbage, one hour drive, has been on both sides of garbage. People walked in the garbage, urinating on the men to turn around, Beichao Highway situ solution, the women urinating also to turn around, facing Highway, squat solution, and some little walk two steps, squatting to the wall again.
Education for All is not possible the relationship between the Indians looked as if no health concepts. For example, there is a beach on rainwater, the general people will be around to, the people here have passed on directly hit, whether it walked barefoot or wear sandals.
The road from time to time by cattle, sheep there, there are dogs. Raozhaozou to cars. Have said, all vehicles off Chengde stayed on to see who lived and who will occupy the lane. Also, there have been crossing the road, and motorized with people crossing the road, animals crossing the road, without crossing, which had what was.
On the outskirts, more large trucks, cars and all - is-chip control of the pitch speakers, special sound. Think it out, all ears are constantly 5353531,612316,612316 treble, as is a vehicle Feishi and that a round Shui Po in front of you, you will be more than other brakes. Then not far in front of you suddenly left to a round of Xie Fei, shown in front of an oncoming truck. Jesus crucified! With a severe car foreigners. In the final seconds, the driver of our car is a round, the big trucks ceded to the rear of the car. Tense, more than cold sweat.
We mention of the driver. Laoge morning to us, and we look to wear shirts, a tie, the Kucha and walked barefoot plate. See we all stare at him, a bit embarrassed, drilling Enter got caught up in the folder double toe slippers. He did not know when the car is not wearing shoes, he can not sit in front of us.
According to our standards of the construction companies, the global consensus that the plant, as with the outside contrast to the paradise is the same. Drink plenty of water rushed into our factories have their own system of pure water pure water stations. But in this global standards for the factory, the Indians still doggedly maintaining their national habits. For example, clothing. Office of the President still dressed in the national costumes of saris, wrapped in a pillow-like to sit in front of the computer, I could not help but want to see the smiling, feeling really good antiques. Apart from the workshop must dress according to safety standards, factory, health, staff canteens and other places all ethnic costumes. Men going dirty linen wrapped with the same rag, and was kneeling on the ground weeding; women wearing saris sit on the ground Xiancai.
Soon time to eat, talk about India's rice below. Once one enters the canteen, SERIES an acid smell. I heard that they came to India before eating vegetables, and basic non-meat, thought they were rumors, even though it is not meat. There are two lunch curry vegetables, two soups, a lot of rice, two parabolic cake, as well as sour cream and pickles. The smell of acid smell, the meal came, full of suspicion and January 1 to taste. Two vegetable curries, curry, as a thick porridge, cooked vegetables all been broken, eating up Suanchousuanchou; two-Xixi, and taste like water, a foul smell salty; yoghurt also OK, but must take a lot of sugar, it is too acid; pie throwing good, like a biscuit. In fact a foreigner who simply do not eat these meals, eating cake and survived only two. I was thinking we are all third world brothers, is a stranger, in addition to their ability to exercise, eat Zhuangzhaodanzi start up. 没åƒtwo, see the Indians are right-handed catch Bacai and rice soup, Banhaonieqi eat with their hands. Feel quite disgusting. I know I am not the idea, I really feel very physical nausea. Members of the Chinese counterparts, Mamaleilei, pay to eat on the counter. And two days before know, the original Indians on the kind of acid stench is eaten curry dishes to eat out. I eat a Santian, sultry weather in India, Khan has become the acid stench. With my colleagues put it, two weeks after he returned to the United States, take a bath, can see themselves heard taste of India. Vegetable dared how to eat, eat a lot of Anfan, 15:00 on the hungry. Yuanbude India brothers then everyone eat a lot of rice, it no meat at the top do not ah.
Work to the hotel, a highway has been a terror. To the hotel at night will also eat Western food. After the Liuliu want to go out and dared not go out the door. I am not very kind to those who care less about their own, from the tourism, travel abroad, where Luanzuan are everywhere, but in this city I really feel I have to go out at night dangerous, and do not see any outside I go out to be risky things. I have looked carefully at the road back to find no English bookstore, no bars and other entertainment, and the characteristics of the market not only to meet basic survival needs of the people some small shop. Nothing to stroll the streets, the streets are open and so terrible of the car, it calculations.
Back to the hotel to turn on the TV, there are 40 Taiwan 27, eight and is that kind of a man and a woman singing and dancing things, sounds for all the same, are almost even longer, men peeling stay mustache, great woman fat, the eyes of the great lumbar, the preferred medium for flirting, Enenaiai. And boring to, but to sleep.
Tuesday morning at work, read it again streetscape again, or did not find any interest in things. No KFC, McDonald's or any other foreign fast food. Asked my colleagues to foreigners, they only said that in India they eat Western food in the hotel, having done the Indians claiming to be a hamburger things not to eat, even if they are thought to taste Indian dishes, but also do not have the courage in the street eating Indian restaurant cooking water out things, no matter how high-end restaurants.
In addition to finding restaurants, in particular to find a computer-related and shops or advertising, because the media is always blowing India's software industry how to cattle, how many software engineers. The result is not seen in the streets of any of the things, things that shops, advertising, logos, etc., are not. I do not believe that this lack of basic computer to a number of local computer experts. I think it is not because India by the British colonial time, the Western culture it more recognition, and computer-related contacts with it more drive. For example, my company is a service of the United States, to China's national conditions do not yet know, it should be a market survey made in China, because they do not believe that China has qualified market research company, please cooperation more a European survey company . Europe, of course, no survey of capacity in China, one of China thought that China, it is just Asia. Asia, it is India where ah. Put families subcontract to an Indian company. I would like to Indian companies, China, it is Hong Kong ah. Put families subcontract to a Hong Kong company. Hong Kong people are aware of China's, a strip families subcontract to the mainland a famous market research company. So I went to observe, to see the pile Duoqiduoba people. We earn money, the family is a Chinese dry. The final report is submitted by the Europeans, which is made by the Chinese people. Cite examples of this point is that I do not believe that India did not universal education, the lower strength, the weak foundation of the computer to a number of local computer professionals. They just because of the colonial time, they all know that the West, and only they can speak English to the world the impression left so: The Indian computer industry developed, and more computer professionals. They will only show it. At the same time, do not show, which is China's fatal shortcomings. As the above example for the people of Hong Kong is a long time because of the colonial West than understanding them, their English to be universal, will show more, so good dealing with the West.
Back to look at the subject of streetscape, no fast food, no computer-related, no department stores or supermarkets, no bars, dance halls, amusement parks and other places of entertainment, it seems that the evening had to stay in a hotel. But there are many on the temple, Hindu, and not, quite broken, the ceramic statues, as if all grown up as a nose, as I do not wish to fill the four arms of the god Shiva and other N only what God arm. Not enter the temple, while the camera.
Today is the third time the wear shirt and tie to wear shorts playing barefoot Laoge bring us the road, still afraid of not. Factory work in India, the British colleagues told us last year, the company sent a group of Indian managers in the training of engineers to the British way with the international driver's license, they found no lane this concept, the road easily shaken. No wonder, they did not have this kind of education. Examination results of the reviews are half of the people were not suitable for driving this road, these people may be in India are driving every day!
Lunch time again, into a canteen, Wendaona than people who redouble their strong smell of acid smell, China scolded the staff was not a while exports. Today, they decided not to Qicai, eat their own with the pickles. I came an unpleasant task of the whole, just the ability to exercise. Listen to the Indians say, because eating vegetables is because too many denominations, Islam, Catholicism, Hinduism, Hinduism itself has dozens of factions, each faction ban is not the same things to eat. Therefore, in a factory to do the things everyone can eat only the vegetables. But Western colleagues say, they rarely eat meat at home is the. Not understanding, do not conclusions.
South Korean restaurant to the evening. India has a modern car factory, the South Koreans themselves makes a restaurant, delicious flavor is. From the hotel to restaurant when the car in Korea found interesting point is that Indians are not shaking his head nodding counting. I said: I have to Car Rental evening. Indians Yaozhaotou mind on this. I thought he did not understand, said: It is out this evening Car Rental. He also shook his head. I said: 6:00 bell. Still abhorrent and shook his head. I asked: You can understand? He Yaozhaotou: Of course. This I feel out their habits and we are not the same.
After dinner call to China, because the bureau's attempts failed to strike people. Here reach China 7 US dollars per minute, and when-when unreasonable. The bath water because of rain into Shenhuangse, dared washing, uncomfortable. Only sleeping.
Three weeks today, business as usual. Teether Renzhao, waiting to go back to China. Chinese counterparts, old comrades serving in the military had fought in Qiongshan ravine factories and has also Yaozhaotou said: I ah is tolerance of the very strong, it can not adapt to Zhentama local ghosts. I ventured beyond his disobedient He called on India to open offices. Indeed, the place dirty, okay, but not in the dirty places not spent; uncivilized people, Guaimei, okay, this is not the right Africa; poor, not the play, then Renzhao, in the past few days anyway ; but no telephone (strike), not the Internet, people feel like buried up. And this places no water to drink, no water, no things to eat, this is as a Chinese person of the most intolerable. In the evening the one tons of rice to eat more of this place makes me all the more obnoxious. This is the Chinese colleagues found that the hotel had a Chinese restaurant, but even still a Sichuan restaurant, happily invited us to go. 6:00 to found in the restaurant before opening 7:30 (India many restaurants that is the case, I do not know is not the same religion). Haorongyi until 7:30, to enter, it smelt a curry flavor, the waiter immediately told: wash all the dishes clean, doing things not allowed to release curry, absolutely not allowed to release. Yaozhaotou agreed waiter (Man shook his head said it was always feel very uncomfortable). Waiter then asked: China is to cook? Answer: Malaysians. Ask: will be Chinese? Answer: only English. All of a sudden heart cooler half of the issue. Recipes used are all in English, wrote: China Chaorou, Sichuan Chaoji, Sichuan fish, vegetables, etc. China, on the table could not help but say: It is estimated that the back lunch gan. (Gan Reading Tones, Beijing, the sense that the finished) with only four points of the dish.
Vegetables, such as waiter brought some beer to taste, all India domestic, not international famous brands. Open a drink, a can not import. Think also, as water can be good wine there. To a dish, really finished. China meat is cooked after the necessary fuel oil, and soy sauce to Gouqian, what other ingredients none of Sichuan chicken is cooked after the necessary fuel oil, and soy sauce to Gouqian, what other ingredients none of Sichuan is a fish fish, cooked the necessary fuel oil, and soy sauce to Gouqian, what other ingredients none; China is the most detestable vegetables, cooked onion is a necessary fuel oil, and soy sauce to Gouqian, what other ingredients not all . When the onion vegetables into China. All Zhudeixilan all vegetables, in order to facilitate the hand-yard. His mother on the poor and curry. I was Ma Zhe, to pay to eat.
Eating two hearts depressed, waiter, rice, just quickly finished. See a waiter who had been placed in front of a market son, started with a bowl of rice to the plate-sheng - also eat yard! I yelled一声stop, the same he said, give each carrying a bowl. I housing - bowl, round, the kind of small. You can not control what we use. Of this market took back. Although the final waiter dishes do not understand why not to use food bowl, but it took us. China's colleagues had developed in one breath: the same small ah, thank you, or else must take a meal tray. After all the feed did not, so I called the waiter, told him that he can use these vegetables as anything, is that it is not called their Chinese dishes. These are all rubbish. With him I said: I now call upon you that the Malay Chinese cooks fried eggs for us to eat. Just fried, not Western-style approach, what single fried, double-fried, Danbing, not the whole, just as with fried. Well, he politely to Yaozhaotou: You have to double - or single-sided fried fried?
Thursday, the final day, with a British colleague just chat about, know that India's customs favors. Even today, India retained the caste system, Brahman, Kshatriya, the Sudras, for the bark, bark homes that is untouchable, that is untouchable. Dalits are not named, and their name is a string of alphanumeric look terrible, and also in front of their father's name with the first letter, to presentation of his family. Scheduled letter of the Catholic Church some of the up-and-coming Martin, Jeffrey, such as the name of the original name as a surname. So, from the name can be seen on Indian descent. At present there are over 90 per cent of India's parents arranged marriages, and more than 90 percent of the people find this good. They generally boys to their parents son advertising, presentation. The woman's parents read newspapers to find son-in-law, and that appropriate left her daughter sent a letter of the past. Letter from the parents of boys from three months to pick his son, the son could pick one of them, can all pick for each other. After the woman's relatives met with the girls talk, the right can be set after a general Qin Shi. And China does not like is that the Indian woman prepared by the bride price. Sometimes the woman to marry the past, because the family can not pay the bride price changes, sometimes killing the man. My colleagues in India two years, from the 6th to read such killing cases. Although the killing is a crime, but is generally good planning, the man's relatives from what hands, and public opinion is not condemned, it is generally not very heavy penalties.
Chat with the Indian staff, they know that in China and India, we know that as a small, but they love to see the Chinese martial arts, like Jackie Chan. They told me that not only women in the forehead point moles, regardless of Hindu men and women of all elements, from the point of logo can be seen of his / her faction. I have seen some people of the logo looks quite brutal.
India also did not talk about the woman, people have the impression that Indian women are beautiful, last year's Miss World is not just India. But at least I do not think so, I was walking Dongzhangxiwang love the people, where a few days, never to see what attractive beauties. Probably because of the poor relations, the relationship between religion, it limits the people dressed up, I am not quite sure. Indian Miss World, which is packing up, how hypocritical artificial! Foreigner could not Chumingtang, Let can understand.
My colleagues with India Purchasing Department procurement colleagues from the Department visited the factory, on the Indian colleagues to call on him to find a restaurant to eat. Think India's water, said he had committed a stomach illness to avoid a catastrophe.
Finally leave at night, on a Malaysia Airlines aircraft, air hostess to see ethnic Chinese white skin, sweet smile, they are less skilled but pure pronunciation of the Chinese, then they take over a cup of Coca-Cola, feeling as a paradise on entirely different.