ROW LOCK IN SQL SERVER 2005

Please someone explain me how to lock exact row for UPDATE and DELETE. from my java application. I am testing with sql jdbc 2.0. I want in my application prevent simultaneous editing of the same record.

I think the term you are interested would be:
optimistic concurrency java
google that for some ideas.
Here is the rundown on one approach to it:
Most people read data and dont update too often.
When they update, they usually update separate records.
Therefore your approach is to be optimistic in assuming records are not altered while the end user
is looking at it (however, still handle the few times it happens).
A bad design is to display 100 records and when the user changes one of them, update all 100.
Doing that means you will almost always have changed data.
The correct way is to only update the changed record.
One solution is this:
For each database table, add a new column called 'version'. that you increment by one every time the record is updated. When you call up the record to display to the end user, you make note of the version number. You let him alter the record. When he goes to update, you compare the version number you made note of with the one in currently in the database. If it changes, you alert the user the data has changed. Then you may show him what changed and does he want to overwrite it. Usually, the situation seldom occurs (optimistic).
You need to check the version and update atomically (in a transaction for example). Here is a way to do it atomically (ie, in one sql statement instead of two):
update person set firsName='John' where personID=? and version=?
For delete, just go ahead and delete the record, the .executeUpdate() statement returns the number of records deleted. If its zero, you know someone previously deleted it. Similarly, if you go to update a record that someone prevously deleted while you were looking at the record, the update will return a value of zero instead of one.

