Forum Replies Created

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

  • RE: DBCC Emptyfile

    Thanks Steve. That was my next step. I was going to do some testing, to see what happens, but you beat me to it.  I just thought if someone already...

  • RE: DBCC Emptyfile

    I have sized most of the others, to the anticipated size.  The largest one, that I am trying to reduce, has no free space, and if I use the emptyfile,...

  • RE: DBCC Emptyfile

    I have multiple file groups, primary, data, index, and lob. I am trying to balance the data across all of the individual files. I am not doing the primary just yet....

  • RE: Disk space report

    Attached is what I use. The attached code executes from a SQL Server agent job. You will need to add your own instance list processing, and update the smtp...

  • RE: SSMS 2016 13.0.1601.5 Update Not Complete

    Is there a firewall or proxy issue? I have never had an issue with SSMS, but other products I try to update are blocked by our internal security.

    Leonard

  • RE: Set variable values when calling a SQL Agent Job from PowerShell

    As far as I know, there isn't any way to do this. There are some job variables, within the SQL job that can be used, but probably not what...

  • RE: Powershell help

    Yep. That's how I collect data to monitor db growth, get missing backups etc. No need to execute SQL in many cases.

    Leonard

  • RE: Powershell help

    As I said, this was just some code I threw together, and didn't test. You need to add this:

    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null

    That command is actually being deprecated, but I don't like...

  • RE: Powershell help

    Attached is code that I use to get missing backups, and email the report. This may give you some additional ideas.

    Leonard

  • RE: Powershell help

    I don't have exactly what you need, but I have several pieces of code, that do some of these. For example, I have code to format to html and send...

  • RE: Need help to get Disk I/O of all disks in a server

    Here is some code I use. Hope it helps.

    $Drives = Get-WmiObject -Class Win32_Volume -ComputerName $InstanceName -Filter "DriveType = 3" | Where-Object { $_.Name -notlike "\\?\Volume*" } | Sort-Object Caption ...

  • RE: Easy piece of code just doesnt bloody work.

    ok, I'm an idiot. Just realized the ask was for adding a role, not a member to a role. That one we didn't automate.

  • RE: Easy piece of code just doesnt bloody work.

    There are a lot of reasons for doing this through Powershell. We have automated quite a few things, including creating or duplicating a login. Being able to do add...

  • RE: please help me to send mail to all as below script output

    Here is the code that I use to get failed backups. You may be able to use it:

    CLEAR

    [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') | out-null

    # Initialize Arrays

    $InstanceList = @()

    $NoBackups = @()

    # Don't check...

  • RE: Always On, as a DR site.

    Thanks all, for the responses. I think we are starting to stray from my original questions, into general DR. We are trying to understand how we can, or if...

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