Tuesday, August 27, 2013

[SQL Server] Testing with Profiler Custom Events and Database Snapshots

  1. Testing with Profiler Custom Events and Database Snapshots ...

    www.sqlteam.com/.../testing-with-profiler-custom-events-and-database- snapshots
    22 Jun 2009 ... We've all had them. One of those stored procedures that is huge and contains
    complex business logic which may or may not be executed.

  2. Testing with Profiler Custom Events and Database Snapshots ...

    www.sswug.org/articles/viewarticle.aspx?id=45179
    (Mike Femenella) We've all had them. One of those stored procedures that is
    huge and contains complex business logic which may or may not be executed.

  3. Performance and Memory Java Profiler - YourKit Java Profiler

    www.yourkit.com/features/ - Cached
    Java profiler. ... "Quick Info" view: Ability to automatically capture snapshots on
    event: Ability to compare memory snapshots: Automated comprehensive memory
     ...

  4. Database Project Settings - MSDN - Microsoft

    msdn.microsoft.com/en-us/library/hh272681(v=vs.103).aspx - Cached
    You use database project settings to control aspects of your database,
    debugging ... How to: Create a Snapshot of a Project ... Build Events ... If this
    check box is cleared, file names for objects take the form ObjectName. ... You
    might choose to do this, for example, if you wanted a custom configuration in
    which you always ...

  5. Free SQL Server Tools Software and Utilities - SQL Server Utilities

    www.sqlserverutilities.com/SQL-Server-Utilities-Free-SQL-Server-Tools- Software-and-Utilities-for-the-DBA-and-Developer.htm - Cached - Similar
    RML Utilities for SQL Server (x86) and (x64) - tools to help database
    administrators manage the ... SQLTrace, Profiler & Extended Events ...
    procedures creation, new query templates, running custom scripts from Object
    explorer's context menu) for ... Create Database Snapshot - simple GUI for
    creating a database snapshot.

  6. Appendix: Common DBA Tasks for Microsoft SQL Server - Amazon ...

    docs.aws.amazon.com/.../latest/.../Appendix.SQLServer.CommonDBATasks. html - Cached
    This section describes the Amazon RDS-specific implementations of some
    common DBA tasks for DB Instances that are running the Microsoft SQL Server ...

  7. Monitoring and Tuning the Database - 11g Release 2 (11.2)

    docs.oracle.com/cd/E25054_01/server.1111/.../montune.htm - Cached
    Other alerts correspond to database events such as Snapshot Too Old or ...... A
    green check mark in the SQL Profile column indicates a recommendation that ...

  8. [PDF] 

    Oracle Database 11g Release 2: Database Manageability Overview

    www.oracle.com/technetwork/oem/pdf/511876.pdf - Cached
    Response Time Testing using SQL Performance Analyzer ......... 16 .... intervals,
    the Oracle database makes a snapshot of all its vital statistics and workload
    information and .... The ASH report now lists events that account for the highest ....
    It builds a SQL profile using this auxiliary information and makes a
    recommendation to.

  9. Database Management - Oracle Documentation

    docs.oracle.com/cd/E11857_01/em.../database_management.htm - Cached
    It displays a profile of the amount of time sessions are either working or waiting to
    work ... particular wait event that accounted for the highest percentages of
    sampled session activity. .... By default, the database takes snapshots at 60-
    minute intervals. ..... This user may add additional custom database objects or
    extensions to ...

  10. New Features In Oracle Enterprise Manager Cloud Control 12c

    docs.oracle.com/cd/E24628_01/doc.121/e25353/whats_new.htm - Cached
    For example, when a new version of Oracle Database is released, you can ....
    These entities can be consumed in custom job types defined for the plug-in. ...
    priority than targets where the value of the lifecycle property is staging, test, or
    development. ...... A provisioning profile is a read-only snapshot of an existing
    database ...

  11. The Grails Framework 2.2.4

    grails.org/doc/latest/guide/single.html - Similar
    2.9Testing an Application ... 4.7.6Snapshots and Other Changing Dependencies
    ... 6.5.1Events and Auto Timestamping ... 6.5.2.4Custom Database Identity .....
    running with a custom Grails environment called "production", a Spring profile of
     ...

  12. Basit A. Farooq - United Kingdom | LinkedIn

    uk.linkedin.com/in/basitfarooq - Cached
    Leeds, United Kingdom - Lead/Senior Database Administrator at Parabis Group
    View Basit A. Farooq's (United Kingdom) professional profile on LinkedIn. ... log
    shipping based warm spare, custom inter-datacentre replication, 100 GB Custom
    ... DBCC, SQL Profiler, DTA, Auditing, Event Notifications, Extended Events,
    Service Broker, SSIS, Visio, Database Mirroring, LogShipping, Database
    Snapshots.

  13. RegOnline Features ? Badges, Custom Events Websites, Email ...

    www.regonline.ca/__features/ - Cached
    1) Charts 2) Event Statistics 3) The custom event URL ... Reports - Events
    Snapshot ... Build directories in tabbed, contact card, and full profile formats. ...
    Searchable Attendee Database ... The Event Organizer Tools app allows you to
    check in attendees to your event or to an individual session either through the
    interface or ...

  14. Activiti 5.13 User Guide

    www.activiti.org/userguide/
    Custom extensions; Events. Event Definitions; Timer Event ...... autoReconnect=
    true, Tested using mysql-connector-java database driver. oracle, 11.2.0.1.0 ...

  15. DB Tools for Oracle - SoftTree Technologies, Inc.

    www.softtreetech.com/dbtools/ - Cached
    DB Tools is an integrated set of "must have" tools for monitoring, tuning, ...
    schema or database snapshots; anticipate schema change impact and
    dependencies. ... can run robust database performance and organization
    diagnostic tests and get a .... SQL Profiler - DB Tools PL/SQL Profiler provides
    graphical interface to the ...

  16. Techniques for improving online data cleanup in a WebSphere ... - IBM

    www.ibm.com/developerworks/websphere/.../0808_voldman.html - Cached - Similar
    As the database grows, the performance and maintainability of the site are
    affected, ... You will learn techniques to implement, test, and tune cleanup scripts,
    and to ... Implementing a custom program for the deletion is also possible and ......
    Instead of running snapshots or event monitors against the whole database, you
    can ...

  17. Nodetime Docs: Documentation

    docs.nodetime.com/ - Cached
    Database Monitoring; CPU Profiling; Memory Profiling; Alerts; Team Features ...
    The profiler running within the application securely sends profiling data to the
    Nodetime ... Using metric API call, custom metrics can be sent to the Nodetime
    server and ... The snapshots are then analyzed by Nodetime and presented in a
    form, ...

  18. [PDF] 

    DBA Guide to Databases on VMware - White Paper

    www.vmware.com/files/.../DBA_Guide_to_Databases_on_VMware-WP.pdf - Cached
    Developing and Testing Databases on VMware . ..... storage vendors to automate
    the process of recovering from a disaster event .... Live snapshots can be used to
    instantly roll back a .... You can write custom scripts to involve the ..... Cisco, EMC
    and VMware to profile an OLTP workload against virtualized Oracle databases.

  19. Testing with Profiler Custom Events and Database Snapshots

    sqlsample.blogspot.com/2013/.../testing-with-profiler-custom-events-and. html
    4 Apr 2013 ... Testing with Profiler Custom Events and Database Snapshots. Weekly SQL
    Server newsletter with articles, forum posts, and blog posts via ...

  20. API Testing, Cloud Testing, SOA Testing - Parasoft

    www.parasoft.com/jsp/products/soatest.jsp - Cached
    During test execution, you can visualize and trace the intra-process events ...
    Moreover, a JSON Assertor tool enables configuration of custom assertions on ....
    and events flow through ESBs, message brokers, applications, databases, and
    more. ..... business application is being traced, and then establishes a snapshot
    of the ...

