Jump to content

Recommended Posts

Posted

I am attempting to back a SQL Server database via @compspec and OSQL.

When I do not use the @sw_hide syntax, the script runs, however I cannot determine why it will not run with @sw_hide.

This works:
run(@Comspec & " /c osql -E -Q ""backup database Master TO DISK = 'c:\backups\master.bak'")

This does not work, and does not produce an error message.
run(@Comspec & " /c osql -E -Q ""backup database Master TO DISK = 'c:\backups\master.bak'", @SW_HIDE)

Thanks

Posted

Thanks for the hint Jos!

This now the working code:

run(@Comspec & " /c osql -E -Q ""backup database Master TO DISK = 'c:\backups\master.bak'", "",@SW_HIDE)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...