Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy-SqlDatabase add switch for setting source offline #1169

Closed
1 task
Digger937 opened this issue May 9, 2017 · 0 comments
Closed
1 task

Copy-SqlDatabase add switch for setting source offline #1169

Digger937 opened this issue May 9, 2017 · 0 comments
Assignees
Labels

Comments

@Digger937
Copy link

Is this:

Just place "x" to indicate selection (e.g. "[x]")

  • [x ] feature
  • bug:

This is NOT a bug, but a feature request. For the Copy-SqlDatabase command, it would be nice if I could set source offline after copying it. Not a huge deal but just a little extra option that would be nice. Otherwise, I have to say the dbatools are awesome! They really are becoming an asset that I use!

System Details

  • Operating system name and version:
  • Output from $PSVersionTable:
Evaluate $PSVersionTable in PowerShell and paste the output here
  • Output of dbatools version:
Evaluate (Get-Module dbatools -ListAvailable).Version and paste output here
  • SQL Server version for source/target

Steps to Reproduce

Example:

  1. Created database/object/files/etc
  2. Run Command:
Get-DbaFunction -SqlInstance MyServer | Get-DbaSomeOtherFunction -FilterSwitch -StelleEyedMissileMan
  1. Received following error
Get-DbaFunction: parameter StelleEyedMissileMan cannot be bound due to electrical system failure

Action Results

Example:

The launch of Apollo 12 failed due to electrical system failure

Expected Results

Example:

  1. Created database/object/files/etc
  2. Run Command:
Get-DbaFunction -SqlInstance MyServer | Get-DbaSomeOtherFunction -FilterSwitch -StelleEyedMissileMan
  1. Receive following output (if applicable)
Apollo 12 launch successful, no electrical system failure found

Attached screen shots/console output

  • Use of Start-Transcript can help collection of console output and exceptions
  • Provide screen shots of the output from your console if available.

Import - Attach dbatools logs

  • Latest release of dbatools now includes a messaging and logging system. You can find this information via the Get-DbaConfig function. Use of the Set-DbaConfig controls the configuration of the system.
  • Ensure this returns true: (Get-DbaConfig -Name errorlogenabled).value
  • Locate the log path for the error logs using this command: (Get-DbaConfig -Name dbatoollogpath).Value
  • Attach the latest xml and log files found in the path shown.
@Stuart-Moore Stuart-Moore self-assigned this May 11, 2017
@wsmelton wsmelton changed the title Copy-SqlDatabase Feature Copy-SqlDatabase add switch for setting source offline May 11, 2017
@ghost ghost removed the in progress label May 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants