Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. TheBugSlayer

    Transaction with SELECT and UPDATE with XLOCK causing deadlocks

    @gmmastros, The table already has a primary key on ObjectID. It only has 212 rows. The execution plan has not changed after the original modification. It remains the same when I add ObjectID to the non-clustered index (Type, ObjectID). When I change the primary key to (Type, ObjectID) I...
  2. TheBugSlayer

    Transaction with SELECT and UPDATE with XLOCK causing deadlocks

    @Chris, thanks once more for the help. We are exploring the SEQUENCE avenue and will soon decide if we should develop a POC in the testing environment. I'll let you know the final decision. @gmmastros I can't believe myself! We went deep into the woods without doing the most basic check in...
  3. TheBugSlayer

    Transaction with SELECT and UPDATE with XLOCK causing deadlocks

    Hi Chris. Thank you for taking the time to answer my question. Yes, I am familiar with the SEQUENCE feature in SQL Server. The problem with the vendor is that they have not been adopting features released over time. I am eager to see what you propose. At least the other satellite applications...
  4. TheBugSlayer

    Transaction with SELECT and UPDATE with XLOCK causing deadlocks

    Hello all, We inherited an application that was rewritten from SmallTalk with a SQL Server in the backend that causes a lot deadlocks and runs slows at times for that reason. The database has many tables, all of which have an ObjectID INT key value. However, the value is not auto-generated...
  5. TheBugSlayer

    High Availability - insert fails on primary replica but runs on secondary after failover.

    We have an HAG configured with 3 servers running Microsoft SQL Server 2012 (SP4-OD) (KB4091266) - 11.0.7469.6 (X64) Feb 28 2018 17:47:20 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor). S1 normally functions as the...
  6. TheBugSlayer

    How to make xp_cmdshell use SQL Server's bcp utility instead of Sysbase's

    Got it! "queryout" should be used instead of "out" when a query is used. Thank you! MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA), Training HOTT cert SQL Server 2012 Business Intelligence (SSIS, SSAS).
  7. TheBugSlayer

    How to make xp_cmdshell use SQL Server's bcp utility instead of Sysbase's

    So I made a copy of bcp.exe in the MS folder and renamed it to bcp_sql. Then if I use it asexec master..xp_cmdshell 'bcp_sql MyTable out E:\Projects\Reports\mytable.txt -c -T -SMyServer' it works. However, I need to list columns but exec master..xp_cmdshell 'bcp_sql "SELECT Col1, Col2 FROM...
  8. TheBugSlayer

    How to make xp_cmdshell use SQL Server's bcp utility instead of Sysbase's

    @Chris Miller I get when I quote the path...[ponder] MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA), Training HOTT cert SQL Server 2012 Business Intelligence (SSIS, SSAS).
  9. TheBugSlayer

    How to make xp_cmdshell use SQL Server's bcp utility instead of Sysbase's

    Hello all, It's been a while. I am trying to export a table using the bcp utility. Below is the command I am running in SSMS: exec master..xp_cmdshell 'bcp "SELECT Col1 FROM MyTable" out E:\Projects\Reports\mytable.txt -c -T -SMyServer' which returns the following error which suggests that...
  10. TheBugSlayer

    How to create a new column in a SAS Data Studio Code Transform step?

    Hello. Don't ask me how I landed on SAS, but it's now on my plate so I am learning... In my data plan, I am trying need to add a column to an existing dataset. The way I found to do it is by adding a column in a code transform. However, I am struggling to create a variable then assign that...
  11. TheBugSlayer

    Help formatting query to SQL-92 standard

    I now believe the query should be looking like this: DELETE GL20000 FROM GL00100, GL20000 WHERE GL20000.ACTINDX = GL00100.ACTINDX AND GL20000.ACTINDX = 1234 AND GL00100.ACCTTYPE = 9 AND GL20000.SOURCDOC = 'XYZ' MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD...
  12. TheBugSlayer

    Help formatting query to SQL-92 standard

    Thanks gmmastros. That's exactly the reason I wanted to double-check. It's a cross-join. Restored the database elsewhere, showed the GP guy and he thought it's deleting too many rows, so we contacted the vendor and are waiting to hear. MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server...
  13. TheBugSlayer

    Help formatting query to SQL-92 standard

    Thanks Borislav. Yep...It's missing that GL20000.???????? = GL00100.????????? part. I think you mixed up the statements. The SQL-92-compliant one should be the one above, which implements JOIN. MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA), Training HOTT cert...
  14. TheBugSlayer

    Help formatting query to SQL-92 standard

    All, A third-party vendor has submitted a script for execution to resolve an issue users are experiencing. Since this is serious business and the query is not in standard format, I want to make sure I understand its purpose correctly. The query is: delete GL20000 from GL00100, GL20000 where...
  15. TheBugSlayer

    How to move SharePoint files to a different drive?

    Is this forum alive? If not, where can I post a SharePoint question? Thank you. MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA), Training HOTT cert SQL Server 2012 Business Intelligence (SSIS, SSAS).
  16. TheBugSlayer

    How to move SharePoint files to a different drive?

    Hello all, I wrote a long post a few minutes earlier and posted it but now I cannot find it. This is a short version of it. Please forgive me if it turns out to be a duplicate. In short, I am not a SP guy but a SQL Server DBA/programmer. SQL Server is showing that the SP databases are pointing...
  17. TheBugSlayer

    Backu and restore of multiple filegroups

    Hi Yelworcm, Thanks for your reply. Are you saying that I don't need to restore the full backup, or any other backup, that restoring the one filegroup and ALL the transaction logs will suffice to restore the database to any point in time? We are more concerned with reducing restore times, and...
  18. TheBugSlayer

    Backu and restore of multiple filegroups

    Hello dear members, I have a database with one of the tables being larger than the other tables by orders of magnitude. There is a group of 5 tables that form a subsystem within the data and we would like to store, backup and restore them separately, in hopes of reducing I/O times and speeding...
  19. TheBugSlayer

    CHECKSUM mistery

    Thank you Federico and Olaf. This is borderline ridiculous. If the input values look very different, the probability of their hash colliding should be very low! Olaf, in this case the numerical value is the same-coincidentally empty. Substitute with any numerical value and you get the same hash...
  20. TheBugSlayer

    CHECKSUM mistery

    Hello all. I am trying to understand why CHECKSUM is yielding 1)a different result for the same input values based on whether they are coming from a view or from a table 2)the same value for different input values from the same function. Is the source of the input values factor into the...

Part and Inventory Search

Back
Top