SSDT tries to alter timestamp column in TFS build

We're trying to perform an upgrade test against a copy (backup/restore) of our customer database as target. There are some tables with  timestamp column in the database. The way we do this is by having a database project with a publish profile targeting
that copy of customer database and then with TFS build server is used to build the database but only to generate a publish script (/p:UpdateDatabase=False) set in the build definition - msbuild argument.
Example of table definition:
CREATE TABLE dbo.CodeTable1
(ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY
,Code CHAR(6)
,[Timestamp] TIMESTAMP NULL);
We would like to have the "Code" column to have CHAR(7), so in the project we modify the table definition:
CREATE TABLE dbo.CodeTable1
(ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY
,Code CHAR(7)
,[Timestamp] TIMESTAMP NULL);
Expecting SSDT build will generate alter script:
ALTER TABLE dbo.CodeTable1 ALTER COLUMN Code CHAR(7);
To our surprise the generated script was:
ALTER TABLE dbo.CodeTable1 ALTER COLUMN Code CHAR(7);
ALTER TABLE dbo.CodeTable1 ALTER COLUMN [Timestamp] TIMESTAMP NULL;
Which will cause error when the script is executed: "Cannot alter column 'TIMESTAMP' to be data type timestamp."
Why is SSDT generating the change script for that timestamp column??
We then try a local build in VS, the issue is not happening, SSDT correctly generates alter script only for the "Code" column to CHAR(7);
Both local machine and TFS Build server are having VS 2013 Update 4- SSDT 12.0.50318.0 installed.
As we tried to troubleshoot further, we found out that it seems it only happens on a restored database from a backup copy of our customer database. It doesn't happen for databases created by SSDT build from scratch or that we manually created. We've tried make
sure all database properties are the same as the database that correctly built. But still if the target database is the one we restored from a customer's copy, SSDT always tries to alter timestamp column (on server build).
Anyone have same experience?
I have posted a bug in ms connect: https://connect.microsoft.com/SQLServer/feedback/details/1266051
Thanks!

