Forum Replies Created

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

  • RE: Create function and SP

    grant CREATE procedure TO

    GO

    grant CREATE FUNCTION TO

    GO

  • 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...

  • RE: DBCC CheckDB

    Any help on this?

  • 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...

  • RE: Table insertion help

    Sorry for the confusion. I got it.

    Thanks!

  • RE: Job/Insert/LogFile Issue.

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

  • 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....

  • 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...

  • 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

    (

    ...

  • 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,

    ...

  • 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...

  • 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...

  • 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...

  • RE: Need some help with this query

    J Livingston SQL (5/8/2015)


    New Born DBA (5/6/2015)


    I have this query which runs every night pulls 800,000+ records. I just wanted to know if there is a way to make it...

  • RE: Need some help with this query

    Long story short is that the clustered index on C1 column cannot be dropped. I was going to suggest maybe using C1 column in where clause, but I don't think...

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