Forum Replies Created

Viewing 11 posts - 16 through 27 (of 27 total)

  • Reply To: Script out permissions - Azure SQL database

    select rp.name as database_role, mp.name as database_user
    from sys.database_role_members drm
    join sys.database_principals rp on (drm.role_principal_id = rp.principal_id)
    join sys.database_principals mp on (drm.member_principal_id = mp.principal_id)
    order by rp.name

    --...

    Tung Dang
    Azure and SQL Server DBA Contractor / Consultant
    SQL Brainbox - SQL Server Monitoring Tool

  • Reply To: Finding out Total Disk Space in TSQL

    Try this for SQL Server 2008 R2 and above

    The sizes will convert to mb, gb, or tb depending on how large the drive is.

    The query only works with one server. ...

    • This reply was modified 5 years, 9 months ago by SQL BrainBox.
    • This reply was modified 5 years, 9 months ago by SQL BrainBox.
    • This reply was modified 5 years, 9 months ago by SQL BrainBox.
    • This reply was modified 5 years, 9 months ago by SQL BrainBox.

    Tung Dang
    Azure and SQL Server DBA Contractor / Consultant
    SQL Brainbox - SQL Server Monitoring Tool

  • Reply To: Mobile DBA Tool for Android

    Those are very good points.  I too have taken safety precautions given the fact that my account has access to everything.  For the app, I use my windows credentials to...

    Tung Dang
    Azure and SQL Server DBA Contractor / Consultant
    SQL Brainbox - SQL Server Monitoring Tool

  • RE: Finding out Total Disk Space in TSQL

    the easiest method is to use...

    "select...from sys.master_files mf cross apply sys.dm_os_volume_stats (mf.database_id, mf_file_id) vs"

    then CREATE a read-only DUMMY DATABASE that has data files across all drives....

    Tung Dang
    Azure and SQL Server DBA Contractor / Consultant
    SQL Brainbox - SQL Server Monitoring Tool

  • RE: Transaction Log Too Big and Won't Shrink

    I had the same problem. I ran an index defrag process but the transaction log became full and the defrag process errored out. The transaction log remained large.

    Tung Dang
    Azure and SQL Server DBA Contractor / Consultant
    SQL Brainbox - SQL Server Monitoring Tool

  • RE: Change to Dimension ID and Fact ID from Varchar to Int. Need to sort in Analysis Services

    Yup deleting and adding again to the dimension usage tab solved my issue.  I'm now able to save and process everything.

    So a little background.  I have a date...

    Tung Dang
    Azure and SQL Server DBA Contractor / Consultant
    SQL Brainbox - SQL Server Monitoring Tool

  • RE: SSRS - Creating subscription is slow

    I encountered the same issue with a report subscription where the developer created a separate dataset for each report parameter.  There were close to 2 dozen parameters.

    Creating or...

    Tung Dang
    Azure and SQL Server DBA Contractor / Consultant
    SQL Brainbox - SQL Server Monitoring Tool

  • RE: Remove a Filegroup

    I actually found an easy solution to this fix since I had the same issue.

    I was trying to remove the filegroup [fg_LMeterDetail_13] but got the "cannot be removed because it...

    Tung Dang
    Azure and SQL Server DBA Contractor / Consultant
    SQL Brainbox - SQL Server Monitoring Tool

  • RE: [Microsoft][ODBC SQL Server Driver][SQL Server]Could not find stored procedure

    simple fix exec [database name].[object owner].[stored procedure name]

    you must reference the database name in either the connection string or command text. Otherwise SQL will use the default database which...

    Tung Dang
    Azure and SQL Server DBA Contractor / Consultant
    SQL Brainbox - SQL Server Monitoring Tool

  • RE: Unable to determine the last time a table was updated in SQL Srvr Mgmt Studio

    Yes, that error occurs when your database collation is set to case sensitive.

    Msg 208, Level 16, State 1, Line 1

    Invalid object name 'SYS.DM_DB_INDEX_USAGE_STATS'.

    To resolve, just CTRL+SHIFT+L to convert the text...

    Tung Dang
    Azure and SQL Server DBA Contractor / Consultant
    SQL Brainbox - SQL Server Monitoring Tool

  • RE: Product table design for custom products

    Thank you all. I really appreciate your feedback and will work with your suggestions.

    Tung Dang
    Azure and SQL Server DBA Contractor / Consultant
    SQL Brainbox - SQL Server Monitoring Tool

Viewing 11 posts - 16 through 27 (of 27 total)