Forum Replies Created

Viewing 15 posts - 241 through 255 (of 374 total)

  • RE: T-SQL

    Good question with perfect link.

    Thanks

  • RE: Script to find table sizes in a database

    gitmo (12/14/2010)


    In SQL 2008 I right click the database name in Object Explorer, select Reports / Standard Report / Disk Usage by Table.

    Oh great... Thanks. I don't know about this...

    Thanks

  • RE: Reorganize Index causing transaction log to fill

    magasvs (12/14/2010)


    I just set this today for one of our databases:

    1) Backup transaction log before indexes optimization

    2) Move database to the bulk-logged recovery mode

    3) Reorganize indexes

    4) Move database back to...

    Thanks

  • RE: Retrive assigned server level roles for particular login using T-SQL Query

    jmcmullen (12/14/2010)


    Something like this might do the trick for you..

    SELECT p.name,p.type_desc,r.name as [server role]

    FROM

    sys.server_principals r

    INNER JOIN sys.server_role_members m ON r.principal_id = m.role_principal_id

    INNER JOIN sys.server_principals p ON

    p.principal_id = m.member_principal_id

    order by...

    Thanks

  • RE: How to optimize this query ?

    Formatted query:

    SELECT 'IN' AS TRTYPE,

    I.INVOICENO AS TRID,

    I.INVOICEDATE AS TRDATE,

    ...

    Thanks

  • RE: Script to find table sizes in a database

    Andrew Watson-478275 (12/14/2010)


    If you don't mind using undocumented procedures, you can simplify it slightly by replacing all the loop stuff with:

    exec sp_msforeachtable @command1='insert #TempTable exec sp_spaceused ''?'''

    I also convert the...

    Thanks

  • RE: Printing Lengths

    Nice question. Learn something new today...

    Thanks

  • RE: Delete duplicate records in a table

    Sachin Nandanwar (12/7/2010)


    Jeff Moden (12/4/2010)


    Sachin Nandanwar (12/3/2010)


    Also it is a better idea to put the recover model to SIMPLE or else your log file will bloat.But make sure you take...

    Thanks

  • RE: LIKE and = Operators

    Nice question. thanks

    Thanks

  • RE: Nonclustered Indexes

    Straight forward question. Thanks

    Thanks

  • RE: Nonclustered Indexes

    ziangij (12/6/2010)


    Is the same number (16) applicable for a clustered index in SQL Server 2008 ?

    Checked the link, could not find if the above number is different in case of...

    Thanks

  • RE: sys.syscomments

    Ninja's_RGR'us (12/1/2010)


    Toreador (12/1/2010)


    The first and third answers are definitely correct (the first being a subset of the third), so I went for 'all of the above'. A good question, spoiled...

    Thanks

  • RE: Help required to generate dynamic query

    kpyap001 (12/1/2010)


    Not sure on your requirement.

    I had prepared the sample given, and below is what I can think of to produce the output given.

    ;with dy_tb as (

    select distinct tableName from...

    Thanks

  • RE: sp_tables

    Very straight forward question. Thanks.

    Thanks

  • RE: Can the Secondary files in a database be taken offline?

    One more point: Links are also perfect 🙂

    Thanks

Viewing 15 posts - 241 through 255 (of 374 total)