Forum Replies Created

Viewing 15 posts - 76 through 90 (of 312 total)

  • RE: What are some really dumb things you could write in a SQL Query

    Attitude of some developers:
    /*I don't delete data, but when I do, I do it in prod with no Begin tran and no where clause. I mean who needs where clause? SQL Server...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • RE: Trigger isn't firing

    This did work. However, I have a question. Can someone explain why the @@ROWCOUNT = 0 statement was causing the problem with the trigger. I'm assuming since I have two...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • RE: Create function and SP

    grant CREATE procedure TO

    GO

    grant CREATE FUNCTION TO

    GO

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • RE: How to use sp_msforeachdb to create multiple table in multiple databases

    Thanks for your kind response but there are 35 tables and all these tables have to be created in 150+ DBs. I already generated the script from the QA environment...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • RE: DBCC CheckDB

    Any help on this?

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • RE: DBCC CheckDB

    anthony.green (10/2/2015)


    Something like this

    CREATE TABLE #Temp (ParentObject VARCHAR(100), Object VARCHAR(100), Field VARCHAR(100), Value VARCHAR(100))

    INSERT INTO #Temp

    EXECUTE ('DBCC DBINFO (''YourDBNameHere'') WITH TABLERESULTS')

    select

    distinct

    'Last Known Good DBCC CHECKDB',

    Value,

    datediff(day,convert(datetime,value),getdate()) AS...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • RE: Table insertion help

    Sorry for the confusion. I got it.

    Thanks!

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • RE: Job/Insert/LogFile Issue.

    So I am guessing it is not possible to track what data/value is getting inserted.

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • RE: Job/Insert/LogFile Issue.

    Eirikur Eiriksson (5/18/2015)You can tap into the activities with a trigger, extended events or even a trace, but that might in the end give you even a bigger head ache....

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • RE: Need some help with this query

    CKX (5/12/2015)


    You might want to try updating the statistics on that table prior to running that query.

    I say this because there is quite a difference between the estimated and actual...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • RE: Need some help with this query

    Lynn Pettis (5/11/2015)


    New Born DBA (5/11/2015)


    Lynn Pettis (5/11/2015)So the following (hopefully I mapped everything correctly using the VIEW definition) didn't help:

    CREATE NONCLUSTERED INDEX [Test] ON [dbo].[T387]

    (

    [C6] ASC

    )

    INCLUDE

    (

    ...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • RE: Need some help with this query

    Lynn Pettis (5/11/2015)So the following (hopefully I mapped everything correctly using the VIEW definition) didn't help:

    CREATE NONCLUSTERED INDEX [Test] ON [dbo].[T387]

    (

    [C6] ASC

    )

    INCLUDE

    (

    C1,

    ...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • RE: Need some help with this query

    Lynn Pettis (5/11/2015)Show us that index that you had created.

    ALTER TABLE [dbo].[T387] ADD PRIMARY KEY CLUSTERED

    (

    [C6] ASC

    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • RE: Need some help with this query

    CKX (5/11/2015)

    I think you may find this particular response from Lynn probably explains what is going on here.

    You can experiment by "including" the other columns in your index and see...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

  • RE: Need some help with this query

    My question is who says you can't drop and recreate the primary key constraint as a nonclustered index on C1?

    My Manager and people who have developed this application.

    Putting a clustered...

    "He who learns for the sake of haughtiness, dies ignorant. He who learns only to talk, rather than to act, dies a hyprocite. He who learns for the mere sake of debating, dies irreligious. He who learns only to accumulate wealth, dies an atheist. And he who learns for the sake of action, dies a mystic."[/i]

Viewing 15 posts - 76 through 90 (of 312 total)