Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)

  • RE: Truncating and deleting all tables in a database

    Hi,

    I came across undocumented system stored procedure sp_MSForEachTable.

    Try this to delete all data from all tables in a given database.

    Please Test it.

    EXEC sp_MSForEachTable ‘ALTER TABLE ? NOCHECK CONSTRAINT ALL’

    EXEC...

  • RE: Tables list not displaying in object explorer

    Hi,

    Along with the permissions, please check if you have any filter settings and remove them.

    Right Click Tables -> Filter -> Remove Filter.

    Thanks

    Prem

  • RE: Select statetment takes forever to return data

    Hi ,

    Please check if you are opening an explicit transaction (i.e Begin Tran ) from the application.

    If for some reason before committing the transaction if there are errors encountered, how...

  • RE: Script to gett all permission in database

    Hi

    Please try this for scripting out the object permissions in a database.

    SELECT

    CASE WHEN perm.state != 'W' THEN perm.state_desc ELSE 'GRANT' END + SPACE(1) +

    perm.permission_name + SPACE(1) + 'ON...

  • RE: Query on Two Database with Different Users

    Hi,

    You can change the execution context of Stored Procedure using EXECUTE AS clause while creating Stored Procedures.

    Different options available are { CALLER | SELF | OWNER | 'user_name'...

  • RE: A Simple Approach to SQL Server 2005 Encryption

    Mike,

    Thanks for your Wonderful article on SQL Server Encryption.

    Please give me your inputs for the following scenario.

    We have log shipping set up between server A and Server B. Server...

  • RE: script logins and permissions in sql 2005

    Check this out.

    --Role Memberships'

    SELECT --rm.role_principal_id,

    'EXEC sp_addrolemember @rolename ='

    + SPACE(1) + QUOTENAME(USER_NAME(rm.role_principal_id), '''')

    + ', @membername =' + SPACE(1) + QUOTENAME(USER_NAME(rm.member_principal_id), '''') AS '--Role Memberships'

    FROMsys.database_role_members AS rm

    ORDER BY rm.role_principal_id

    --Object...

Viewing 7 posts - 1 through 7 (of 7 total)