Similar Messages

  • SQL Server 2005 data pull from Oracle

    Hi, I am learning how to use Oracle and I ran into this problem.
    My database is running on SQL Server 2005.
    I have an ODBC connection to Oracle. I also have a VB .Net script that queries the Oracle table that the data resides in.
    When the job is running, and if it stalls, I do not get a timeout error. It locks down my database and no other source systems can feed data to me; these are back logged in the queue.
    Is there an easier way for me to make a connection that will pull data on a consistent basis? Please help ...
    Student Learner

    Learning how to use Oracle does not include taking data from Oracle and putting it into SQL Server.
    From your description of what is happening I agree with BluShadow. This is not an Oracle issue. This is a coding in VB .NET issue.
    Posting the statements you are executing against some unknown version of Oracle would be a good starting point.

  • SQL Server 2005 SP2 install on Vista

    Hi,
    I have all updates for Vista, tried to install SQL Server 2005 SP2, the following log file:
    Microsoft SQL Server 2005 9.00.3042.00
    ==============================
    OS Version      : Professional  (Build 6000)
    Time            : Wed Mar 26 12:20:54 2008
    USER-PC : To change an existing instance of Microsoft SQL Server 2005 to a different edition of SQL Server 2005, you must run SQL Server 2005 Setup from the command prompt and include the SKUUPGRADE=1 parameter.
    Machine         : USER-PC
    Product         : Microsoft SQL Server Setup Support Files (English)
    Product Version : 9.00.3042.00
    Install         : Successful
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0002_USER-PC_SQLSupport_1.log
    Machine         : USER-PC
    Product         : Microsoft SQL Server Native Client
    Product Version : 9.00.3042.00
    Install         : Successful
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0002_USER-PC_SQLNCLI_1.log
    Machine         : USER-PC
    Product         : Microsoft SQL Server VSS Writer
    Product Version : 9.00.3042.00
    Install         : Successful
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0002_USER-PC_SqlWriter_1.log
    Machine         : USER-PC
    Product         : Microsoft SQL Server Setup Support Files (English)
    Product Version : 9.00.3042.00
    Install         : Successful
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0002_USER-PC_SQLSupport_2.log
    Machine         : USER-PC
    Product         : Microsoft SQL Server Native Client
    Product Version : 9.00.3042.00
    Install         : Successful
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0002_USER-PC_SQLNCLI_2.log
    Machine         : USER-PC
    Product         : Microsoft SQL Server 2005 Express Edition
    Product Version : 9.00.1399.06
    Install         : Successful
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0002_USER-PC_SQL.log
    Machine         : USER-PC
    Product         : Workstation Components, Books Online and Development Tools
    Warning         : Warning 28123.Warning: SQL Server Setup cannot install this feature because a different edition of this feature is already installed. For more information, see 'Version and Edition Upgrades' in SQL Server Books Online.
    Machine         : USER-PC
    Product         : Microsoft SQL Server 2005 Tools Express Edition
    Product Version : 9.00.1399.06
    Install         : Successful
    Log File        : C:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0002_USER-PC_Tools.log
     Setup succeeded with the installation, inspect the log file completely for status on all the components.
    Time            : Wed Mar 26 12:23:51 2008
    ==============================================================
    When I try to start SQL Server it times out. SQL Server Express is running ok.
    Can you help me get this started?
    Thank you,
    Lucy

    This is the previous errorlog:
    2008-04-09 11:47:06.27 Server      Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86)
     Mar 23 2007 16:28:52
     Copyright (c) 1988-2005 Microsoft Corporation
     Enterprise Evaluation Edition on Windows NT 6.0 (Build 6000: )
    2008-04-09 11:47:06.27 Server      (c) 2005 Microsoft Corporation.
    2008-04-09 11:47:06.27 Server      All rights reserved.
    2008-04-09 11:47:06.27 Server      Server process ID is 240.
    2008-04-09 11:47:06.27 Server      Authentication mode is WINDOWS-ONLY.
    2008-04-09 11:47:06.27 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
    2008-04-09 11:47:06.27 Server      This instance of SQL Server last reported using a process ID of 4180 at 4/5/2008 11:17:36 AM (local) 4/5/2008 6:17:36 PM (UTC). This is an informational message only; no user action is required.
    2008-04-09 11:47:06.27 Server      Registry startup parameters:
    2008-04-09 11:47:06.27 Server        -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
    2008-04-09 11:47:06.27 Server        -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
    2008-04-09 11:47:06.27 Server        -l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
    2008-04-09 11:47:06.32 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2008-04-09 11:47:06.32 Server      Detected 2 CPUs. This is an informational message; no user action is required.
    2008-04-09 11:47:06.50 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
    2008-04-09 11:47:06.55 Server      Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
    2008-04-09 11:47:06.64 Server      The Microsoft Distributed Transaction Coordinator (MS DTC) service could not be contacted.  If you would like distributed transaction functionality, please start this service.
    2008-04-09 11:47:06.64 Server      Database mirroring has been enabled on this instance of SQL Server.
    2008-04-09 11:47:06.64 spid4s      Starting up database 'master'.
    2008-04-09 11:47:06.80 spid4s      4 transactions rolled forward in database 'master' (1). This is an informational message only. No user action is required.
    2008-04-09 11:47:06.82 spid4s      0 transactions rolled back in database 'master' (1). This is an informational message only. No user action is required.
    2008-04-09 11:47:06.82 spid4s      Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
    2008-04-09 11:47:07.06 spid4s      SQL Trace ID 1 was started by login "sa".
    2008-04-09 11:47:07.10 spid4s      Starting up database 'mssqlsystemresource'.
    2008-04-09 11:47:07.13 spid4s      The resource database build version is 9.00.3042. This is an informational message only. No user action is required.
    2008-04-09 11:47:07.34 spid4s      Server name is 'USER-PC'. This is an informational message only. No user action is required.
    2008-04-09 11:47:07.34 spid9s      Starting up database 'model'.
    2008-04-09 11:47:07.53 spid9s      Clearing tempdb database.
    2008-04-09 11:47:08.11 Server      A self-generated certificate was successfully loaded for encryption.
    2008-04-09 11:47:08.11 Server      Server is listening on [ 'any' <ipv6> 1433].
    2008-04-09 11:47:08.11 Server      Server is listening on [ 'any' <ipv4> 1433].
    2008-04-09 11:47:08.17 Server      Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].
    2008-04-09 11:47:08.17 Server      Server named pipe provider is ready to accept connection on [ \\.\pipe\sql\query ].
    2008-04-09 11:47:08.17 Server      Server is listening on [ ::1 <ipv6> 1434].
    2008-04-09 11:47:09.12 spid9s      Starting up database 'tempdb'.
    2008-04-09 11:47:09.47 spid12s     The Service Broker protocol transport is disabled or not configured.
    2008-04-09 11:47:09.47 spid12s     The Database Mirroring protocol transport is disabled or not configured.
    2008-04-09 11:47:09.53 spid12s     Service Broker manager has started.
    2008-04-09 11:51:06.92 Server      CPU time stamp frequency has changed from 1662000 to 199683 ticks per millisecond. The new frequency will be used.
    2008-04-09 11:55:07.29 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 11:55:07.29 Server      CPU time stamp frequency has changed from 199683 to 136029 ticks per millisecond. The new frequency will be used.
    2008-04-09 12:23:09.84 Server      CPU time stamp frequency has changed from 136029 to 586928 ticks per millisecond. The new frequency will be used.
    2008-04-09 12:59:13.12 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 13:07:13.85 Server      CPU time stamp frequency has changed from 586928 to 824822 ticks per millisecond. The new frequency will be used.
    2008-04-09 13:47:17.50 Server      CPU time stamp frequency has changed from 824822 to 140502 ticks per millisecond. The new frequency will be used.
    2008-04-09 14:07:19.33 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 15:07:24.80 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 15:11:25.16 Server      CPU time stamp frequency has changed from 140502 to 1413355 ticks per millisecond. The new frequency will be used.
    2008-04-09 15:15:25.53 Server      CPU time stamp frequency has changed from 1413355 to 161989 ticks per millisecond. The new frequency will be used.
    2008-04-09 15:19:25.89 Server      CPU time stamp frequency has changed from 161989 to 134822 ticks per millisecond. The new frequency will be used.
    2008-04-09 16:23:31.73 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 17:23:37.20 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 18:11:41.58 Server      CPU time stamp frequency has changed from 134822 to 154257 ticks per millisecond. The new frequency will be used.
    2008-04-09 18:23:42.67 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 18:23:42.67 Server      CPU time stamp frequency has changed from 154257 to 134721 ticks per millisecond. The new frequency will be used.
    2008-04-09 18:35:43.79 Server      CPU time stamp frequency has changed from 134721 to 151448 ticks per millisecond. The new frequency will be used.
    2008-04-09 18:43:44.51 Server      CPU time stamp frequency has changed from 151448 to 125134 ticks per millisecond. The new frequency will be used.
    2008-04-09 19:15:47.35 Server      CPU time stamp frequency has changed from 125134 to 182297 ticks per millisecond. The new frequency will be used.
    2008-04-09 19:23:48.08 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 19:27:48.45 Server      CPU time stamp frequency has changed from 182297 to 120770 ticks per millisecond. The new frequency will be used.
    2008-04-09 19:47:50.27 Server      CPU time stamp frequency has changed from 120770 to 1370171 ticks per millisecond. The new frequency will be used.
    2008-04-09 20:07:52.10 Server      CPU time stamp frequency has changed from 1370171 to 106932 ticks per millisecond. The new frequency will be used.
    2008-04-09 20:23:53.56 Server      The time stamp counter of CPU on scheduler id 1 is not synchronized with other CPUs.
    2008-04-09 20:35:54.65 Server      CPU time stamp frequency has changed from 106932 to 88924 ticks per millisecond. The new frequency will be used.
    2008-04-09 20:51:56.11 Server      CPU time stamp frequency has changed from 88924 to 102106 ticks per millisecond. The new frequency will be used.
    2008-04-09 20:59:56.84 Server      CPU time stamp frequency has changed from 102106 to 118592 ticks per millisecond. The new frequency will be used.

  • OraOledb for 64-bit, Linked Servers and SQL Server 2005 issues

    Our environment is : SQL Server 2005, Windows Server 2003, 64-bit and 32-bit operating systems.
    Problem on 64-bit operating system box: (32-bit works fine).
    I am trying to access Oracle 10g database using linked server from our SQL Server 2005. In case of number fileds i got the following error:
    Invalid data for type "numeric".
    After going through one of the posting in this forumn i was able to resolve the problem by converting those column values to char while querying and then converting them back to numeric type on SQL server side.
    But today i ran into another problem. There is a VARCHAR2 column. I was able to retrieve the data yesterday for that column but today i am getting a blank recordset. If i exclude the colum from the query then i am getting all the rows.
    I am querying against a view and it has got a number of columns whose data type is VARCHAR2.
    Again the problem is on 64-bit operating system only. We have a 32-bit operating system on which i am able to retrieve the data including this column. I looked at the data and everything looks OK. No funny characters etc.
    I tried workarounds like using cast, to_char, checking for nulls etc., Nothing works.
    Any help is greately appreciated. Thanks.

    Did you find a resolution for this? We have similar problem. Set up a linked server in SQL 2006 to Oracle (running on Windows 64-bit) Linked server works and views I had set up were working but they added some new data in the Oracle test database I am using and now I get errors on one of the views.
    Error I am getting on the view is "Cannot initialize the data source object of OLE DB Provider "OraOLDEDB.ORacle" for the linked server"
    If I fine tune my queries to find the specific table or view that is at issue, then I get the error "inconsistent metadata for a column"

  • Sender JDBC support the stored procedure in SQL Server 2005

    Dear All,
    My question here is , Sender is JDBC adpter support to call the Stored procedure in Microsoft SQL Server 2005?
    I followed the below thread before posting this question
    Sender JDBC Adapter Supports Stored Procedures????
    In the thread Suraj response has mentioned SAP note: 941317, I checked the note, Note says it supported only ORACLE DBMS versions.
    Could you please clarify about this to possibility to call the stored procedure in Microsoft SQL server 2005?
    Thank you in Advance
    Sateesh

    Hi Sateesh,
    To answer your query, Yes it does. SP call works with SQL Server 2005 as well, the SP call should be "execute SPNAME <paramas>". In the place of update statement put any junk value as mentioned in the earlier comment.
    But just one thing to be noted, the select or any other query returning the desired resultset must be the first statement in youre SP returning value to the calling app. Means if there are any update, deletion or intermediate select queries to be used with in your SP, those all should be placed after the Main Select query that returns the desired resultset. Variable declarions and assignments are allowed.
    But if the seq of statements in your SP are like:
    @var1 Varchar
    Update <tablename>....
    Select * from <tablename>
    Then the output of the SP is :
    1 row updated
    <the resultset from select>
    In such cases, PI can recognise the first value returned only, that is "1 row updated" and hence the returned resultset wouldn't be seen by PI or not be passed to integration engine. Hence the update should come after the main Select.
    One more interesting piece of information, even if you copy and paste the entire SP code in place of the query string of Sender JDBC adapter, that too will work with all your variable declarations, multiple queries and updates and everything. Just have to follow the above rule.
    Let us know what you find.
    Regards,
    Suddhasatta

  • SQL server 2005 TSQL problem

    Deal all\,
    Table1
    Table2
    T1Col1
    T1col2
    T2Col1
    T2col2
    1
    asdf
    1
    asdf
    2
    ghgh
    2
    ghgh
    3
    kkjk
    3
    kkjk
    4
    kkjk
    4
    ldflkl
    5
    jhjj
    5
    urws
    Think that i have above 2 tables in SQL server 2005.
    select * from table1 where T1Col1 in ( select T1Col1 from Table2)
    should i except error for the above query ?
    But SQL server 2005 is not giving any error , it is simple resulting all rows  from Table1
    regards
    ranganadh kodali

    You will not receive any type of error because T1Col1 does exist in Table1 and even inside the parens
    you are still within the context of the same query, the reason for this is that SQL Server allows you to use the values of the outer table inside the inner condition, you will find tons of examples of this usage when people use exists, here is one that's perfectly
    valid:
    select *
    from table1
    where exists (select 1 from Table2 where T1Col1 = T2Col1)
    so in your particular query what's happening is that you're selecting a kind of "constant" value in your inner query, similar to doing this:
    select 'constant' as myCol from Table2;
    just that the 'constant' value is really coming from your outer table.
    please mark as answer if it helps! :)

  • SQL Server 2005 Vista Problems

    I have 3 databases in SQL Server 2005 that I want to connect
    to. Everything works fine in XP, but when I try to set it up on
    Vista I get all sorts of problems. All software is latest version
    with all available updates installed.
    After restarting the Vista computer, the first database I
    select in CF administrator connects successfully, but the other two
    return Connection Reset error. It doesn't matter which of the 3 I
    select, just the first one connects.
    However, whichever one it is that CF confirmed was
    successful, when accessed from a CF page also returns Connection
    Reset error.
    The security settings in SQL Server are the same for each
    database.
    Anyone got any idea how to solve this problem??
    Doug

    The one that was connecting was connecting to port 1434. I
    have now locked it down and only port 1433 is available. Now I get
    the same error every time I try to make a connection:
    Error establishing socket. Connection refused: connect
    Apart from the port number (which was not 1433 on my old XP
    computer) everything else is identical.
    Is there some setting in Vista out of the box that has to be
    changed to get CF to connect to SQL Server 2005?
    Doug

  • OraOledb, Linked Servers and SQL Server 2005 issues

    Some issues I've come across when using SQL Server 2005 (and SQL Server Express 2005), the OraOLEDB provider (10.2.0.1) and a linked Oracle database (8.1.7.4.0 64-bit)
    1) You must set the OraOledb.Oracle\AllowInProcess value to 1 to allow the OraOledb provider to run in SQL Server's process. Without doing this I receive an 'unspecified error' from the OLE DB provider when attempting to run a query
    2) When running a ' select * ' query across a linked server using the provider, I receive the following error: Msg 9803, Level 16, State 1, Line 1
    Invalid data for type "numeric". I can, however, select all of the columns by name and the query completes (no error). Sometimes the 'select *' query returns a few rows before the error, sometimes it doesn't. The Microsoft Provider for Oracle does not have this problem

    Okay... I've got a Win2K3 Std Ed server (x64) running 64-bit SQL Server 2005 Enterprise Edition. I've installed the Oracle 10g 10.2.1 full client and admin tools, added two named services via the NetConfig assistant, and successfully set up (and tested) a connection via the ODBC Administrator to an Oracle database.
    Now... when I try to create a new connection manager in SQL Server 2005 Integration Services, the OLEDB provider for Oracle can't be found, and when I try to manually add an underlying OLEDB connection to the database, SQL Server reports:
    Test connection failed because of an error in initializing provider. The 'OraOLEDB.Oracle.1' provider is not registered on the local machine.
    Does anyone know what I need to do to see my ODBC Server data connections in SQL Server 2005 (64 bit)? I don't have this issue on my 32-bit SQL Server 2005 servers.

  • SQL Server 2005 Linked Servers (OraOledb / 10g)

    I am running SQL Server 2005 on a 64 bit Server. I have a linked server using OraOledb (Oracle client 10g) to Oracle. "Select" statements works without any problems, but "Update" and "Delete" statements return the following error:
    Msg 7333, Level 16, State 2, Line 2
    Cannot fetch a row using a bookmark from OLE DB provider "OraOLEDB.Oracle" for linked server "ORACLESERVER".

    Using the four part statement works, but does not use the indexes in oracle. Therefore, if you have a big update, it will run very slow. Has anyone figured a way to use the OPENQUERY statement in SQL Server 2008? Should I give up on this idea??? Here is what I am trying to do:
    UPDATE     OPENQUERY(ORA_CP, 'SELECT     values... FROM table1 LES
                        INNER JOIN table SPD ON SPD.Year = LES1.Year AND
                                  SPD.Month = LES1.Month AND
                                  SPD.Week = LES1.Week
                   WHERE     TYPE IN (''E'',''S'',''I'')
                        AND PROJ_ID = ''XXXXXX.XXX.XXX''')      
              SET          GOAL_AMT = GOAL_AMT
              FROM     dbo.table3 S
                   INNER JOIN OPENQUERY(Linked_Server,
    'SELECT values...
                                  FROM table1 LES
                                  INNER JOIN table SPD ON SPD.Year = LES1.Year AND
                                  SPD.Month = LES1.Month AND
                                  SPD.Week = LES1.Week
                             WHERE TYPE IN (''E'',''S'',''I'')
                                  AND PROJ_ID = ''XXXXX.XXX.XXX''') A ON A.PROJ_ID = S.PROJ_ID AND
    A.ORG_ID = S.ORG_ID AND
                                                      A.ACCT_ID = S.ACCT_ID AND
                                                      A.EMPL_VEND_ID = S.EMPL_VEND_ID AND
                                                      A.CP_DATA_DATE = S.CP_DATA_DATE

  • Security Update for SQL Server 2005 SP3 (KB2494113) failed

    Here is the Error, Can't get the update install, please help.
    KB Number: KB2494113
    Machine: MJA01
    OS Version: Server 4.0 Service Pack 1 (Build 7601)
    Package Language: 1033 (ENU)
    Package Platform: x86
    Package SP Level: 3
    Package Version: 4060
    Command-line parameters specified:
    Cluster Installation: No
    Prerequisites Check & Status
    SQLSupport: Passed
    Products Detected                         Language  Level  Patch Level       Platform  Edition
    SQL Server Database Services 2005 (BKUPEXEC)  ENU       SP3    2005.090.4035.00  x86       EXPRESS
    SQL Server Tools and Workstation Components 2005  ENU       SP2           9.2.3042  x86       EXPRESS
    Products Disqualified & Reason
    Product                                   Reason
    SQL Server Tools and Workstation Components 2005  The product instance SQL Tools does not have prerequisite update 4035 installed. Update 4060 is dependent on prerequisite update 4035. Exit setup and refer to the Knowledge Base article to find the prerequisite
    patch. Install the prerequisite and rerun the installation.
    Processes Locking Files
    Process Name          Feature               Type          User Name                  PID
    Product Installation Status
    Product                   : SQL Server Database Services 2005 (BKUPEXEC)
    Product Version (Previous): 4035
    Product Version (Final)   : 
    Status                    : Failure
    Log File                  : C:\Program Files (x86)\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB2494113_sqlrun_sql.msp.log
    SQL Express Features      : 
    Error Number              : 29528
    Error Description         : MSP Error: 29528  The setup has encountered an unexpected error while Setting Internal Properties. The error is: Fatal error during installation.
    Product                   : SQL Server Tools and Workstation Components 2005
    Product Version (Previous): 3042
    Product Version (Final)   : 
    Status                    : NA
    Log File                  : 
    SQL Express Features      : 
    Error Description         : The product instance SQL Tools does not have prerequisite update 4035 installed. Update 4060 is dependent on prerequisite update 4035. Exit setup and refer to the Knowledge Base article to find the prerequisite
    patch. Install the prerequisite and rerun the installation.
    Summary
         One or more products failed to install, see above for details
         Exit Code Returned: 29528

    Hi Bhanu,
    I have uninstall the SQL Server Tools and Workstation Components 2005.
    But still unable to upg the SQL Server with the KB249411. Any more ideas?
    This is the Summary log.
    Time: 09/10/2014 11:09:48.218
    KB Number: KB2494113
    Machine: MJA01
    OS Version: Server 4.0 Service Pack 1 (Build 7601)
    Package Language: 1033 (ENU)
    Package Platform: x86
    Package SP Level: 3
    Package Version: 4060
    Command-line parameters specified:
    Cluster Installation: No
    Prerequisites Check & Status
    SQLSupport: Passed
    Products Detected                         Language  Level  Patch Level       Platform  Edition
    SQL Server Database Services 2005 (BKUPEXEC)  ENU       SP3    2005.090.4035.00  x86       EXPRESS
    Products Disqualified & Reason
    Product                                   Reason
    Processes Locking Files
    Process Name          Feature               Type          User Name                  PID
    Product Installation Status
    Product                   : SQL Server Database Services 2005 (BKUPEXEC)
    Product Version (Previous): 4035
    Product Version (Final)   : 
    Status                    : Failure
    Log File                  : C:\Program Files (x86)\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB2494113_sqlrun_sql.msp.log
    SQL Express Features      : 
    Error Number              : 29528
    Error Description         : MSP Error: 29528  The setup has encountered an unexpected error while Setting Internal Properties. The error is: Fatal error during installation.
    Summary
         One or more products failed to install, see above for details
         Exit Code Returned: 29528
    Here is what is log in the SQL9_Hotfix_KB2494113_sqlrun_sql.msp.log
    Property(S): CommonFilesFolder.D9BC9C10_2DCD_44D3_AACC_9C58CAF76128 = C:\Program Files (x86)\Common Files\
    MSI (s) (B8:F0) [11:09:39:826]: Product: Microsoft SQL Server 2005 Express Edition - Update 'GDR 4060 for SQL Server Database Services 2005 ENU (KB2494113)' could not be installed. Error code 1603. Additional information is available in the log file C:\Program
    Files (x86)\Microsoft SQL Server\90\Setup Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB2494113_sqlrun_sql.msp.log.
    MSI (s) (B8:F0) [11:09:39:827]: Windows Installer installed an update. Product Name: Microsoft SQL Server 2005 Express Edition. Product Version: 9.3.4035.00. Product Language: 1033. Manufacturer: Microsoft Corporation. Update Name: GDR 4060 for SQL Server Database
    Services 2005 ENU (KB2494113). Installation success or error status: 1603.
    MSI (s) (B8:F0) [11:09:39:828]: Note: 1: 1729 
    MSI (s) (B8:F0) [11:09:39:828]: Product: Microsoft SQL Server 2005 Express Edition -- Configuration failed.
    MSI (s) (B8:F0) [11:09:39:829]: Windows Installer reconfigured the product. Product Name: Microsoft SQL Server 2005 Express Edition. Product Version: 9.3.4035.00. Product Language: 1033. Manufacturer: Microsoft Corporation. Reconfiguration success or error
    status: 1603.
    MSI (s) (B8:F0) [11:09:39:829]: Attempting to delete file C:\Windows\Installer\63906e.msp
    MSI (s) (B8:F0) [11:09:39:829]: Unable to delete the file. LastError = 32
    MSI (s) (B8:F0) [11:09:40:092]: Deferring clean up of packages/files, if any exist
    MSI (s) (B8:F0) [11:09:40:092]: Attempting to delete file C:\Windows\Installer\63906e.msp
    MSI (s) (B8:F0) [11:09:40:094]: MainEngineThread is returning 1603
    MSI (s) (B8:6C) [11:09:40:097]: RESTART MANAGER: Session closed.
    MSI (s) (B8:6C) [11:09:40:097]: No System Restore sequence number for this installation.
    === Logging stopped: 9/10/2014  11:09:39 ===
    MSI (s) (B8:6C) [11:09:40:098]: User policy value 'DisableRollback' is 0
    MSI (s) (B8:6C) [11:09:40:098]: Machine policy value 'DisableRollback' is 0
    MSI (s) (B8:6C) [11:09:40:098]: Incrementing counter to disable shutdown. Counter after increment: 0
    MSI (s) (B8:6C) [11:09:40:098]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
    MSI (s) (B8:6C) [11:09:40:098]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
    MSI (s) (B8:6C) [11:09:40:098]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2 
    MSI (s) (B8:6C) [11:09:40:098]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2 
    MSI (s) (B8:6C) [11:09:40:098]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
    MSI (s) (B8:6C) [11:09:40:099]: Restoring environment variables
    MSI (s) (B8:6C) [11:09:40:099]: Destroying RemoteAPI object.
    MSI (s) (B8:30) [11:09:40:099]: Custom Action Manager thread ending.
    MSI (c) (FC:60) [11:09:40:100]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
    MSI (c) (FC:60) [11:09:40:101]: MainEngineThread is returning 1603
    Thanks,
    Alice

  • Import data from postgreSQL into SQL server 2005

    I am trying to import one table from postgreSQL to SQL Server 2005 using sql server import and export wizard. When i test the connection after providing data source, location, username, password in the Data Link Properties section I get the message "Test Connection Succeeded". As soon as i press next to go onto next step i get the following error.
    TITLE: SQL Server Import and Export Wizard
    Cannot get string literals from the database connection "Provider=PostgreSQL.1;User ID=sa;Data Source=localhost;Location=TestMasterMap;Extended Properties=".
    ADDITIONAL INFORMATION:
    Object reference not set to an instance of an object. (DTSWizard)
    BUTTONS:
    OK
    I have tried all sorts of different combinations for these properties but it always fails on this step. Can anybody help me with this?
     

    The settings above worked for a small table with 3 rows. Now when I try to import the bigger table which I wanted to import in the first instance I get following out of memory error. Anybody knows how to work around this. I have checked my task manager and more than half of my memory was still not used when I get this error.
    TITLE: SQL Server Import and Export Wizard
    Column information for the source and destination data could not be retrieved.
    "Query" -> [temporary].[dbo].[exporttable]:
                      - ERROR [HY000] Out of memory while reading tuples.;
    No query has been executed with that handle
    ADDITIONAL INFORMATION:
    ERROR [HY000] Out of memory while reading tuples.;
    No query has been executed with that handle (PSQLODBC.DLL)
    BUTTONS:
    OK

  • Insert to XE from sql server 2005 ...

    Hi,
    is it possible to create a trigger on Sql Server 2005 to insert a row to Oracle XE ?
    I want to create a update/insert trigger on sql server 2005 which will insert the data into a Oracle XE table.
    I have a Linked Servers in Sql Server to Oracle XE and this link works with simple sql statement from sql server like :
    INSERT INTO [NEW_OR]..[Adam_user].[DUMMY] (AA) VALUES('Dummy String Data')
    But the same statement does not work when in trigger. the following error occurs in Sql Server 2005...
    Msg 8501, Level 16, State 3, Procedure deneme, Line 5
    MSDTC on server 'Adam_user' is unavailable.
    Any suggestions?
    Thanks in advance.....
    Adam

    Here is the answer...
    May be useful for someone who needs the same solution ...
    The Distributed Transaction Coordinator service must be start on windows to accomplish the transaction ...
    For this:
    (on windows)
    START > SETTINGS > CONTROL PANEL > ADMINISTRATIVE TOOLS > SERVICES. Find the service called 'Distributed Transaction Coordinator' and RIGHT CLICK (on it and select) > Start.

  • High CPU utilization with SQL Server 2005

    Our company recently combined our DBs into one SQL 2005 Server. 
    Dell Power Edge 1800 with 3.00 GHz Xeon Processor 800 FSB, 1 GB of RAM
    Dell Power Edge 1600 with 2.80 GHz Xeon Processor 533 FSB, 1 GB of RAM
    Combined into one:
    Dell Power Edge 2950 Dual Core 1.6 GHz Xeon Woodcrest Processor, 4 GB of RAM
    However, the CPU utilization on this new server is maintaining at about 90% with 3.82 GB of RAM used as well.  It's a Windows Server 2003 R2 x64 edition running SQL Server 2005 SP2 x64.  I have searched around Microsoft's website for any information that could be of help to me, but I was unable to locate anything.  I was hoping that someone could provide some insight as to why this might be occuring.  Or if this is a known issue.
    Thanks,
    Peter

    Hello!
    Here are some steps to take after upgrading your SQL Server from 2K to 2K5. (This quote is from BOL)
    After upgrading the Database Engine to SQL Server 2005, complete the following tasks:
    Register your servers - Upgrade removes registry settings for the previous SQL Server instance. After upgrading, you must reregister your servers.
    Repopulate full-text catalogs - The upgrade process marks your databases as full-text disabled. Catalogs must be repopulated, but this operation is not run automatically by Setup because it can be time-consuming. As this operation enhances the performance of your SQL Server 2005 installation, administrators should plan to repopulate full-text catalogs at a convenient time.
    Update statistics - To help optimize query performance, we recommend that you update statistics on all databases following upgrade. Use the sp_updatestats stored procedure to update statistics in user-defined tables in SQL Server 2005 databases.
    Update usage counters - In earlier versions of SQL Server, the values for the table and index row counts and page counts can become incorrect. To correct any invalid row or page counts, we recommend that you run DBCC UPDATEUSAGE on all databases following upgrade.
    Configure your new SQL Server installation - To reduce the attackable surface area of a system, SQL Server 2005 selectively installs and activates key services and features. For more information on how to activate SQL Server 2005 features, see SQL Server Surface Area Configuration.
    Source:
    How to: Upgrade to SQL Server 2005 (Setup)
    http://msdn2.microsoft.com/en-us/library/ms144267.aspx

  • Required Microsoft Sql Server 2005 Server Roles for JDBC Connection

    Hi!
    I have developed a database in MS SQL Server 2005, to which I would require only bulkadmin server role from an external java application, because I only need to update rows, insert values or use select queries in the database.
    The problem is that, using either the Microsoft JDBC Driver 1.1 or the Java JDBC ODBC Driver and the Windows XP Data Base (ODBC) configurations, I need a user with sysadmin server role inside Sql Server, otherwise JDBC won't connect to the database using the selected user. Even if I leave the sql login with setupadmin or any server role lower than sysadmin, the connection is refused.
    Is there no way to connect using JDBC to MS Sql Server 2005 other than granting the connected user sysadmin rights? My code looks as follows:
    String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
    String url = "jdbc:sqlserver://FIREBLADE\\SQLEXPRESS";
    String user = "username";
    String password = "password$$";
    Connection conn;
    Class.forName(driver);
    conn = DriverManager.getConnection(url,user,password);
    if (conn != null)
    System.out.println("\nSQL Server Connection established ...\n");
    I have heard that Java JDBC connections to Microsoft require high-level access, and if that's the case I would rather migrate my database to MySql.
    Any informed answer is more than welcome. Thanks for reading my post!

    Well i personally prefer usage of open source MS SQL SERVER 2k jdbc driver called jtds instead of the driver provided by MS themselves(which is proproteriry) as i had similar problem which i personally encountered when i was using it.
    go through the below link for further info.
    http://jtds.sourceforge.net/
    REGARDS,
    RaHuL

  • How much Memory should be allocated to SQL Server 2005

    Hi,
    I have a SQL Server 2005 installation on a server having 64GBof RAM.
    SQL server is allocated 57GB of the available RAM.
    Could you please tell me what would be the ideal RAM allocation for my scenario. is the one that is set now, fine.
    How much RAM should be left for the OS and other processes to run?
    I have around 8 databases on the server and the cumulative size of all the databases in about 800GB, these are highly used servers, used for a public domain.

    Umesh,
    Saeid and Uri has already given you good articles to refer to please read them. Reg SQL Server utilization I am sure you are referring to task manager which is always not correct place to look for memory utilization. Below link has query which will give
    you SQL Server memory utilization
    http://blogs.msdn.com/b/sqlsakthi/archive/2011/02/28/t-sql-script-to-monitor-memory-usage-by-sql-server-instance.aspx
    Article provided by Uri will give you not absolute value but almost correct value, but since you asked absolute value you need to look at performance counter to reach at correct memory utilization. If you refer to section 'Does my SQL server has low memory'
    in article which Saeid gave you will find list of counters to monitor for memory utilization use the counters to reah absolute value.
    >>OK, Can high RAM utilization by sql server cause the OS to restart by any chance.
    IMO its not possible I have never seen SQL server being cause for OS shutdown. SQL Server works in non preemptive mode and will yield memory to OS when required. One possibility is when SQL server has locked pages in memory(LPIM)  and some rouge process
    or driver starts using memory from OS heavily and since  SQL server memory is locked( due to LPIM privilege)  it cannot trim heavily resulting in OS to terminate but this is not because of SQL server but because of bad drivers and processes leaking
    memory on OS.
    SQL server using memory is normal behavior
    >>This question seems vague, but I had to ask this, because my server restarts abruptly and I don't get valid reasons in the Logs for that matter.
    Does SQL server starts abruptly or windows OS ? Please look at event viewer for more details and SQL server logs. Is your SQL Server 2005 patched to SP4
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

Maybe you are looking for

  • How Can i create a trigger

    Hi Every1, I want to create a database trigger which act on entering the charahters and count the characters. e.g you can understand with the example if i press 01 in a specific column the length of characters is two after this automatically the char

  • I can't burn a DVD cause my film is 24gigs

    Hey folks, Im trying to burn a dvd from IMOVIE I just clicked the menu, FILE and SHARE and went to IDVD but I'm not able to burn anything cause my dvd is 4.4gigs and my footage is 24gigs... how do I get it to burn on my dvd? Do I need to do something

  • IBook G4 Wigging out

    If this has already been addressed, I apologize. I just wasn't entirely sure how to phrase this to see if anyone else was having this problem. For the past several months, my iBook G4 (2005) has been freaking out at random intervals. What do I mean b

  • File System or BLOB

    Hi, I have wrote an application and all works well. I was wondering what peoples views are on the BLOB in Database vs File System argument? I have gone for the BLOB method as I like the security and ease of it. What I don't like is the more the syste

  • Album Sorting Issue

    How do I keep from my 20th Century Masters: The Millennium Collection from going into the same folder with the other artists? Does anyone know? I have about 3 of 4 different artist of The Millennium Collection but since the album title is *20th Centu