[SQL 2012] TDE database Encryption_state stuck on 2

[SQL 2012] TDE database Encryption_state stuck on 2


TDE database Encryption_state stuck on 2

Posted: 27 Aug 2013 02:01 AM PDT

Hello all,I am testing TDE in a lab environment for a proof of concept for roll out. I have 3 servers, a primary, a disaster recovery using AlwaysOn Availability Groups, and a report server subscriber using transaction replication from the primary. I set up the primary first using the scripts below:USE MASTERGO-- Create a Master KeyCREATE MASTER KEY ENCRYPTION BY Password = 'Password1';-- Backup the Master KeyBACKUP MASTER KEY TO FILE = 'Server_MasterKey' ENCRYPTION BY Password = 'Password2';-- Create Certificate Protected by Master KeyCREATE Certificate SQLCertTDEMaster WITH Subject = 'Certificate to protect TDE key';-- Backup the CertificateBACKUP Certificate SQLCertTDEMaster TO FILE = 'SQLCertTDEMaster_cer' WITH Private KEY ( FILE = 'SQLCertTDEMaster_key', ENCRYPTION BY Password = 'Password3' );Then I encrypted the Primary DB with the following scripts:USE TestDBGO-- Create a Database Encryption KeyCREATE DATABASE ENCRYPTION KEY WITH Algorithm = AES_128 ENCRYPTION BY Server Certificate SQLCertTDEMaster; -- Enable the Database for Encryption by TDEALTER DATABASE TestDB SET ENCRYPTION ON; When I run the following select statement (select * from sys.dm_database_encryption_keys ). It lists the database in an encryption_state = 2, with 0 percent_complete. It has been that way for 24 hours and the database is only 2GB.Any suggestions?Thanks,DK

Deadlocks trace flag

Posted: 26 Aug 2013 04:17 AM PDT

Hi,We were experiencing some deadlocks on our database so I activated the deadlocks trace flag with DBCC TRACEON(1204, -1) to log the deadlock information.Now that we've found the problem my question is if there's any problem, overhead, slower performance, .. on SQL Server if the flag is ON, since by default the flag if OFF..Thanks,Pedro

aggregation rules ( Max or Join )

Posted: 26 Aug 2013 09:06 AM PDT

