What's wrong with java.util.Date??

Hi all,
I was just practicing a bit of java.util ,when i was compiling my code-
import java.util.Date;
import java.text.SimpleDateFormat;
class DateStamp{
public static void Main(String args[]){
doDate1;
String D;
int D1,D2,D3;
Date dt=new Date();
SimpleDateFormat sdf=new SimpleDateFormat("dd-mm-yyyy");
/*When using method .setDate(x) ,is x an integer or String?can x=2/5/2002 or 2-5-2002?*/
public void doDate1{
dt.setDay(12);
dt.setMonth(12);
dt.setYear(102);
D=dt.getTime();
D.parseInt(D1);D=""
D=sdf.getTime();
D.parseInt(D2);
int D3=D2-D1;
int D3=D3/86400000;/*How do you convert milisec-to-days?*/
D=D3.toString().
System.out.println(D+"days have elapsed since then");
the compiler said this-
File Compiled...
--------------------------- Javac Output ---------------------------
DateStamp.java:7: Invalid expression statement.doDate1;^DateStamp.java:14: Instance variables can't be void: doDate1public void doDate1; ^2 errors
this problem is persistant, and i'm a java newbie ,Does anyone know what's wrong here?
Thanks!
Regards,
aesh83

How do you get System date onto a Date variable?Calendar.getInstance().getTime() returns a java.util.Date for the current time. You can also use System.currentTimeMillis() and turn it into a Date.
Will date.after(Date when) method work when Date
variables are in milisecs?Date.after(Date when) compares two date objects. As the JavaDoc says "Returns:
true if and only if the instant represented by this Date object is strictly later than the instant represented by when" To me that says that milliseconds are taken into account, I.E. comparing dates actually compares the date plus the time portion.
>
What methods-
*Convert a date(dd/mm/yy) to milisec?If you look in the javaDoc you'll see "long getTime() Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object." Calendar also has the getTimeInMillis() method.
*Convert a milisec value to a date(dd/mm/yy)?Calendar.setTimeInMillis(long);
I'm have this little problem.
When using GregorianCalander-
*need to initialize?
*need set today's date?Calendar.getInstance() will return an appropriate Calendar object for the current locale initialized to the current date/time.
*how do you check if a date exceeds 3 weeks?I'm not sure what you mean. There are a couple of roll(...) methods that will allow you to add a unit of time to a date. I.E. you could add three weeks to a date.
To ignore the time portion of a date just set the time to "00:00"
Col

Similar Messages

  • What's wrong with java.util.Date type?

    Hi!
    When I try to persist object having field of type java.util.Date I get the
    following SQL logged by Kodo with subsequent transaction rollback:
    2002-11-14 15:03:35,099 INFO
    [com.solarmetric.kodo.impl.jdbc.ee.ManagedConnecti
    onFactoryImpl.supportcrm/kodo] INSERT INTO BILLY.TT_COMMENTS(COMMENT_TYPE,
    TEXT,
    CREATED_BY, ID, SUBJECT, CREATE_DATE, TT_MAIN_ID) VALUES (1, '1', 10, 279,
    '1',
    {ts '2002-11-14 15:03:35.059'}, 147)
    When I change "{ts '2002-11-14 15:03:35.059'}" with "TO_DATE('2002-11-14
    15:03', 'YYYY-DD-MM HH24:MI')" in SQL editor
    and execute it everything works fine.
    What does "{ts '..'}" mean? Is it a SQL generation error?
    Thank you in advance.
    Best regards,
    Alexey Maslov

    I've created my own dictionary with dateToSQL() method overridden.
    Now it works fine. But it's a kind of strange. Oracle is used often and my
    JDBC drivers
    are the most recent (at least, from the oracle.com).
    Anyway, thank you again.
    "Alexey Maslov" <[email protected]> wrote in message
    news:[email protected]...
    Patric,
    Thank you for response.
    We're using Oracle 8.1.7 via OCI driver from Oracle 9.2.
    I've already tried 2.4.0 and it works fine there but I've found another
    problem there
    preventing me from using it. See my post in solarmetric.kodo.betanewsgroup.
    >
    "Patrick Linskey" <[email protected]> wrote in message
    news:[email protected]...
    That's odd -- what version of Oracle are you using?
    Moving to Kodo JDO 2.4.0
    (http://www.solarmetric.com/Software/beta/2.4.0) will almost certainly
    get rid of this problem, as we use exclusively prepared statements in
    it, and therefore pass dates etc. to JDBC as parameters.
    But, to get things working with your Oracle database and Kodo JDO 2.3,
    you could create your own extension of OracleDictionary and override the
    dateToSQL() method to generate the appropriate TO_DATE() syntax. See our
    documentation for more details on creating custom database dictionaries.
    -Patrick
    Alexey Maslov wrote:
    I've added TRACE level logging for transactions in JBoss and got
    original
    exception:
    NestedThrowables:
    com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper: [SQL=INSERT
    INTO
    BILLY.T
    T_MAIN(TT_SOLUTION_ID, DELAY_REASON, TT_STATE_ID, ID, CONTACT_PHONE,
    CANCEL_REAS
    ON, OPER_DESCR, TT_TYPE_ID, CREATED_BY, EXP_CLOSE_DATE,SERV_OPEN_DATE,
    OPEN_DAT
    E, FLAGS, TAKEN_BY, TT_CAT_ID, SUBJECT_ID, SUBJECT, SERV_CLOSE_DATE)
    VALUES
    (NUL
    L, NULL, 1, 439, NULL, NULL, '____________ ________________ ________________', 7, 5, {ts
    '2002-11-14 1
    8:38:16.075'}, NULL, {ts '2002-11-14 18:18:16.075'}, 0, NULL, 11,24099,
    '1', NU
    LL)] ORA-00904: invalid column name
    at
    com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwFatal(SQLEx
    ceptions.java:17)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.insert(JDBCSt
    oreManager.java:421)
    at
    com.solarmetric.kodo.runtime.datacache.DataCacheStoreManager.insert(D
    ataCacheStoreManager.java:265)
    at
    com.solarmetric.kodo.runtime.StateManagerImpl.insert(StateManagerImpl
    ..java:1783)
    atcom.solarmetric.kodo.runtime.PNewState.flush(PNewState.java:31)
    at
    com.solarmetric.kodo.runtime.StateManagerImpl.flush(StateManagerImpl.
    java:372)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(Persistence
    ManagerImpl.java:426)
    at
    com.solarmetric.kodo.ee.EEPersistenceManager.beforeCompletion(EEPersi
    But when I try to execute the statement above against the database
    manually
    everything works fine.
    I'm absolutely desperate!
    P.S. On 2.4.0 RC the operation invoking this database insert completes
    fine.
    "Alexey Maslov" wrote in message
    news:[email protected]...
    Hi!
    When I try to persist object having field of type java.util.Date I
    get
    the
    following SQL logged by Kodo with subsequent transaction rollback:
    2002-11-14 15:03:35,099 INFO
    [com.solarmetric.kodo.impl.jdbc.ee.ManagedConnecti
    onFactoryImpl.supportcrm/kodo] INSERT INTOBILLY.TT_COMMENTS(COMMENT_TYPE,
    TEXT,
    CREATED_BY, ID, SUBJECT, CREATE_DATE, TT_MAIN_ID) VALUES (1, '1',
    10,
    >>>
    279,
    '1',
    {ts '2002-11-14 15:03:35.059'}, 147)
    When I change "{ts '2002-11-14 15:03:35.059'}" with
    "TO_DATE('2002-11-14
    15:03', 'YYYY-DD-MM HH24:MI')" in SQL editor
    and execute it everything works fine.
    What does "{ts '..'}" mean? Is it a SQL generation error?
    Thank you in advance.
    Best regards,
    Alexey Maslov
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com
    Best regards,
    Alexey Maslov

  • Getting error by ValueBinding with java.util.Date

    Hi.
    1. my english is not so good.
    I develop a JSF-application to learn more about JSF-technologie.
    I use Eclipse 3.2
    Plugins: Web Tools Platform (WTP), Web Standard Tools, Java Server Faces // Version 1.5.0
    JRE: 1.5
    java-impl.jar and java-api.jar (sun)
    Look at this JSP-File Code
    <h:inputText id="dbirth" value="#{dataBean.dbrith}"> </h:inputText>
    this produce an error: EL expression does not evaluate to expected types for this attribute
    dataBean is a ManagedBeain. So if I use any athor variable from this Bean like:
    <h:inputText id="sname" value="#{dataBean.sname}"> </h:inputText>
    is going well. But if I use any java.util.Date variable it produce the error.
    I tried with other Bean and the error is still there.
    I can compile and use this JSP, but this error is there.
    Have any one an idea what is happen there??
    I looked at Eclipse forums, but I didnt found description for an error like this..
    thanks for any help...
    naba
    Message was edited by:
    NamboTango

    The problem is because you have bound the inputText to a java.util.Date object, instead of a String. You must use Strings with inputText. However, JSF has provided a way for you to convert objects into a String. It just needs to know how to do that. Luckily for you, there is a converter already available to convert a Date object into a String. Converters will also take input Strings and convert them into an object.
    So, in your case, use the convertDateTime tag. Like this:
    <h:inputText id="dbirth" value=#{dataBean.dbrith}">
         <f:convertDateTime type="date" pattern="MMM dd, yyyy" />
    </h:outputText>Try it. You may change the pattern to whichever valid one you like.
    CowKing

  • What's wrong with my mobile data network?

    I've had this 2nd hand iPhone 4 for almost 2 months and everything has been working perfectly until today. I was using viber and sending messages to my friends and it suddenly stopped working and i have no idea why, i thought i just lost my 3G for a while so i waited a few hours for it to come back up, this started around 3pm and it's 12am right now and it's still not working... Everything else worked such as skype, twitter and the internet but for some reason i couldnt send and receive messages on viber and imessage. I also didn't get any notifications from ANYTHING during the whole time until i connected to my wi-fi at home which i then got flooded with messages, tweets and etc.
    I think that theres something wrong with my mobile data network and i dont really know what it is since everything was working fine this afternoon and it just suddenly stopped? Connecting to Wi-fi makes everything work fine and i actually receive notifications and am able to send and receive messages to my friends on viber and imessage.
    Can anyone help me?
    My carrier is CSL and it has unlimited data if anyone n

    I havent contacted my carrier and i really dont think they will be able to help since i go to them every month to pay my phone bill and they can barely speak english...
    I've turned my phone on and off 3 times and ive also reseted my network settings

  • What's wrong with Java readline()?

    I just updated to OS X 10.6.8 and installed the Java update 1.6.0_26-b03-384.
    It appears that BufferedReader.readLine() is broken for reading input lines from the console.  readLine() does not terminate with a newline.
    This is pretty basic.  What's up?
    import java.io.*;
              This class demonstrates how to read a line of text from the keyboard
    class ReadLine{
              public static void main(String[] args) throws IOException{
                        String CurLine = ""; // Line read from standard in
                        System.out.println("Enter a line of text (type 'quit' to exit): ");
                        InputStreamReader converter = new InputStreamReader(System.in);
                        BufferedReader in = new BufferedReader(converter);
                        while (!(CurLine.equals("quit"))){
                                  CurLine = in.readLine();
                                  if (!(CurLine.equals("quit"))){
                                            System.out.println("You typed: " + CurLine);

    As it turns out, there's nothing wrong with ReadLine(), the problem was Ant 1.8.2.
    http://issues.apache.org/bugzilla/show_bug.cgi?id=50960
    The Apache distribution is dated late 2010.  The Apple version of 1.8.2 states that it was compiled on June 3, 2011, but if Apple built from the distribution and not from the corrected svn trunk that would explain it.
    My work-around was to install and link ant 1.8.1.

  • What Is Wrong With Java? STILL NOT ANSWERED, PLEASE ANSWER!

    So today (10 PM January 20th), the Firefox Plugin Checker said that my Java version was outdated. I also got a pop-up saying that my current version of Java at the time (Java 7 update 10) had vulnerabilities. So to try and fix this, I went to the Java page and downloaded the update (Java 7 update 11).
    To check and see if my update was working, I went to Java's check page, as well as another page I use. And here I discovered a problem. I got a notification that an old version of Java had been detected, and another prompt to download the current version (which I had already done). So I erased all versions of Java from my control panel, and tried to check it again. And when I did, I got this: http://oi50.tinypic.com/35b6xx2.jpg and http://oi47.tinypic.com/15fg37p.jpg.
    As you can see, both pages tell me that I need to install a missing plugin of some sort. So, thinking this would resolve the issue, I clicked the Install Missing Plugin button. This is what it told me was missing: http://oi45.tinypic.com/302uwbl.jpg. So I clicked next to install it.... and got this: http://oi45.tinypic.com/2cici0x.jpg, which I assume means that the plugin did not install. So I pressed Manual Install... and was lead/linked right back to the Java download page (where it all began, and what doesn't seem to be working in the first place)
    I go to check my plugins again (Just to make sure and also for extra information), and it appears to say that my Java version is current (is that what "Java Deployment Toolkit 7.0.110.21" is? I don't know, I am not good at technology at all. Either way, here is what it looks like: http://oi48.tinypic.com/4kxzz4.jpg). So...if it is current, why is it not working (i.e. I am unable to play games, DO MY COLLEGE CLASSWORK, or play Java-based games)?
    If it helps anything, here is what my control panel looks like in regards to Java right now: http://oi45.tinypic.com/2qlxu9t.jpg Am I missing anything that would make Java work?
    And before anyone says that Java is not essential: It may be that way to you, but I need Java to do classwork for college. Veterinary college.
    So, in short, what is going on with Java, and how can I fix it?
    EDITEDITEDIT: I Have found that I can do my classwork without Java.
    HOWEVER, this DOES NOT mean that the problem is solved or over with. I STILL WANT TO KNOW HOW TO FIX THIS PROBLEM AND GET JAVA TO WORK. Even if I never actually need it, I would still like to have a (working!!!) Java version because of two reasons: 1) I would rather have such a program and not need it, than need such a program and not have it, and 2) aesthetics. Sorry to say, but I am very particular about how things look when it comes to my belongings, and the fact that Java is messing up is making me actually stressed. In short, I still want the above issue solved, even if it's just purely for the sake of Peace Of Mind.

    STILL HAVE NOT GOTTEN A REPLY. PLEASE ANSWER ASAP, AS THIS IS STILL IMPORTANT TO ME. COME ON NOW, I KNOW THAT THERE ARE PEOPLE ONLINE AND ANSWERING QUESTIONS!!

  • What the HELL with java.util.Scanner

    Hello people...
    Somebody have a pointer that teaches how to work with Scanner, or everybody fells like me, as this API just don't work well!!!?
    At this right moment I have the same JAR file, run something at linux and work well, but when at windows got an exception...

    http://java.sun.com/developer/JDCTechTips/2004/tt1201.html
    http://java.sun.com/docs/books/tutorial/essential/io/scanning.html
    ~Tim

  • What's wrong with the new Date()?

    why can't i use as bleow?
    thanks
    System.out.println(new Date());

    Severity and Description     Path     Resource     Location     Creation Time     Id
    Date cannot be resolved to a type     TestClassDate     PrintDate.java     line 5     1156165071640     150

  • How to use  JtextFild with java.util.Date;

    hi
    My problem is that i have a date data type field inaccess in table.
    Otherside i use JTextField.
    First when this window show i initialize this field with current date.
    The code for this is
    lbdate = new JLabel("User Date",JLabel.RIGHT);
              lbdate.setBorder(new EtchedBorder());     
              txtdate = new JTextField();
              txtdate.setBorder(BorderFactory.createLineBorder(Color.red));
              //month convert into string
              int m = cal.get(Calendar.MONTH);
              m++;
              String mon = Integer.toString(m);
              //day convert into string
              int d = cal.get(Calendar.DATE);
              String date = Integer.toString(d);
              //year convert into string
              int y = cal.get(Calendar.YEAR);
              String year = Integer.toString(y);
              txtdate.setText(mon+" / "+date+" / "+year);
    i am not satisfied by this. How can initialize the JtextField by some other method.
    The secound part of question is that how to reterive the date data type of field and see in the textfield.I see butt it returns like this year/month/date(this date is coming from database which already input) 00:00:00
    How can i discard 00:00:00(this time)
    I code for this is
    Date date = rs.Date();
    txtfld.setText(date); //Here error is occured of TypeCasting
    and tell me that how date type object can convert into String for set the text of field
    because JTextField only accept the String data.
    (if u illestrate with code).
    thanks

    Use a JFormattedTextField with a SimpleDateFormat in parameter.
    Denis

  • What's wrong with 8.1.7 export utility

    I was trying to export an Oracle 8.1.6 database by using export
    utility from Oracle 8.1.7 client. But I get a lot of errors.
    When I try to export from Oracle 8.1.6 client everything goes
    smoothly.
    What's wrong with export utility in Oracle 8.1.7 client??
    regards,
    Evan

    It is because for each new version there is more and different
    things that need to be exported so the x+1 exp utility expects
    the new things to be there and fails if they are not.
    The reason I suspect Oracle did this is that most exports are
    done on the server. It is not generaly a good idea to run exp
    across a network for performance reasons (ie you move the entire
    database). As most exports are done on the server the
    comapability is not an issue.most bullet proof solution.

  • Java.util.Date badly serialized to java.sql.Timestamp Coherence 3.5.2

    Hi all,
    I'm running into this odd behaviour.
    I serialize java.util.Date objects to cache and when I read them back from cache, they appear to be java.sql.Timestamp types.
    I've isolated a junit test for that.
    Do you know why Coherence changes the type in the middle?
    Regards
    Harry.
    import java.util.Date;
    import org.junit.Assert;
    import org.junit.Test;
    import com.tangosol.io.Serializer;
    import com.tangosol.io.pof.ConfigurablePofContext;
    import com.tangosol.util.ExternalizableHelper;
    public class DatePofSerialTest {
         @Test
         public void testCobdate() throws Exception {
              Date date=new Date();
              Serializer serial = new ConfigurablePofContext();//"coherence-pof-config.xml");
              Date date2=(Date)ExternalizableHelper.fromBinary(ExternalizableHelper.toBinary(date, serial), serial);
              System.out.println(serial +" -- Date to serailize ["+ date.getClass() + "]");
              System.out.println(serial +" -- Date from deserialize ["+ date2.getClass() + "]");
              Assert.assertEquals(date, date2);/* Of course this passes, as both refer to the same time (long)*/
    {code}
    This gives as output
    {code:title=output |borderStyle=solid}
    log4j:WARN No appenders could be found for logger (Coherence).
    log4j:WARN Please initialize the log4j system properly.
    com.tangosol.io.pof.ConfigurablePofContext {location=coherence-pof-config.xml} -- Date to serailize [class java.util.Date]
    com.tangosol.io.pof.ConfigurablePofContext {location=coherence-pof-config.xml} -- Date from deserialize [class java.sql.Timestamp]
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Harry,
    It looks like the same issue as ...
    PofExtractor with java.util.Date results in ClassCastException
    It was fixed in version 3.5.4.
    Thanks

  • I'm trying to add the system date with a Label. What is wrong with the code

    import java.util.*;
    import javax.swing.*;
    public class CurrentDateApplet extends JApplet
         Calendar currentCalendar = Calendar.getInstance();
         JLabel dateLabel = new JLabel();
         JPanel mainPanel = new JPanel();
         int dayInteger = currentCalendar.get(Calendar.DATE);
         int monthInteger = currentCalendar.get(Calendar.MONTH)+1;
         int yearInteger = currentCalendar.get(Calendar.YEAR);
         public void init()
              mainPanel.add(dateLabel);
              setContentPane(mainPanel);
              dateLabel.append(currentCalendar.get(Calendar.HOUR) + currentCalendar.get
                        (Calendar.MINUTE);
    }

    As for what's wrong with the code, it would be easier if you said: it doesn't show the date (it does this instead), it doesn't compile (I get this message) etc.
    Anyway I'll assume you want to display the time in a label...
    dateLabel.append(currentCalendar.get(Calendar.HOUR) + currentCalendar.get
    (Calendar.MINUTE);This won't compile: the parentheses are mismatched, and there is simply no such thing as append(). So we could trydateLabel.setText("" + currentCalendar.get(Calendar.HOUR) + currentCalendar.get(Calendar.MINUTE));This wroks, but looks pretty nasty and it's not how you are supposed to format dates and times. Here's the unofficial party line, nicked from one of jverd's posts:
    Calculating Java dates: Take the time to learn how to create and use dates
    Formatting a Date Using a Custom Format
    Parsing a Date Using a Custom Format
    From those links you should be able to find those applicable to times like this: http://www.exampledepot.com/egs/java.text/FormatTime.html
    Using this approach you would end up with something like:import java.text.Format;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import javax.swing.JApplet;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    public class CurrentDateApplet extends JApplet
        private Date date;
        private JLabel timeLabel;
        private JPanel mainPanel;
        public void init()
            mainPanel = new JPanel();
            timeLabel = new JLabel();
            mainPanel.add(timeLabel);
            setContentPane(mainPanel);
            date = new Date();
            Format formatter = new SimpleDateFormat("HH:ss a");
            timeLabel.setText(formatter.format(date));
    }

  • What's wrong with my code for comparing date retreived from db and sysdate?

    Hi all,
    I need to retrive date from the DB and compare it to system date.i have posted the code below.i get java.sql.SQL Exception:Io exception:Socket closed.
    What's wrong with the code?please help me.Thanks in advance.
    public boolean date() throws IOException, SQLException {
    Connection con1;
    long millis = System.currentTimeMillis();
    Timestamp timestamp = new java.sql.Timestamp(millis);
    ResultSet rs4 = null;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con = DriverManager.getConnection(
    "jdbc:oracle:thin:@abc:1605:xyz",
    "cdf", "cdf");
    Statement stmt_exp = con.createStatement();
    rs4 = stmt_exp.executeQuery("SELECT DATE FROM TABLE_NAME")
    while (rs4.next()) {
    Timestamp timestamp2 = rs4.getTimestamp("expire_date");
    con1.close();
    catch (Exception e)
    e.printStackTrace();
    finally
    //ResultSet rs4 = null;
    //Timestamp timestamp2;
    Timestamp timestamp2 = rs4.getTimestamp("expire_date");
    if (timestamp2.compareTo(timestamp) < 0)  //sysdate < exp date
    return true;
    } else {
    return false;
    }

    Didn't you understand what BalusC said? You're closing the connection and then trying to use the ResultSet. The ResultSet will be closed when you close the connection so you can't use it anymore.
    You should close the connection last thing in your code, probably in a finally. And after you close your ResultSet and Statement.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    ----------------------------------------------------------------

  • What is wrong with my Data Guard system?

    What is wrong with my Data Guard system(10g10.2.0 on OEL5.0)? What method should I take to diagnose it and repair it?
    After shutting down last night, my Data Guard does not run normally today.
    On the primary database I issue the following commands:
    DGMGRL> show configuration verbose;
    Configuration
    Name: sdb10g
    Enabled: YES
    Protection Mode: MaxAvailability
    Fast-Start Failover: ENABLED
    Databases:
    sdb10g - Primary database
    stdby10g - Physical standby database
    - Fast-Start Failover target
    Fast-Start Failover
    Threshold: 30 seconds
    Observer: hostp
    Current status for "sdb10g":
    Warning: ORA-16607: one or more databases have failed
    DGMGRL> show fast_start failover;
    show fast_start failover;
    Syntax error before or at "fast_start"
    SQL> startup
    ORACLE instance started.
    Database mounted.
    ORA-16649: database will open after Data Guard broker has evaluated Fast-Start
    Failover status
    On the physical standby database I issue the commands:
    SQL> startup mount
    ORACLE instance started.
    Database mounted.
    SQL> recover managed standby database disconnect;
    Media recovery complete.
    DGMGRL> show configuration verbose;
    Configuration
    Name: sdb10g
    Enabled: YES
    Protection Mode: MaxAvailability
    Fast-Start Failover: ENABLED
    Databases:
    sdb10g - Primary database
    stdby10g - Physical standby database
    - Fast-Start Failover target
    Fast-Start Failover
    Threshold: 30 seconds
    Observer: hostp
    Current status for "sdb10g":
    Warning: ORA-16607: one or more databases have failed
    DGMGRL> disable fast_start failover;
    Error: ORA-01034: ORACLE not available
    Failed.
    Message was edited by:
    frank.qian
    null
    null

    The primary database cannot be opened and the fast_start failover cannot be discabled:
    SQL> SQL> ALTER DATABASE open
    ERROR at line 1:
    ORA-16649: database will open after Data Guard broker has evaluated Fast-Start
    Failover status
    DGMGRL> disable fast_start failover;
    Error: ORA-01034: ORACLE not available

  • My iphone consumed  10GB data this what's wrong with my VPN kindly guide suitably moreover battery drain fast

    My iphone 5s consumed  10GB data this what's wrong with my VPN kindly guide suitably moreover battery drain fast

    The long backups seem to be related to the size of the apps you installed, not the number. That's why some people with multiple pages of apps experience fast backups. There does seem to be a bug with the current firmware that can cause a crash when doing app uploads and syncs. This bug seems to be exacerbated by having large and many apps.
    I was experiencing frequent crashes, but have no more - even with 70 apps installed - some of them large like the American Heritage Dictionary which is several hundred megabytes. I did the following:
    1. I set iTunes to NOT do autosyncs every time I plug in. This setting is in the Itunes preferences.
    2. I disabled the autobackups in iTunes for the iphone. I figured that if it did crash and it was going to take 2 hours to restore, why not just reload. The instructions are readily found using google search; it involves a command line setting. Anyway, the phone doesn't crash anymore since doing this.
    3. I no longer install apps using the iPhone. I first install the app in iTunes and the I manually sync it to the iphone. I avoid doing multiple installs at once; at least for the large apps. Right click on each app and get its info from within itunes. If it is large, it is going to take time to backup.
    4. I always first shut off the iphone and restart it before installing any apps in itunes. This clears any memory issues left behind from use.
    I am going to continue to do these procedures until Apple releases a fix for the bugs relating to the apps.
    As noted, since I took these steps, I have had no crashes. I was crashing at least once every 1-2 days before with the same or less number of apps. I too was a first gen iPhone user and was very frustrated with the 3G experience. Since doing the above, I am once again a very happy and productive iPhone 3G user. I know its a pain to do this, but the bugs will get fixed at some point. I would never go back to my old phones - they were just phones.

Maybe you are looking for

  • My window manager only starts 50% of the time.

    Hello all, I installed arch about a week ago and it has run perfectly. Unfortunately about 2 days ago I have a strange issue that I can't seem to diagnose. When I boot my arch install, (dual boot win8 with seperate hard drive), and login using slim,

  • How to load swf files within another SWF and still maintain actionscript

    Hi I was wondering how to embed an swf file inside another swf file, If i simply import it to the stage or the library it will become a symbol but the actionscript interactivity is lost, another question is can I have an actionscript 2 file play with

  • Can't text web URL

    I'm on at&t network. Any time I put a web address in a text message and send it, my phone shows it sent, but the other person never receives it. I've tested it with two people who are using Iphones. One is on Verizon, the other is on straight talk I

  • Pacman - Error: Ipod possibly full?

    I keep getting an error when trying to open the pacman game on my ipod classic 80gb. It states that "This is possibly due to a full ipod" except I still have well over 50 GB free. I believe its due to the alarm but Im not sure. I set my alarm for the

  • I am having trouble activating my photoshop after having my computer cleaned up.

    I am having trouble activating my photoshop.