Forum Replies Created

Viewing 15 posts - 4,336 through 4,350 (of 7,191 total)

  • RE: "sa" not able to access view while another user can!

    Are you able to post the view definition, please?

    John

  • RE: Differential backup failure

    Lavanya

    Please will you post the script, then?

    By the way, you can see what differential backups have completed with this query:

    SELECT

    r.DBName

    ,r.type

    ,r.BackupStart

    ,s.backup_finish_date

    ,s.backup_size

    ,m.physical_device_name

    FROM (SELECT

    d.name AS DBName

    ,b.type

    ,b.backup_start_date AS BackupStart

    FROM master.dbo.sysdatabases d

    LEFT JOIN msdb.dbo.backupset b

    ON...

  • RE: Differential backup failure

    vliet (10/2/2012)


    But you cannot start any type of backup during any (other or same) type of backup.

    That's not entirely true. You can run a log backup while the...

  • RE: TSQL Case Statement help

    I think I would create a lookup table, like this:

    CREATE TABLE CodeActions (

    Code char(4)

    ,TheActionvarchar(12)

    )

    INSERT INTO CodeActions (Code,TheAction)

    VALUES

    ('ISSP','Install'),

    ('IECO','Install'),

    ('IECM','Install'),

    ('IESP','Install'),

    ('IEHD','Install'),

    ('ISHD','Install'),

    ('FRSI','Install'),

    ('SB42','Service Call'),

    ('SB4W','Service Call'),

    ('HD42','Service Call'),

    ('HD4W','Service Call'),

    ('SA2C','Service Call'),

    ('SA2W','Service Call'),

    ('HD2C','Service Call'),

    ('HD2W','Service Call'),

    ('SNCO','Service Call')

    That way you don't have...

  • RE: Differential backup failure

    Is this being done as part of a maintenance plan? My guess is that something other than the backup itself is failing - possibly the removal of an old...

  • RE: Index Evaluation

    Lowering the fill factor can improve write performance by reducing the number of page splits. It can impair read performance by requiring a larger number of pages to be...

  • RE: Stairway to XML: Level 1 - Introduction to XML

    Thanks SQLBalls, Jon and ACinKC. That makes it a little clearer. I guess as a beginner I'll understand more as I read more and more of the articles...

  • RE: Moving master LDF to log drive

    SkyBox (9/18/2012)


    Everything restarted and moved ok. Is there anything I am missing or any "gotcha's" with this move? Will this affect upgrades or service packs?

    No, it won't affect...

  • RE: Stairway to XML: Level 1 - Introduction to XML

    Thanks for the beginner's guide, Rob - very much needed in my case! I have one question on this. Are elements and attributes functionally equivalent? For example,...

  • RE: how to get current year

    Of course you do, because it's not 2004 any more.

    Here's a third alternative:

    WITH Totals(Yr, TotalDueForTheCurrentYear, OverAllTotalDue) AS (

    SELECT

    YEAR(OrderDate)

    ,SUM(TotalDue) OVER(PARTITION BY YEAR(OrderDate))

    ,SUM(TotalDue) OVER(PARTITION BY 1)

    FROM

    #TestBasedOnYear

    )

    SELECT DISTINCT

    TotalDueForTheCurrentYear

    ,OverAllTotalDue

    FROM

    Totals

    WHERE

    Yr = 2004

    John

  • RE: Using a variable in an execute SQL Task issue

    Dunnes2002 (9/18/2012)


    it throws an error saying nulls cannot be inserted into the table. Which i take it means that @no is not being set correctly.

    Not necessarily. Please will you...

  • RE: how to drop duplicate unique constraints with different names but on same column

    You might get misleading results if you have constraints that span more than one column:

    CREATE TABLE #john2 (col1 int, col2 int, col3 int)

    ALTER TABLE #john2 ADD CONSTRAINT UQ_John2 UNIQUE (col1,col2)

    ALTER...

  • RE: how to drop duplicate unique constraints with different names but on same column

    bala.a (9/14/2012)


    How it's possible to have more than one unique constraint on the same column? Obvoiusly, you should get an error, if I understand your question right....

    Could you please provide...

  • RE: how to drop duplicate unique constraints with different names but on same column

    I don't have a script that does exactly what you require, but you could try querying the INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE view.

    John

  • RE: invalid object name 'sys.identity_columns'

    Gail, thanks for pointing that out.

    Shobha, have you considered using DBCC CHECKIDENT?

    John

Viewing 15 posts - 4,336 through 4,350 (of 7,191 total)