Hi,I have a table like below, and I need to break it by period of time and split amt by respective period, so I'll get let say 3 row out from one input.I also want to keep rest of fields as is , how better achieve this?I can use just Max(col1) or include all Col1,2,3,4 on Group BY or ... something elsewhat guru do in this caseTxMario[code="other"]id timeIN timeOut Duration col1 col2 col3 col4---------------------------------------------------------1 6/2/13 8/15/13 64 days info1 info2 info3 info4 || \/ 1 NULL 6/30/13 28 days info1 info2 info3 info4 1 NULL 7/31/13 31 days info1 info2 info3 info4 1 NULL 8/15/13 15 days info1 info2 info3 info4[/code]

SSDT Problems for VS 2012

Posted: 26 Aug 2013 07:55 PM PDT

Hello guys I need urgent help here.I've installed ssdt sp 1 and it worked for about few days. Yesterday when I was about to create a new project, reporting services and integration services went missing. I tried repairing but didn't work.I decided to uninstall ssdt then installing it again, but no luck because the ssdt feature shows as installed . what can I do to solve this because when I click next it shows an error saying the features are already installed. What are the features that are under ssdt that I haven't uninstalled.Please I really need help, need to finish a project.Regards

Questions on Policy Based Management

Posted: 26 Aug 2013 05:38 AM PDT

Hello, I am a beginner DBA wanting to learn as much as I can from the DBA world. Please pardon me if my questions sound stupid. Can two different conditions be combined to be used on one policy? I am trying to check for all servers with versions 2008 R2 and above(Server Facet), and to verify that their Backup Compression is enabled(Server Configuration Facet). If the compression is disabled, I'd like to enable them. I haven't been able to find anything regards to combining two or more different conditions onto one policy. Is this even possible?Thanks