Thanks Paul!
However, it doesn't happen when I build the database project locally or if the target database was created by SSDT (or manually for that matter). The issue happens when I change the target database to the one we restored from a backup copy of our customer's
database and run the build through our TFS build server.
So I thought there must be something different with the restored database (which causes SSDT to alter timestamp column) as opposed to the one SSDT/manually created (which doesn't alter the timestamp column). Maybe there is difference on database property/settings?
Whatever it is, I just couldn't find it.
The only thing we will do now as workaround is to get db schema creation script from that of customer's database and run that script to re-create the database from scratch and use that as target database instead, as luck would have it, the issue would be
gone.
Still, why the heck SSDT tries to alter timestamp column in that specific case and not in other case as described above??
Elvin

Similar Messages

  • HsqlDB throws exception-- trying to alter the columns from unique- primary

    Hi,
    I am trying to migrate my old DB Schema to a new DB schema and the underlying database is HsqlDB. One of the tables has two of its columns described as UNIQUE in the older schema, whereas they were made PRIMARY in the new schema. I went through the documentation provided by HSQL (http://www.hsqldb.org/doc/guide/ch09.html) and tried to execute the following query to alter the columns:
    stmt.execute("Alter Table user_type_table add primary key (user_type_name,attribute_name)");
    Somehow I get the following exception when I tried to do this:
    java.sql.SQLException: Wrong data type: KEY in statement [Alter Table user_type_table add primary key]
    at org.hsqldb.jdbc.jdbcUtil.sqlException(Unknown Source)
    at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
    at org.hsqldb.jdbc.jdbcStatement.execute(Unknown Source)
    Am i doing something wrong?

    Rich,
    Whichever column(s) you changed to generate the conflicts will be present in the logs anyway. Since, your prebuilt conflict handler is not set up for those columns, you end up with apply errors. You can remove those columns from being part of conflict detection by calling the DBMS_APPLY_ADM.COMPARE_OLD_VALUES procedure. Hope this helps.

  • Alter numeric column to allow NULL

    hi all
      while i am trying to Alter numeric column to allow NULL,i lost my digits after decimal point.How to alter the numeric column without lose the data after decimal.
    Thanks.
    Thanks - SelvaKumarSubramaniam.Please MARK AS ANSWER, if my answer is useful to U.

    While altering the Numeric column, did you change DECIMAL precision and scale too??
    I think you might be altering the scale because, run the below example in ssms.
    CREATE TABLE #TABLE
    Sal NUMERIC(10,5) NOT NULL
    INSERT INTO #TABLE VALUES(5.123), (423.13223), (444.44)
    SELECT * FROM #TABLE
    ALTER TABLE #TABLE
    ALTER COLUMN Sal NUMERIC(10,5)
    SELECT * FROM #TABLE
    DROP TABLE #TABLE
    There is no change in the data.
    Please mark as answered if this has helped you solve the issue.
    Good Luck :) .. visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.

  • Get millisecond values from timestamp column in v$logmnr_contents

    Hello
    How do we get millisecond values from timestamp column in v$logmnr_contents.
    I tried with following query.
    select scn,To_Char(timestamp,'DD-MON-YYYY HH24:MI:SS:FF') from v$logmnr_contents WHERE OPERATION NOT IN('START') and username ='SCOTT' and sql_redo is not null and (seg_owner is null or seg_owner not in('SYS'));
    it says ORA-01821: date format not recognized. I want to find the relation of scn with timestamp. In forums i found, scn is derived from timestamp value. I dont know its correct or not.
    if i query with out FF in time format i get like
    scn timestamp
    808743 27-NOV-2007 00:12:53
    808743 27-NOV-2007 00:12:53
    808743 27-NOV-2007 00:12:53
    808744 27-NOV-2007 00:12:53
    808744 27-NOV-2007 00:12:53
    808744 27-NOV-2007 00:12:53
    if scn is derived from timestamp with milliseconds, each scn should be different right?More help please

    May be there's an easy way solving your problem, I did it like that:
    CREATE TABLE quota_test (test VARCHAR2(50))
    INSERT INTO quota_test
    VALUES ('update "SCOTT"."NEWTAB1" set a="34" and b="45"')
    SELECT test normal, REPLACE(SUBSTR(test,INSTR(test,'"',1),INSTR(test,'.',1)+2),'"','') changed
    FROM quota_test
    Result is :
    NORMAL
    update "SCOTT"."NEWTAB1" set a="34" and b="45"      
    CHANGED
    SCOTT.NEWTAB1
    If you didn't understand, I can explain what I wrote

  • How to create a default value of timestamp column?

    I am trying to create a table with a default value on a timestamp column, can it be done?
    CREATE TABLE myTbl
    FutureDateTime date default TIMESTAMP WITH TIME ZONE '2999-12-31 23:23:59.000'
    )

    user1035690 wrote:
    I am trying to create a table with a default value on a timestamp column, can it be done?
    CREATE TABLE myTbl
    FutureDateTime date default TIMESTAMP WITH TIME ZONE '2999-12-31 23:23:59.000'
    )Yes, but you don't have a timestamp column, you have a date column.
    CREATE TABLE myTbl
       FutureDateTime date default to_date('2999-12-31 23:23:59', 'yyyy-mm-dd hh24:mi:ss')
      4  );
    Table created.
    Elapsed: 00:00:00.09
    ME_XE?And just in case you weren't aware, storing "end of time" information like this will be rough on your queries (it skewes the cost based optimizers estimates for cardinalities and could wildly throw off the estimates for your queries, resulting in bad plans). You're better off to store NULL values, NULL denoting not known values.
    Just an FYI :)

  • Internal error with timestamp columns

    Hi
    i have a table in which there's a TIMESTAMP column whenever i try to create a form on this table i cannot choose the columns in form builder data block wizard.
    Or even when i try to modify a form which was created before the columns were added.
    it generates this error.
    FRM - 10095: Assertion Failed in iewbdbc_oracle_to_id, at C:myade\608\src\ie\iewbdb.c:703
    i dont even have that directory on my machine!!!!
    i tried this with forms9i & forms6i, same thing with both.
    is it impossible to develope forms on a table having a timestamp column??? or is there another way?
    Any help is REALLY apreciated.
    Thanks in Advance
    Regards
    Tony G.

    No the with timestamp types are not supported. Forms does supplort multiple timezones, but uses normal datatime fields mapping to dates in the DB. The Forms server then takes care of mapping the Client Time to the Database time and visa versa.
    See: http://www.oracle.com/technology/products/forms/pdf/9inewfeatures.pdf
    Section 10

  • Data loading: formatting data for timestamp column

    Hi All,
    I have a table with a timestamp column named as created_date. I want to upload data to that table using data loading page. but there is one problem while uploading data, I have a csv file in which the created_date column data in two different format as follows ,
    09/03/2013 03:33am
    09/02/2013 03:24pm
    the above data throws an error ORA-01821: date format not recognized.
    In Data / Table Mapping page, I tried with MM/DD/YYYY HH12:MI:SS AM. What format should i use for am and pm??
    Please help me to solve....
    Thanks in advance
    Lakshmi

    I solved by using the format MM/DD/YYYY HH:MIAM.
    Thanks
    Lakshmi

  • Insert only time on timestamp column

    How can I insert time only in a timestamp column? i tried inserting time only and it's giving me an error.

    Hi,
    All TIMESTAMPs (and DATEs) have year, month, day, hours, minutes and seconds. It's impossible not to have all parts.
    You could use the same year, month and day (January 1, 2001, for example) in every column, but that's probably not the best thing for your needs, whatever they are.
    TIMESTAMPs represent points in time.
    What are you trying to represent? A duration of time? In that case, an INTERVAL data type would be more appropriate, or maybe a NUMBER, or even a VARCHAR2.
    How do you plan to use this column? How will you be manipulating the values (for example, adding 1 hour to a time, or averaging them)?

  • Error 00904 trying to alter table ... ?!

    I'm running a script to create a table, the primary key of that table will then be used in an Alter Table command to make it a foreign key in an already exisiting table. Code:
    CREATE TABLE Category
    CATCODE VARCHAR2(3),
    CatDesc VARCHAR2(11) NOT NULL,
    CONSTRAINT Category_CATCODE_pk PRIMARY KEY(CATCODE)
    INSERT INTO Category(CATCODE, CatDesc) VALUES('BUS','Business');
    INSERT INTO Category(CATCODE, CatDesc) VALUES('CHN','Children');
    INSERT INTO Category(CATCODE, CatDesc) VALUES('COK','Cooking');
    INSERT INTO Category(CATCODE, CatDesc) VALUES('COM','Computer');
    INSERT INTO Category(CATCODE, CatDesc) VALUES('FAL','Family Life');
    INSERT INTO Category(CATCODE, CatDesc) VALUES('FIT','Fitness');
    INSERT INTO Category(CATCODE, CatDesc) VALUES('SEH','Self Help');
    INSERT INTO Category(CATCODE, CatDesc) VALUES('LIT','Literature');
    ALTER TABLE books ADD CONSTRAINT books_Category_fk FOREIGN KEY (CATCODE) REFERENCES Category(CATCODE);
    And the error:
    Error starting at line 20 in command:
    ALTER TABLE books ADD CONSTRAINT books_Category_fk FOREIGN KEY (CATCODE) REFERENCES Category(CATCODE)
    Error report:
    SQL Error: ORA-00904: "CATCODE": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:
    *Action:
    I have no idea what is wrong with my code. I successfully make my table and insert the data, why is it telling me CatCode is an invalid identifier?...
    ( I originally posted it in the wrong section whoops )

    Zombnom wrote:
    There isn't, I'm trying to ADD a column with CatCode being a foreign key in the books table.Well there's your problem. Column and foreign key are two seperate things. You can combine the two operations though:
    ALTER TABLE books ADD catcode CONSTRAINT books_category_fk REFERENCES category(catcode);

  • Doubt in Timestamp column

    Hi,
    In below Query i am trying to retrive the data
    ,which is greater then the 18-DEC-10,
    But its retriving all the datas,why? please help.how to handle this time stamp column?
    desc vcps_misc_ch
    Name Null Type
    ENT_NM NOT NULL VARCHAR2(30)
    ATRBT_NM NOT NULL VARCHAR2(30)
    TXN_TYPE NOT NULL CHAR(1)
    TXN_DT NOT NULL TIMESTAMP(6)
    PREV_VALUE VARCHAR2(4000)
    CURR_VALUE VARCHAR2(4000)
    LAST_UPDT_GMIN VARCHAR2(9)
    LAST_UPDT_NM VARCHAR2(4000)
    REF_ID NOT NULL VARCHAR2(2000)
    SELECT txn_dt,to_char(txn_dt,'dd-mon-yy hh24:mi:ss')
    FROM vcps_misc_ch
    WHERE to_char(txn_dt,'dd-mon-yy hh24:mi:ss') > TO_CHAR(TO_date('18-DEC-10','DD-MON-YY'),'dd-mon-yyyy hh24:mi:ss')
    and rownum<10
    TXN_DT TO_CHAR(TXN_DT,'DD-MON-YYHH24:MI:SS')
    26-FEB-10 01.14.43.055154000 PM 26-feb-10 13:14:43
    25-MAR-10 05.23.35.601172000 PM 25-mar-10 17:23:35
    26-MAY-10 08.12.40.106995000 AM 26-may-10 08:12:40
    27-MAY-10 10.38.32.033523000 AM 27-may-10 10:38:32
    28-MAY-10 11.40.23.313450000 AM 28-may-10 11:40:23
    28-MAY-10 01.09.52.332828000 PM 28-may-10 13:09:52
    18-JUN-10 02.44.37.614339000 PM 18-jun-10 14:44:37
    18-JUN-10 02.46.47.141109000 PM 18-jun-10 14:46:47
    24-JUN-10 10.45.43.814528000 AM 24-jun-10 10:45:43
    9 rows selected

    Hi,
    Always compare TIMESTAMP columns to other TIMESTAMPs.
    To compare a TIMESTAMP column to a value that is being supplied as a string, convert the string to a TIMESTAMP, not the other way around. It's more efficient, and less prone to error.
    For example:
    SELECT      txn_dt
    ,     to_char (txn_dt,'dd-mon-yy hh24:mi:ss')
    FROM      vcps_misc_ch
    WHERE      txn_dt     >= TO_TIMESTAMP ( '18-DEC-2010 14:45:00'
                        , 'DD-MON-YYYY HH24:MI:SS'
    ;or
    SELECT      txn_dt
    ,     to_char (txn_dt,'dd-mon-yy hh24:mi:ss')
    FROM      vcps_misc_ch
    WHERE      txn_dt     >= TO_TIMESTAMP ( p_date
                        , 'DD-MON-YYYY HH24:MI:SS'
    Do not nest conversion functions (such as "TO_CHAR ( TO_TIMESTAMP ...)").  There's almost always a simpler, more efficient way.
    TO_CHAR is appropriate for displaying a date (as in the SELECT clause above).  If you're tempted to use TO_CHAR for any other purpose (in a WHERE clause, for example), ask yourself why.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problem fetching multiple values in a TIMESTAMP column

    Hi all,
    I'm having a problem trying to fetch multiple values in a TIMESTAMP column. I can successfully fetch the TIMESTAMP column if I do the following:
    OCIDateTime tstmpltz = (OCIDateTime )NULL;
    rc = OCIDescriptorAlloc(p_env,(dvoid **)&tstmpltz, OCI_DTYPE_TIMESTAMP,
    0, (dvoid **)0);
    rc = OCIDefineByPos(p_sql, &p_dfn, p_err, 1, &tstmpltz, sizeof(tstmpltz),
    SQLT_TIMESTAMP, 0, 0, 0, OCI_DEFAULT);
    This works fine. I can then do what I want with the OCIDateTime variable tstmpltz, like convert it to a text string, etc.
    But what I am trying to do is fetch many rows of data that could include a TIMESTAMP column. For character columns this is no problem. I simply allocate a buffer of the correct width and length and then do my OCIDefineByPos to point to the start and the character data gets filled in. Same for numeric columns as well.
    I can do this with a TIMESTAMP column if I do the OCIDefineByPos with a column type of SQLT_CHR. But the problem I'm running into when I do things this way is if I fetch a Timestamp value that is before 1950 I believe it is, I get back the wrong century. So for instance 1900 comes back as 2000. I think this is because the default date format when fetching is a 2 digit year. So I've tried to the do following:
    long fetchrows = 50;
    unsigned char *descpp1;
    descpp1 = (unsigned char *)calloc(fetchrows, sizeof (OCIDateTime *));
    int i;
    for (i = 0; i != fetchrows; i++)
    /* Allocate descriptors */
    rc = OCIDescriptorAlloc((void *)p_env,(void **)&descpp1[i * sizeof (OCIDateTime *)], OCI_DTYPE_TIMESTAMP,
    0,(void **)0);
    // Bind the column
    rc = OCIDefineByPos(p_sql, &p_dfn, p_err, 1, descpp1, sizeof(descpp1),
    SQLT_TIMESTAMP, 0, 0, 0, OCI_DEFAULT);
    rc = OCIStmtExecute(p_svc, p_sql, p_err, (ub4) 50, (ub4) 0,
    (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL,
    OCI_DEFAULT);
    And I get an "ORA-01403: no data found" error. I'm missing something here but I can't figure out what it is. Is this proper way to fetch multiple Timestamp columns ?
    Thanks,
    Nick

    Hi Nick,
    I think the "trick" here is that when you call OCIDescriptorAlloc normally you would pass a pointer to an OCIDateTime pointer (i.e. OCIDateTime**). However, you're being sneaky here and using unsigned char * with malloc/calloc for the reasons you have already mentioned. So, that changes things a bit because in this scenario the "destination address" where OCI is going to put the address for the OCIDateTime descriptor is in the memory you have dynamically allocated rather than in the target pointer of an OCIDateTime** declaration. So far so good, but the problem, as you've discovered, comes about when you need to get the OCIDateTime* to pass into the OCIDateTimeToText function. In your call you have this:
    (OCIDateTime *)descpp1[0 * sizeof (OCIDateTime *)]However, that isn't the address of the descriptor it's a pointer to the address so, depending on your actual calls, etc. you'll either get a memory violation or an invalid OCI handle error. What you can do is get the address from that memory location and stuff it into a proper OCIDateTime* and then it can be used in the OCIDateTimeToText function.
    I'm probably doing a terrible job explaining it, but I have cobbled together a sample which does what you want (at least as far as I can tell). Of course, being OCI, there's a fair bit of code, but here's the main parts.
    I created a table called "ts_test" that has the following structure and sample data:
    SQL> desc ts_test
    Name             Null?    Type
    TS_ID                     NUMBER
    TS_VALUE                  TIMESTAMP(3)
    SQL> select * from ts_test order by ts_id;
         TS_ID TS_VALUE
             1 01-JAN-09 08.00.00.123 AM
             2 01-JAN-09 12.34.56.789 PM
             3 01-JAN-09 04.46.00.046 PM
             4 01-JAN-09 10.00.00.314 PM
    4 rows selected.I use the same query as above in the OCI sample code to get the values back out of the table.
      ** will hold pointers to TimeStamp Descriptor memory
      unsigned char *pTSD = (unsigned char *) NULL;
      ** temp pointer used with descriptors
      OCIDateTime *pTemp = NULL;
      ** allocate memory for the ts_id column
      if ((pID_val = (ub4 *) malloc(sizeof(ub4) * arrsize)) == NULL)
        printf("Failed to allocate memory for pID_val!\n");
        return;
      ** allocate memory for the ts descriptors
      if ((pTSD = (unsigned char *) malloc(sizeof(unsigned char *) * arrsize)) == NULL)
        printf("Failed to allocate memory for pTSD!\n");
        return;
      ** allocate date time descriptors
      for (i = 0; i < arrsize; i++)
        rc = OCIDescriptorAlloc(pDBCtx->envhp,
                                (void **) &pTSD[i * sizeof(OCIDateTime *)],
                                (ub4) OCI_DTYPE_TIMESTAMP,
                                (size_t) 0,
                                (void **) 0);
      ** define the first column in the results
      rc = OCIDefineByPos(stmtp,
                          &defnp,
                          pDBCtx->errhp,
                          (ub4) 1,
                          (void *) pID_val,
                          (sword) sizeof(ub4),
                          (ub2) SQLT_INT,
                          (void *) pID_ind,
                          (ub2 *) 0,
                          (ub2 *) 0,
                          (ub4) OCI_DEFAULT);
      ** define the second column in the results
      rc = OCIDefineByPos(stmtp,
                          &defnp,
                          pDBCtx->errhp,
                          (ub4) 2,
                          (void *) &pTSD[0],
                          (sword) sizeof(OCIDateTime *),
                          (ub2) SQLT_TIMESTAMP,
                          (void *) pTS_ind,
                          (ub2 *) 0,
                          (ub2 *) 0,
                          (ub4) OCI_DEFAULT);
      ** execute the statement
      rc = OCIStmtExecute(pDBCtx->svchp,
                          stmtp,
                          pDBCtx->errhp,
                          (ub4) arrsize,
                          (ub4) 0,
                          (CONST OCISnapshot *) NULL,
                          (OCISnapshot *) NULL,
                          (ub4) OCI_DEFAULT);
      ** get the text value of the timestamp
      ** null-terminate it, and display the value.
      ** the address of the allocated descriptor
      ** is copied from the dynamically allocated
      ** memory to the temp variable and that
      ** is passed to OCIDateTimeToText
      for (i = 0; i < arrsize; i++)
        memcpy((void *) &pTemp, &pTSD[i * sizeof(OCIDateTime *)], sizeof(OCIDateTime *));
        rc = OCIDateTimeToText((void *) pDBCtx->usrhp,
                               pDBCtx->errhp,
                               pTemp,
                               (oratext *) 0,
                               (ub1) 0,
                               (ub1) 3,
                               (oratext *) 0,
                               (size_t) 0,
                               &buflen,
                               buf);
        buf[buflen] = '\0';
        printf("Timestamp value[%d]: %s\n", *pID_val++, buf);
    ...Obviously there's lots left out, but hopefully that can be of some help. I've not really thoroughly reviewed the code so there may be a few things to fix. Anyway, using the above table and data the full sample outputs this on my system:
    Timestamp value[1]: 01-JAN-09 08.00.00.123 AM
    Timestamp value[2]: 01-JAN-09 12.34.56.789 PM
    Timestamp value[3]: 01-JAN-09 04.46.00.046 PM
    Timestamp value[4]: 01-JAN-09 10.00.00.314 PM
    ENTER to continue...Thanks,
    Mark

  • Importing timestamp columns appears to use to_date instead of to_timestamp

    I'm trying to import data (using the latest version 1.5.4 with Patch 2 applied) to an Oracle 10g database that contains timestamp columns. The input data has times with fractional (millisecond) values The data was exported using SQL Developer from a Sybase database and the timestamp format in the Excel (xls) file is YYYY-MM-DD HH24:MI:SS.FF3. When I specify this format for the TIMESTAMP columns on the import screens, the importer generates an insert statement like this:
    INSERT INTO A (TMS) VALUES (to_date('2008-12-049 12:12:39.967', 'YYYY-MM-DD HH24:MI:SS.FF3'));
    This command fails to execute with this error:
    Error report:
    SQL Error: ORA-01821: date format not recognized
    01821. 00000 - "date format not recognized"
    *Cause:   
    *Action:
    I found that if to_timestamp is used instead of to_date, there is no issue inserting the row with the correct time precision. The question I have is why isn't SQL Developer using to_timestamp for importing a TIMESTAMP column, and should it?
    Any advise woudl be appreciated.
    Thanks

    In 1.5.4 I see a bug where the "Format" field doesn't show up in the page in the import wizard, preventing the user from entering a mask when the column type is TIMESTAMP. This has been fixed in the code line under development and should be available when 2.1 gets released.
    To give you a bit more detail on the confusing DATE/TIMESTAMP behaviour...
    SQL Developer misrepresenting date as timestamp and vice versa stems from the behaviour of the Oracle JDBC driver. Following are the details I obtained from the JDBC team when I raised a bug("WRONG VALUE RETURNED FOR GETCOLUMNTYPE FOR DATE COLUMN ") on them:-
    oracle.jdbc.mapDateToTimestamp is by default set
    to true to indicate reporting DATE column as TIMESTAMP type. To turn off, pass
    -Doracle.jdbc.mapDateToTimestamp=false" at the command line.
    To effect this option in SQL Developer, you can add an AddVMOption -Doracle.jdbc.mapDateToTimestamp=false
    A bit more history on the option:
    8i and older Oracle databases did not support SQL TIMESTAMP, however Oracle
    DATE contains a time component, which is an extension to the SQL standard. In
    order to correctly handle the time component of Oracle DATE the 8i and
    earlier drivers mapped Oracle DATE to java.sql.Timestamp. This preserved the
    time component.
    Oracle database 9.0.1 included support for SQL TIMESTAMP. In the process of
    implementing support for SQL TIMESTAMP we changed the 9i JDBC driver to map
    Oracle DATE to java.sql.Date. This was an incorrect decision since it
    truncates the time component of Oracle DATE. There was also a backwards
    compatibility problem trying to write java.sql.Timestamps to 8i databases.
    These are separate problems but we "fixed" both under the control of a single
    flag, V8Compatible. This flag was introduced in a 9.2 patch set.
    By default the flag is false. When it is set to false the driver maps Oracle
    DATE to java.sql.Date, losing the time component and it writes
    java.sql.Timestamps to the database as SQL TIMESTAMPS. When the flag is set
    to true the driver maps Oracle DATE to java.sql.Timestamp and writes
    java.sql.Timestamps to the database as Oracle DATEs.
    In 11.1 the V8Compatible flag was deprecated because it controlled Database
    8i compatibility which is no longer supported. The additional behavior it
    controlled, how SQL DATEs are handled, is controlled by a new flag,
    mapDateToTimestamp. In 11.1 setting V8Compatible will just set
    mapDateToTimestamp. This new flag only controls how SQL DATEs are
    represented, nothing more. This flag will be supported for the foreseeable
    future.
    Finally, the default value for V8Compatible is false in 9i and 10g. This
    means that by default the drivers incorrectly map SQL DATEs to java.sql.Date.
    In 11.1 the default value of mapDateToTimestamp is true which means that by
    default the drivers will correctly map SQL DATEs to java.sql.Timestamp
    retaining the time information. Any customer that is currently setting
    V8Compatible = true in order to get the DATE to Timestamp mapping will get
    that behavior by default in 11.1. Any customer that wants the incorrect but
    10g compatible DATE to java.sql.Date mapping can get that by setting
    mapDateToTimestamp = false in 11.1.
    About the only way to see the difference between mapDateToTimestamp settings
    is to call getObject on a DATE column. If mapDateToTimestamp is true, the
    default setting, the result will be a java.sql.Timestamp. If
    mapDateToTimestamp is false, then getObject on a DATE column will return a
    java.sql.Date.
    HTH
    Edited by: vasan_kps on Jun 12, 2009 2:01 PM

  • Timestamp column  when reversed in ODI ,Logical Length increases to 11

    Hi
    I have a Timestamp Column in Oracle Database. When i see in SQL Developer
    I see DataType: Timestamp(6),But when I reverse in ODI the Logical length Increases
    to 11 and this gives an error when I execute my interface.
    Like that I have Many timestamp column in my project and for the Interface to work
    I have to manually decrease the length from 11 to 6,then it works fine.
    Is there any workaround.
    Thanks in Advance.

    Hi,
    Trying to help you. :-)
    Try to use Datatypes options in ODI. Go to Topology mgr->Physical Arch, elapse Oracle and just play around Data types (try to create a datatype for timestamp or else edit the existing one)and give TIMESTAMP(%L).
    May be you can find a solution.
    All the Best.:)

  • Is it possible to alter IDENTITY column?

    Dear collegues,
    I am running SAP HANA 1.00.72.00.388670 in HANA Cloud. I am trying to migrate the data from SQL Server to SAP HANA.
    The IDENTITY value support is enabled. I am trying to import data from csv file to a table.
    The table has such structure:
         CREATE COLUMN TABLE "TEST_IMPORT" ("ID" integer  NOT NULL primary key  generated always as IDENTITY, "VALUE" real NULL);
    The peace of data has such view:
    ID,VALUE
    1,1
    2,2
    3,3
    4,4
    5,5
    6,6
    7,7
    8,8
    When I start an import process it asks me to define the dependences, as it requires to point the columns from my datafile to columns in the table. Certainly I cannot link a "ID" field because it is generated automatically.
    I`ve tried another example.
    Created a table:
         CREATE COLUMN TABLE "TEST_IMPORT" ("ID" integer  NOT NULL primary key, "VALUE" real NULL);
    Imported data from previous example.
    After I tried to alter the table to asign the IDENTITY property. However I`ve got an error:
         "Could not execute 'alter table "TEST_IMPORT" ALTER ("ID" integer NOT NULL primary key generated always as IDENTITY)' in 45 ms 753 µs .
         SAP DBTech JDBC: [7] (at 34): feature not supported: cannot modify column to identity column: ID: line 1 col 35 (at pos 34) "
    How can I make that import?

    Hi there
    IDENTITY columns are supported as of Rev. 74. Check my blog post about them Quick note on IDENTITY column in SAP HANA.
    - Lars

  • I am having serious issues trying to alter my old iCloud account with an old non-functioning email to my new apple id with a new email address. The message keeps coming up on all my apple products with my old email (which is not available anymore).

    I am having serious issues trying to alter my old iCloud account with an old non-functioning email to my new apple id with a new email address. The message keeps coming up on all my apple products with my old email (which is not available anymore).

    I have the same problem - it is maddening. I rely on this iPad for work so this is not just an annoyance! The above solutions of changing the appleid on the device or on the website do not work.
    The old email address no longer exists - I haven't used it in a year probably and I no longer have the account.  I logged into the appleid website and there is no trace of the old email address so there is nothing that can be deleted or changed there.  On the iPad there is no trace of the old email address so nothing can be deleted there either. I have updated the iPad software and the same problem comes right back.  Every 2 seconds I am asked to log in using the old non-existent email.  The device is currently useless.
    The only recent change to anything was the addition of an Apple TV device, which was set up using the correct login and password.
    Does anyone have any ideas? The iPad has been backed up to the iCloud so presumably it now won't recognize the current iCloud account? So restoring may notbe an option?

Maybe you are looking for

  • Unable to launch File sync and to update Adobe Exchange panel in Illustrator CC 2014

    I suppose that these two problems might be related, as I need the file sync to sync the extensions? Anyway, I'm unable to launch a file sync, and when I update the Adobe Exchange panel in Illustrator, it asks for a reboot, and after the reboot, it as

  • Trouble with downloading itunes in windows 7 pro

    trying to download the new version of itunes into my toshiba laptop with Windows 7 pro and it is giving me a error message and will not download.  Any suggestions.

  • 9i install on slack 8.0 - installed glibc stubs and binutils 2.10

    I've gone through a myriad of messages and can't make this all work perfectly... I installed the glibc stubs, installed binutils 2.10, and got genclntsh to compile, but: make -f $ORACLE_HOME/ctx/lib/ins_ctx.mk install will not work - keeps coming up

  • Creating custome idocs

    hi all I am XI consultant i want to send IDOC to XI server using ALE..but the IDOC is not present ....the master data is stored in standard sap tables but for them idoc is not present ...so i want to create custom idoc and using change pointer i can

  • Memmory allocation

    Hello, I have problem using in my sistem an global variable. Its type is array of clusters and its dimension could increase up to 20000 elements. I don't know from the beginning of the execution the dimension of it, so in the initialisation phase it