Forum Replies Created

Viewing 15 posts - 8,566 through 8,580 (of 9,641 total)

  • RE: Avoid Trigger!! If you are a good DB developer!!

    GilaMonster (5/21/2008)


    They extend the length of transactions, the increase the chance of deadlocks, and most people don't know how to write one. 😉

    Do whatever you need to in the proc...

  • RE: number of locks

    You can also use the @query parameter of sp_send_dbmail which sends the results of the query as the body of the message or as an attachment. This lists the...

  • RE: ISNULL

    In this query:

    [font="Courier New"]SELECT

        ManagerID,

        NationalIDNumber

    FROM

        HumanResources.Employee

    WHERE

        nationalidnumber = '295847284'

    [/font]

    You get an index seek.

    In this query which looks very similar:

    [font="Courier New"]SELECT

        ManagerID,

        NationalIDNumber

    FROM

        HumanResources.Employee

    WHERE

        nationalidnumber = 295847284

    [/font]

    You get an index scan because the NationalIDNumber is NVarchar...

  • RE: Backup error on network drive

    Philip Barry (5/21/2008)


    I'm not 100% sure of what is wrong with your setup, although I bet there are people on here who could tell you.

    What we do is to create...

  • RE: ISNULL

    I have never really noticed an issue when using IsNull in the select list, but using any function against a column in a join or where clause can cause performance...

  • RE: Backup error on network drive

    My best guess is permissions. I believe the Maintenance plan job is running under the SQL Server Agent service account.

    Another issue is using a mapped drive. I have...

  • RE: Hourly Transaction Log backup vs daily Log truncate + fileshrink

    Most including MS recommend against using the TRUNCATE_ONLY option. In fact it is being deprecated.

    Your backup strategy needs to be defined based on the business needs the database meets....

  • RE: exporting specific fields from my MS SQL database tables

    Have you looked at using SSIS to do this? You could define a package that contains all the selects and text file destinations and use package variables for your...

  • RE: No Index on Tables

    IMO there should at the least be 1 clustered index on every table. In a datawarehouse situation, which you mention you are in, there should be indexes on every...

  • RE: SQL Server 2005 TCP Settings

    Have you verifies that the SQL Browser Service is running? Did you add the port to the connection string?

  • RE: A Worthwhile Goal

    I think getting consistency should be the first goal, then as you state you can start teaching how to write better code. IMO, there is nothing worse than going...

  • RE: Impersonation in an Execute As statement

    Simon Facer (5/15/2008)


    (4) "Explicitly Defined" in terms of executing as a Login or User - Execute As Login gives you impersonation at the server level, i.e. all databases, Execute As...

  • RE: Impersonation in an Execute As statement

    I don't disagree with the answers other than that to me Explicity means the programmer has to say REVERT and without a REVERT I would consider it to be implicit...

  • RE: a script to write "Update" Statements

    Okay the first solution assumed you had no records with the correct model try this:

    [font="Courier New"]-- create test tables

    CREATE TABLE #source

       (

       client INT,

       model INT

       )

    CREATE UNIQUE INDEX ux_source...

  • RE: SQL Server 2005 TCP Settings

    When you change the port in SQL 2005 you have to start the SQL Server Browser Service or you need to specify the port in your application's connection string.

Viewing 15 posts - 8,566 through 8,580 (of 9,641 total)