[SQL Server] Efficiently Reuse Gaps in an Identity Column

  1. Efficiently Reuse Gaps in an Identity Column - SQLTeam.com

    www.sqlteam.com/article/efficiently-reuse-gaps-in-an-identity-column - Similar
    9 Feb 2010 ... This article will demonstrate an efficient way to reuse gaps in an identity column.
    Please note that this is something you normally shouldn't be ...

  2. How to efficiently reuse gaps in identity column - SQLTeam.com

    weblogs.sqlteam.com/.../How-to-efficiently-reuse-gaps-in-identity-column. aspx - Cached
    10 Mar 2009 ... How to efficiently reuse gaps in identity column. Today I am going to talk about
    how to efficiently reuse identity values in a column, even if this is ...

  3. SQL Server Forums - Article: Efficiently Reuse Gaps in an Identity ...

    www.sqlteam.com/forums/topic.asp?TOPIC_ID=139584 - Cached
    Posted - 02/09/2010 : 08:50:18 Show Profile · Visit AskSQLTeam's Homepage ·
    Reply with Quote. This article will demonstrate an efficient way to reuse gaps in ...

  4. Efficiently Reuse Gaps in an Identity Column - SQLTeam ... - Google+

    https://plus.google.com/117791377540125472005/.../ShxUNrVsjwv - Cached
    23 Jan 2013 ... Efficiently Reuse Gaps in an Identity Column - SQLTeam.com #sqlserver #sql
    http://ow.ly/h3D6f.

  5. Efficiently Reuse Gaps in an Identity Column from sqlteam.com

    browse.feedreader.com/c/SQLTeam_com_Articles/14422587 - Cached
    9 Feb 2010 ... Efficiently Reuse Gaps in an Identity Column. This article will demonstrate an
    efficient way to reuse gaps in an identity column. Please note that ...

  6. How do I fill in identity gaps? - Ask SqlServerCentral

    ask.sqlservercentral.com/.../2844/how-do-i-fill-in-identity-gaps.html - Cached
    You can also read this blog post http://weblogs.sqlteam.com/peterl/archive/2009/
    03/10/How-to-efficiently-reuse-gaps-in-identity-column.aspx.

  7. Auto Identity Column in SQL Server : The Official Microsoft ASP ...

    forums.asp.net/t/prev/1793104 - Cached
    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=98389. http://www.sqlteam.
    com/article/efficiently-reuse-gaps-in-an-identity-column. Reply ...

  8. id column gets biger then integer ?! : The Official Microsoft ASP ...

    forums.asp.net/p/1629312/4195217.aspx/1?Re+id+column... - Cached
    for the gaps : http://weblogs.sqlteam.com/peterl/archive/2009/03/10/How-to-
    efficiently-reuse-gaps-in-identity-column.aspx. (but be aware of ...

  9. IDENTITY (Property) (Transact-SQL) - TechNet - Microsoft

    technet.microsoft.com/en-us/library/ms186775.aspx - Cached
    Creates an identity column in a table. ... Identity columns can be used for
    generating key values. ... This can result in gaps in the identity value upon insert.
    ... Reuse of values ? For a given identity property with specific seed/increment,
    the ...

  10. IDENTITY (Property) - TechNet - Microsoft

    social.technet.microsoft.com/Forums/en-US/.../identity-property - Cached
    17 Nov 2010 ... Efficiently Reuse Gaps in an Identity Column. http://www.sqlteam.com/article/
    efficiently-reuse-gaps-in-an-identity-column. bug again what you ...

  11. Primary key incremented even when insert fails. - MSDN - Microsoft

    social.msdn.microsoft.com/Forums/sqlserver/en.../action?... - Cached
    12 Aug 2009 ... http://weblogs.sqlteam.com/peterl/archive/2009/03/10/How-to-efficiently-reuse-
    gaps-in-identity-column.aspx. Thursday, August 13, 2009 1:55 ...

  12. The HOBT: The IDENTITY Property: A Much-Maligned Construct in ...

    thehobt.blogspot.com/2009/.../identity-property-much-maligned.html - Cached
    28 Jan 2009 ... Identity columns do not serialize inserts ? custom written ... Again, I understand
    that there are some applications for which gaps simply ... Or perhaps sequencing
    functions aren't quite as efficient in other RDBMS's. ... At the same time some
    developers demanded that we carefully re-use deleted IDs in tables ...

  13. SQL Server find first gap between ID key fields - Stack Overflow

    stackoverflow.com/.../sql-server-find-first-gap-between-id-key-fields - Cached
    That's why gap reusing would be wonderful for me. ... If you have a numeric ids,
    use identities and don't worry about gaps unles you have some specific ...
    GetFirstIdInGap_2 @table SYSNAME, @column SYSNAME AS BEGIN SET
    NOCOUNT ON; ... And I guess it is much more efficient than mine, isn't it?

  14. sql - How do I get first unused ID in the table? - Stack Overflow

    stackoverflow.com/.../how-do-i-get-first-unused-id-in-the-table - Cached - Similar
    If you have multiple users, the time gap between running Quassnoi's query ...
    Real world, you'd not want to go back and re-use an ID that had already been
    used, or skipped. ... So the right thing to do is to create a sequence or identity
    column in .... How to efficiently get a random row out of a massive table?

  15. Creating a table to store sequence numbers - Beyond Relational

    beyondrelational.com/.../sqlserver-quiz-general-2010-dinesh-asanka- populating-a-table-with-default-values.aspx - Cached
    20 Oct 2010 ... Peter explained this in http://www.sqlteam.com/article/efficiently-reuse-gaps-in-an
    -identity-column. Method 2: Maintaining an another table with ...

  16. Cannot define PRIMARY KEY constraint on nullable column in table

    sqlgeekspeak.blogspot.com/.../cannot-define-primary-key-constraint-on.html - Cached
    24 Jul 2009 ... Using REPLACE in an UPDATE statement. Efficiently Reuse Gaps in an Identity
    Column. Testing with Profiler Custom Events and Database ...

  17. MS SQL Server :: Filling The Gap Identity Columns - BigResource

    www.bigresource.com/MS_SQL-Filling-the-gap-Identity-columns-JtvHr8Jg. html - Cached
    I do not want to re-use the already used Identity value. I just want to ... gaps in the
    sequence etc. so would it be less efficient for me to calculate the field than ...

  18. Using generators to create unique row IDs - Firebird

    www.firebirdsql.org/manual/generatorguide-rowids.html - Cached - Similar
    Can you re-use generator values? ... will likely see gaps in a per-table ID
    sequence, since generator values are spread throughout all tables. With the ?one
    for ...

  19. FBI ? IT Strategic Plan, 2010-2015

    www.fbi.gov/about-us/itb/it-strategic-plan-2010-2015 - Cached - Similar
    Our customers, the agents and analysts in the field and headquarters, expect us
    to ... NGW will equip FBI users with new and efficient ways to communicate and
    .... Additional strategic gaps identified the need for additional digital forensics ...
    and for FBI's biometrics to evolve the legacy identity systems to a multi-modal ...

  20. Filling The Gap Identity Columns - Forum Array

    forumarray.com/filling-the-gap-identity-columns-821132 - Cached
    Filling The Gap Identity Columns. Hello, In my application I am using Identity
    columns. When some rows are deleted from table, This identity values are not
    filling ...

[SQL Server] Using REPLACE in an UPDATE statement

  1. Using REPLACE in an UPDATE statement - SQLTeam.com

    www.sqlteam.com/article/using-replace-in-an-update-statement - Similar
    31 Mar 2010 ... This article covers using the REPLACE function to selectively replace text inside
    a string in SQL Server. The REPLACE function is easy to use ...

  2. sql server 2005 - How to update a part of the string using replace ...

    stackoverflow.com/.../how-to-update-a-part-of-the-string-using-replace- function-in-tsql - Cached
    Hi I have a column of nvarchar(1000) type. I need to get rid of encode ... This will
    replace in the entire column. REPLACE(MyColumn, '&', '&').

  3. SQL Update Replace statement - Stack Overflow

    stackoverflow.com/questions/9525184/sql-update-replace-statement - Cached
    I need to write a sql update statement using REPLACE. The string looks like 'SE*
    88*000000001'. I need to replace the number between the two ...

  4. tsql - T-SQL String replace in Update - Stack Overflow

    stackoverflow.com/questions/4350482/t-sql-string-replace-in-update - Cached
    I need to update the values so that @domain2 should be replaced to @ ...
    Replacing a string using SQL Server Replace function - string has ...

  5. Using REPLACE in a UPDATE statement - Dev Shed

    forums.devshed.com/...sql.../using-replace-in-a-update-statement-479993. html - Cached - Similar
    Using REPLACE in a UPDATE statement- Firebird SQL Development. Visit Dev
    Shed to discuss Using REPLACE in a UPDATE statement.

  6. How to use REPLACE() within NTEXT columns in SQL Server ...

    www.sidesofmarch.com/.../how-to-use-replace-within-ntext-columns-in-sql- server/ - Cached - Similar
    27 Feb 2008 ... If you're using SQL 2000, you're out of luck, as NVARCHAR(max) first .... SQL
    UPDATE syntax with a replace on a column of type ntext, ...

  7. using a sql statement to do a string replace - Velocity Reviews

    www.velocityreviews.com/.../t62926-using-a-sql-statement-to-do-a-string- replace.html - Cached - Similar
    Is there an update statement that will let me go through the table an replace
    myServer with newServer in all the URLs (and leave the rest of the

  8. mysql - Why would an UPDATE SET REPLACE() statement match ...

    dba.stackexchange.com/.../why-would-an-update-set-replace-statement-match -rows-but-change-none-and-give - Cached
    Why would an UPDATE SET REPLACE() statement match rows, but change ... I'
    m seeking a certain string in a field and want to replace it with...

  9. SQL statement for replace/update a stringvalue in an Oracle table ...

    ask.sqlservercentral.com/.../sql-statement-for-replaceupdate-a-stringvalue-in-a .html - Cached
    0. Please use replace in Oracle, can be done in one update statement. ... we can
    help you better if you are using SQL Server. Any chance of ...

  10. Query to use update statement with Replace function in SQL Server ...

    www.aspdotnet-suresh.com/.../query-to-use-update-statement-with.html - Cached
    12 Jun 2012 ... In previous posts I explained Replace function example and Substring function
    example in SQL Server and many more articles relating to SQL ...

  11. Using REPLACE in an UPDATE statement - Ashish's Blog

    www.ashishblog.com/blog/using-replace-in-an-update-statement/
    30 Nov 2011 ... doing a search and replace in SQL is not radically difficult. You basically do an
    update using the replace() function.

  12. SQL UPDATE Statement - W3Schools

    www.w3schools.com/sql/sql_update.asp - Cached - Similar
    SQL UPDATE Example. Assume we wish to update the customer "Alfreds
    Futterkiste" with a new contact person and city. We use the following SQL
    statement...

  13. How to Find and Replace Text in MySQL Database using SQL ? My ...

    www.mydigitallife.info/how-to-find-and-replace-text-in-mysql-database- using-sql/ - Cached
    23 Apr 2007 ... How to Find and Replace Text in MySQL Database using SQL ... update
    client_table set company_name = replace(company_name, 'Old ...

  14. Replacing part of field data of table with another string using SQL

    www.plus2net.com/sql_tutorial/replace.php - Cached - Similar
    We know how to change data inside a field by using update command inside a
    query. Here we will try to learn how to replace part of the data without changing ...

  15. replace considerations for SQL

    pic.dhe.ibm.com/infocenter/rbdhelp/.../regl_data_sql_replace.html - Cached
    Use a get statement (with the forUpdate option) to retrieve the row. ...
    sqlStatement: An embedded SQL UPDATE statement to replace the implicit SQL
    UPDATE ...

  16. Running a SQL query to replace certain characters in a table ...

    www.webmasterworld.com/databases_sql_mysql/3216875.htm - Similar
    running a sql query to replace certain characters in a table. ... have a database
    that contains many characters and symbols we no longer want (or that we need
    to replace with something else). ... UPDATE Product_Descriptions

  17. update using replace function - Dbasupport.com

    www.dbasupport.com/.../showthread.php?26372-update-using-replace... - Cached
    I can use select replace (col_nm '-') from table to get the data without dashes but
    how can I use this ... How to use it in an update statement:

  18. OraFAQ Forum: SQL & PL/SQL ? update using replace function

    www.orafaq.com/forum/t/170809/0/ - Cached
    I have a table called email that contains a field called email. I have a few records
    in the table that contain example@hotmial.com and want to ...

  19. T-SQL: REPLACE and STUFF Function | A Blog for Developers

    blogs.learnnowonline.com/2013/04/.../t-sql-replace-and-stuff-function/ - Cached
    5 Apr 2013 ... This article shows how to use REPLACE and STUFF, some of the most ...
    REPLACE to create expressions in UPDATE statements that modify ...

  20. Find and Replace Column values in a Table using T-SQL | Journey ...

    dotnetolympians.wordpress.com/.../find-and-replace-column-values-in-a- table-using-t-sql/ - Cached - Similar
    20 Sep 2007 ... Find and Replace Column values in a Table using T-SQL ... Note: For beginner
    please make sure you know what an update statement does.

[SQL Server] Handling SQL Server Errors

  1. TRY...CATCH (Transact-SQL) - TechNet - Microsoft

    technet.microsoft.com/en-us/library/ms175976.aspx - Cached
    Implements error handling for Transact-SQL that is similar to the exception ...
    Errors that have a severity of 20 or higher that stop the SQL Server Database ...

  2. Error Handling in SQL Server ? a Background

    www.sommarskog.se/error-handling-I.html - Cached
    Error Handling in SQL 2000 ? a Background. An SQL text by Erland Sommarskog
    , SQL Server MVP. Last revision 2009-11-29.

  3. SQL SERVER ? 2005 ? Explanation of TRY?CATCH and ERROR ...

    blog.sqlauthority.com/.../sql-server-2005-explanation-of-trycatch-and-error- handling/ - Cached - Similar
    11 Apr 2007 ... SQL Server 2005 offers a more robust set of tools for handling errors than in
    previous versions of SQL Server. Deadlocks, which are virtually ...

  4. Handling SQL Server Errors in Nested Procedures - CODE Magazine

    www.code-magazine.com/Article.aspx?quickid=0305111 - Cached - Similar
    Handling SQL Server Errors in Nested Procedures. Basic error handling in SQL
    Server's programming language, Transact-SQL, is straightforward.But when you
     ...

  5. Using TRY?CATCH to Handle SQL Server Errors - About Databases

    databases.about.com/od/sqlserver/a/try_catch.htm - Cached - Similar
    The TRY?CATCH statement in Transact-SQL allows you to detect and handle
    error conditions gracefully within your database applications. This statement is ...

  6. Exception Handling in SQL Server Stored Procedure with TRY ...

    www.codeproject.com/.../Exception-Handling-in-SQL-Server-Stored- Procedure - Cached
    17 Jul 2013 ... Here, I will explain how to handle exceptions in SQL Server or exception
    handling in SQL Server for stored procedure by using try catch or error ...

  7. Overview of Error Handling in SQL Server 2005 - CodeProject

    www.codeproject.com/.../Overview-of-Error-Handling-in-SQL-Server-2005 - Cached
    1 Aug 2009 ... Overview of Error and Exception Handling in SQL Server 2005 using @@Error
    and Try-Catch; Author: Abhijit Jana; Updated: 1 Aug 2009; ...

  8. Handling SQL Server Errors - SQLTeam.com

    www.sqlteam.com/article/handling-sql-server-errors - Similar
    5 Apr 2010 ... This article covers the basics of TRY CATCH error handling in T-SQL introduced
    in SQL Server 2005. It includes the usage of common ...

  9. Error Handling in SQL Server Stored Procedures - Stack Overflow

    stackoverflow.com/.../error-handling-in-sql-server-stored-procedures - Cached
    I have a fairly complex SP (logic wise) with nested IF BEGIN END ... In order to be
    able to do a rollback , you need to do a begin transaction at the ...

  10. What is the best practice use of SQL Server T-SQL error handling ...

    stackoverflow.com/.../what-is-the-best-practice-use-of-sql-server-t-sql-error- handling - Cached - Similar
    We have a large application mainly written in SQL Server 7.0, where ... You
    should read this: http://www.sommarskog.se/error-handling-I.html.

  11. SQL Server Error Handling Tips

    www.mssqltips.com/sql-server-tip-category/79/error-handling/ - Cached
    Error Handling Tips. Raiserror. Using the NOWAIT option with the SQL Server
    RAISERROR statement. Throw. SQL Server 2012 Throw Statement Introduction.

  12. SQL Server 2008 error handling best practice - Anthony Bloesch's ...

    blogs.msdn.com/b/.../sql-server-error-handling-best-practice.aspx - Cached - Similar
    10 Mar 2009 ... Error handling in SQL Server 2008 needs careful implementation. The Microsoft ?
    Oslo? Repository's API has the further problem that we cannot ...

  13. SQL Server Error Handling Workbench - Simple Talk

    https://www.simple-talk.com/sql/...sql.../sql-server-error-handling-workbench / - Cached
    20 Feb 2007 ... Error handling in SQL Server breaks down into two very distinct situations: you're
    handling errors because you're in SQL Server 2005 or you're ...

  14. Error handling in sql server Part 56 - YouTube

    www.youtube.com/watch?v=VLDirfx_OQg6 Oct 2012 - 18 min - Uploaded by kudvenkat
    In this video we will lean about handling errors in sql server 2005, 2008 and 20012. Error ...
  15. Error handling in Database Backup using Sql Server ( error number ...

    stackoverflow.com/.../error-handling-in-database-backup-using-sql-server- error-number-3013 - Cached
    I am attempting a database backup using the following code : ... possible
    duplicate of How to handle multiple errors The BACKUP command is ...

  16. ODBC Sql Server error handling - Perl Monks

    www.perlmonks.org/?node_id=1049307 - Cached
    13 Aug 2013 ... I have an error handler in some Perl code which connects to SQL Server via
    ODBC. I have the following error handler defined.

  17. Tip (SQL Server): Error Handling in a Stored Procedure

    www.novicksoftware.com/.../tips-erorr-handling-in-a-stored-procedure.htm - Cached
    Tip (SQL Server): how to handle errors in a stored procedure.
  18. SQL Server 2012: Transact-SQL Error Handling - Online Training ...

    pluralsight.com/training/.../sqlserver-transact-sql-error-handling - Cached
    5 days ago ... SQL Server 2012: Transact-SQL Error Handling. Learn how to write Transact-
    SQL code that deals correctly with anticipated and unanticipated ...

  19. SQL Server Exception Handling by TRY?CATCH - Dot Net Tricks

    www.dotnet-tricks.com/.../sqlserver/O3P3120412-SQL-Server-Exception- Handling-by-TRY?CATCH.html - Cached
    25 Sep 2012 ... Like C#, SQL Server also has an exception model to handle exceptions and
    errors that occurs in T-SQL statements. To handle exception in Sql ...

  20. New Course: ?SQL Server 2012: Transact-SQL Error Handling? - Joe ...

    www.sqlskills.com/.../new-course-sql-server-2012-transact-sql-error-handling / - Cached
    5 days ago ... Today Pluralsight published my new course, ?SQL Server 2012: Transaction-SQL
    Error Handling?. As the title suggests, this course steps ...

[T-SQL] List of DataBase Name for associated Table used in Stored Procs.

[T-SQL] List of DataBase Name for associated Table used in Stored Procs.


List of DataBase Name for associated Table used in Stored Procs.

Posted: 27 Aug 2013 01:40 AM PDT

Hi,I want to list down the table name and which database it belongs which are used in the Stored Procedure.for exmple:if my Stored proc has two tables tbl1 and tbl2 and db2.tbl1 and db1.tbl2 then i want to list down those tables and Database name.Plz suggest thnx.

Comparing row counts and displaying results from greatest row count from a single table

Posted: 26 Aug 2013 01:47 PM PDT

insert into CallData ([800num], CompanyName) values ('8009874321', 'cars');insert into CallData ([800num], CompanyName) values ('8009874321', 'Newsales');insert into CallData ([800num], CompanyName) values ('8009874321', 'Newsales');insert into CallData ([800num], CompanyName) values ('8009870000', 'BenaSales');insert into CallData ([800num], CompanyName) values ('8009870000', 'BenaSales');insert into CallData ([800num], CompanyName) values ('8009870000', 'BenaSales2');insert into CallData ([800num], CompanyName) values ('8009870000', 'BenaSales2');Requirement 1: When the 800num matches I would like to return a single row, the row with the greatest row count. Requirement 2: If the 800num row count matches then return both rows.Results would be:8009874321 Newsales8009870000 BenaSales8009870000 BenaSales2

Error in creating function

Posted: 26 Aug 2013 07:15 PM PDT

Hi all,I have created a function but I am getting an error:Cannot perform alter on 'dbo.fn_CLCDeviationRequestDetails' because it is an incompatible object type.Here is the code below:Can you please suggest whats wrong in this?[code="sql"]Alter function [dbo].fn_CLCDeviationRequestDetails( @DevDateChanged DATETIME)RETURNS @temptable TABLE ( ProjectID INT, ProposalID INT, SolutionID INT, UnitID INT, DeviationNO nvarchar(128), IsRevisedRequest Bit, DeviationStatus INT, RequestDate DATETIME, RequestBy nvarchar(55), RepliedBy nvarchar(55) )ASBEGIN ;WITH CTE AS ( SELECT DISTINCT D.ProjectId, D.ProposalId, D.SolutionId, D.UnitId, D.RequestId, D.DeviationNo, I.IsRevisedRequest, D.DeviationStatus, D.RequestDate, D.RequestedBy, D.RepliedBy FROM DeviationRequestDetails D JOIN CLCProcessUnitDetailsCompany C ON C.ProjectID = D.ProjectId AND D.ProposalId = C.ProposalID AND C.SolutionID = D.SolutionId AND C.UnitID = D.UnitId JOIN DeviationRequestDetailsInstallation I ON C.ProjectID = I.ProjectId AND I.ProposalId = C.ProposalID AND C.SolutionID = I.SolutionId AND C.UnitID = I.UnitId WHERE C.DevDateChanged >= @DevDateChanged ) INSERT INTO @temptable SELECT TOP 1 C.ProjectId, C.ProposalId, C.SolutionId, C.UnitId, C.DeviationNo, C.IsRevisedRequest, C.DeviationStatus, C.RequestDate, C.RequestedBy, C.RepliedBy FROM CTE C ORDER BY C.RequestId DESC RETURN END[/code]

trigger is working for manual insert and not working for application isnerts

Posted: 26 Aug 2013 01:13 PM PDT

Hi , trigger is working for manual inserts .. andnot working as expected for application inserts .. please helpwhen there is a row from application , 3 columns are copying to new table and forth column is showing as null.alter trigger copytableon dbo.maintableafter insertasbeginset nocount ondeclare @id nchar(32)declare @type nchar(10)select @id=(id) from insertedselect @type=(type) from insertedif (@country='A)begininsert into dbo.w_table1 select * from insertedendelse if (@type='B')begininsert into dbo.table2 select * from maintable where id=@idendend

[SQL Server] Using Dynamic SQL in Stored Procedures

  1. Building Dynamic SQL In a Stored Procedure - CodeProject

    www.codeproject.com/.../Building-Dynamic-SQL-In-a-Stored-Procedure - Cached
    9 Oct 2007 ... A dynamic SQL in a stored procedure is a single Transact-SQL statement or a set
    of statements stored in a variable and executed using a SQL ...

  2. Using Dynamic SQL in Stored Procedures - SQLTeam.com

    www.sqlteam.com/article/using-dynamic-sql-in-stored-procedures
    7 Mar 2011 ... Dynamic SQL allows stored procedures to ?write? or dynamically generate their
    SQL statements. The most common use case for dynamic SQL ...

  3. Using Dynamic SQL Statements in Stored Procedures ...

    www.4guysfromrolla.com/webtech/102300-1.shtml - Cached - Similar
    23 Oct 2000 ... We've all likely created ASP pages that contain dynamic SQL statements within
    the ASP pages... SQL statements that are constructed on the fly, ...

  4. Using dynamic sql inside Oracle stored procedure - Database ...

    dba.stackexchange.com/.../using-dynamic-sql-inside-oracle-stored-procedure - Cached
    Assuming I have the following procedure. CREATE PROCEDURE foo ... The only
    reason why I might do that is if I needed to address an object ...

  5. SQL injection: Dynamic SQL within stored procedures - The What ...

    https://blogs.msdn.com/.../sql-injection-dynamic-sql-within-stored-procedures .aspx - Cached
    5 Sep 2007 ... SQL injection: Dynamic SQL within stored procedures ... This is in spite of using
    parameterized input in data access code to call the stored ...

  6. Dynamic SQL and stored procedure optimization - Stack Overflow

    stackoverflow.com/.../dynamic-sql-and-stored-procedure-optimization - Cached
    I've read that using Dynamic SQL in a stored procedure can hurt performance of
    your stored procedures. I guess the theory is that the store ...

  7. Coding Dynamic SQL Statements - Oracle Documentation

    docs.oracle.com/cd/B10500_01/appdev.920/.../adg09dyn.htm - Cached
    For example, dynamic SQL lets you create a procedure that operates on a table
    ... "A Dynamic SQL Scenario Using Native Dynamic SQL"; "Choosing Between
    Native ..... to native dynamic SQL inside PL/SQL stored procedures and functions.

  8. The curse and blessings of dynamic SQL

    www.sommarskog.se/dynamic_sql.html - Cached - Similar
    In the introduction, I presented various strategies for data-access for an
    application, and I said that ...

  9. Database - Advanced Stored Procedures Cursors and Dynamic SQL ...

    www.youtube.com/watch?v=B9zKi8H_IUs5 Feb 2013 - 13 min - Uploaded by Ron Eaglin
    A demonstration of using cursors and dynamic SQL to solve more complex reporting and ...
  10. Dynamic SQL

    www.benkotips.com/pages/DynamicSQL.aspx - Cached
    Dynamic SQL vs. Stored Procedures. The purist DBA view will point out that
    using stored procedures would be better because of the advantages they provide
    .

  11. Generate dynamic SQL statements in SQL Server - TechRepublic

    www.techrepublic.com/.../generate-dynamic-sql-statements-in-sql-server/ - Cached
    10 Mar 2008 ... While these stored procedures can be made to take into account every ....
    Although I am not a huge fan of using dynamic SQL statements, ...

  12. Execute Dynamic SQL commands in SQL Server - MSSQLTips.com

    www.mssqltips.com/sqlservertip/.../execute-dynamic-sql-commands-in-sql- server/ - Cached
    15 Oct 2012 ... Look into using dynamic SQL in your stored procedures by employing one of the
    three techniques above instead having the code generated ...

  13. Stored procedure - Wikipedia, the free encyclopedia

    en.wikipedia.org/wiki/Stored_procedure - Cached - Similar
    Also, some DBMSs will check the parameter's type. A stored procedure that in
    turn generates dynamic SQL using ...

  14. Speed Test: Dynamic SQL vs Stored Procedures :: BlackWasp ...

    www.blackwasp.co.uk/SpeedTestSqlSproc.aspx - Cached - Similar
    25 May 2008 ... Two options are dynamically-generate SQL statements and stored procedures.
    Does either ... By using the site you accept the cookie policy.

  15. Permissions With Dynamic SQL Within Stored Procedure : The ...

    forums.asp.net/t/next/1017556 - Cached
    I have a CLR stored procedure which does some dynamic SQL building based
    on values sent in via XML. It's a CLR stored procedure using ...

  16. Return out parameter value from stored procedure while using ...

    social.msdn.microsoft.com/.../sqlserver/.../action?...stored-procedure...using- dynamic-sql... - Cached
    10 Jan 2013 ... Hi,. I have designed a stored procedure to convert any document in varbinary
    format. I want to return varbinary value using out parameter in ...

  17. sp_executesql (Transact-SQL) - TechNet - Microsoft

    technet.microsoft.com/en-us/library/ms188001.aspx - Cached
    Database Engine Stored Procedures (Transact-SQL) .... The following example
    shows using sp_executesql to execute a dynamically built string. The example ...

  18. Using Dynamic Sql Stored Procedure | Teradata Developer Exchange

    forums.teradata.com/forum/.../using-dynamic-sql-stored-procedure - Cached - Similar
    Hi ,I am trying to write a dynamic sql using Stored procedure wherein I am using
    the underlying table as one of the input parameters.Below is the SP which I am ...

  19. Dynamic SQL Examples - SQLUSA

    sqlusa.com/bestpractices/training/scripts/dynamicsql/ - Cached
    Stored procedure with dynamic SQL WHILE loop. 4. Dynamic SQL with using
    parent's #temptable. 5. Dynamic SQL for dynamic PIVOT query. 6. Dynamic
    stored ...

  20. Dynamic SQL versus stored procedures - Sybase

    infocenter.sybase.com/help/topic/com.sybase.../X80489.htm - Cached - Similar
    Step 5: Deallocate the prepared statement Chapter 9: Using Directory Services.
    Chapter ... There are similarities between dynamic SQL and stored procedures:.

Search This Blog