Jump to content

Search the Community

Showing results for tags 'sqlcmd utility'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I am trying to write a script to backup a SQL DB that I need to automate. I have been told that it can be done in a batch file with the syntax below but the parameters may need changed. SQLCMD -S.\SQLSERVER -E -Q "BACKUP DATABASE DBName TO DISK='C:\DBBackup\DBBackup.bak' WITH INIT" -oC:\DBBackup\DBBackupLog.log So I tried writing the below which executes with a Exit Code = 0 but never actually does the backup. #RequireAdmin $Server = ".\SQLServer" $DBName = "TheDBName" $Destination = "C:\DBBackup\DBBackup.bak" $LogFile = "C:\DBBackup\DBBackup.Log" Run("sqlcmd -S " & $Server & ' -E ' & ' -Q "BACKUP DATABASE' & $DBName 'TO DISK=' & $Destination) MsgBox(4096, "", "Done") It also never displays the MsgBox. I have tried Run, RunWait, ShellExecute, and ShellExecuteWait. Can someone please tell me what I am missing? Thank you
×
×
  • Create New...