Forum Replies Created

Viewing 15 posts - 1 through 15 (of 259 total)

  • RE: query for datetime

    is it correct ?

    SELECT * FROM tablename(nolock) where

    startdate >= Getdate() -6

    and enddate <= Getdate()

  • RE: detach db

    my script is working.


  • RE: script to Find current date modify table list

    thanks Jeff!!

  • RE: script to Find current date modify table list

    i need to find out the table names which are modified in last 24hrs.

  • RE: capture deleting job details

    Hi DB Experts,

    Any sugessions here please .

    Thanks in advance.

  • RE: grant statements to create userdefined role.

    I got for dbo(db_owner).


    Any help for below grant permissions.

    View Definition

    ? Execute all Function


  • RE: Role

    Thanks Gila!!

    Its fine now.

  • RE: Role

    actual syntax error in below script part.

    ---Add role to user

    DECLARE @command1 nvarchar(max)

    SELECT @command1 = 'IF ''?'' NOT IN(''master'', ''model'', ''msdb'', ''tempdb'')

    BEGIN USE ? EXEC sp_addrolemember 'SupportRole', 'SupportUser';



  • RE: Role

    yes, i tried removing 'GO' statements, still getting same syantax error.

  • RE: Role

    I am facing some syntax errors.Any suggestions here pls.

    Error : "Msg 102, Level 15, State 1, Line 21

    Incorrect syntax near 'SupportRole'. ".

    Below is the script .


    ---Create role in all dbs


  • RE: Role

    i created below script, but i need to run this script in all dbs at once...

    any suggessions here.

    CREATE ROLE [SupportRole]


    GRANT EXECUTE ON SCHEMA ::dbo TO [SupportRole]


  • RE: script to create role

    Actually I am struggling for a complete script

    Need a script to create a new role in all databases to cover SP creation/execution, any table data manipulation (insert, update,...

  • RE: full permission for a table


  • RE: script help

    Sorry Erikur !!!

    It is working as expected.

  • RE: script help

    it returns 21 rows.

Viewing 15 posts - 1 through 15 (of 259 total)