Forum Replies Created

Viewing 15 posts - 4,321 through 4,335 (of 7,187 total)

  • RE: DENY DROP TABLE & ALTER TABLE Error

    Not DENY ALTER SCHEMA. Something like DENY ALTER ON SCHEMA::SchemaName. You'd have to check out the exact syntax yourself if that isn't quite correct.

    John

  • RE: DENY DROP TABLE & ALTER TABLE Error

    Welsh Corgi (10/11/2012)


    Could you please expand on your comments about DELETE and the ON Clause?

    Yes - try DENYing DELETE or ALTER on the schema that the tables are in.

    Deny permission...

  • RE: DENY DROP TABLE & ALTER TABLE Error

    A couple of things to try:

    (1) Use DELETE instead of DROP

    (2) Add an ON clause (although I don't know why that would be needed for DENY DELETE/ALTER but not for...

  • RE: Restoring SQL Server 2008 R2 Database

    It's not possible in a single operation. You could restore the database then create new files in the restored database. Can I ask why you need to do...

  • RE: stairway to T-SQL DML Level 10: Changing Data with the UPDATE Statement

    Mr.DiGi (10/10/2012)


    I like "less magic" - you can update table alias:

    UPDATE

    P

    SET

    ProductName = N.ProductName,

    Price = N.Price

    FROM

    dbo.Product P

    INNER JOIN

    dbo.New_Prices N ON...

  • RE: how to execute batch of scripts by one DTS or SSIS

    Use a Foreach Loop Container in SSIS. Your requirements are quite vague, so please try that and post again if there's anything in particular that you don't understand.

    John

  • RE: Differential backup failure

    Lavanyasri (10/8/2012)


    hi Guys,

    Can i have any update on this...........

    Please will you post the script, then?

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

    John

  • RE: Default Constraint

    Vijay

    Please post your full INSERT statement and the DDL for your table.

    Thanks

    John

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

    It might help you to understand what's going on if you run the following just before selecting from the view:

    SELECT SUSER_NAME()

    SELECT USER_NAME()

    It doesn't matter whether you're a sysadmin, a database...

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

    OK, understood. Does the definition contain "user_name", "user_id", "sys.database_principals", "current_user" or anything else that suggests it's returning data according to the user running the query?

    John

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

    I can't say whether it's correct or not because I can't see your data. But since one user gets one result set and another user gets a different one,...

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

Viewing 15 posts - 4,321 through 4,335 (of 7,187 total)