Forum Replies Created

Viewing 15 posts - 3,286 through 3,300 (of 5,393 total)

  • RE: Compare the same field from 2 records in one table!

    Hi Deepak,

    you did a good job and posted a clear question. However, it would make things a lot easier for us if you also included the CREATE TABLE statement for...

    -- Gianluca Sartori

  • RE: Need Help

    Ram:) (4/1/2011)


    I have a different requirement and also i have done that but poor performance.

    You could also post what you have done so far and we could try to...

    -- Gianluca Sartori

  • RE: Need Help

    Could be something similar to this:

    DECLARE @sql nvarchar(4000)

    SET @sql = 'SELECT ''?'' AS DBNAME, COUNT(*) AS CNT FROM TableName WHERE SomeField = 1'

    DECLARE @results TABLE (

    DBNAME sysname,

    CNT int

    )

    INSERT @results

    EXEC sp_MSForEachDB...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    Stefan Krzywicki (3/31/2011)


    If they could both retire, that'd be one thing.

    I think I will have to wait 40 years more for that, at best. They keep raising the retirement minimum...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    LutzM (3/31/2011)


    But with all the spare time she would have, 3x the money probably won't be enough.

    I see that problems are the same all around the world.... 😀

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    Roy Ernest (3/31/2011)


    Out of Curiosity, isnt 90K US or 80K Euro the normal salary for a Sr. DBA?

    In Italy there's no such thing as Sr. DBA.

    The few places that...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    Stefan Krzywicki (3/31/2011)


    Gianluca Sartori (3/31/2011)


    Stefan Krzywicki (3/31/2011)


    Gianluca Sartori (3/31/2011)


    Wow, Roy! It takes me three years to earn that money!

    I would go, if I wasn't certain that my wife would kill...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    Stefan Krzywicki (3/31/2011)


    Gianluca Sartori (3/31/2011)


    Wow, Roy! It takes me three years to earn that money!

    I would go, if I wasn't certain that my wife would kill me.

    What does your wife...

    -- Gianluca Sartori

  • RE: Are the posted questions getting worse?

    Wow, Roy! It takes me three years to earn that money!

    I would go, if I wasn't certain that my wife would kill me.

    -- Gianluca Sartori

  • RE: change service account

    This query will return all your sysadmin users:

    SELECT SP.name, type_desc

    FROM master.sys.server_principals AS SP

    INNER JOIN master.sys.server_role_members SRM

    ON SP.principal_id = SRM.member_principal_id

    WHERE role_principal_id = (

    SELECT principal_id

    FROM master.sys.server_principals

    WHERE name = 'sysadmin'

    )

    AND is_disabled = 0

    -- Gianluca Sartori

  • RE: Disabling windows authentication for a database

    I'm afraid it won't work. At least it would be useless, because a sysadmin could always re-enable access for his account.

    -- Gianluca Sartori

  • RE: How to fix the Orphan Users

    From your private message:

    The Spartans (3/31/2011)


    Hi

    provide solution or not answer or not add your comment to my page

    The first entry for the google search I suggested points here:

    http://msdn.microsoft.com/en-us/library/ms175475.aspx

    Does this...

    -- Gianluca Sartori

  • RE: Disabling windows authentication for a database

    Exactly.

    -- Gianluca Sartori

  • RE: Disabling windows authentication for a database

    I don't think so. By default, members of the local administrators group are granted the sysadmin role, but it's quite a different thing.

    -- Gianluca Sartori

  • RE: Find unused databases or when last used in a instance?

    You could check index access statistics for the tables in the database:

    DECLARE @accessStats TABLE (

    db_name sysname,

    last_access datetime

    )

    INSERT @accessStats

    EXEC sp_msForEachDb '

    SELECT ''?'', MAX(last_access) AS last_access

    FROM (

    SELECT DB_NAME() AS db_name,

    MAX(last_user_seek) ...

    -- Gianluca Sartori

Viewing 15 posts - 3,286 through 3,300 (of 5,393 total)