Comments (5)
Paging @ClaudioESSilva here's the existing issue for your cmdlet!
from dbatools.
The subset of tests is repetead for each method of copy (Local, remote (UNC-PATHS) and full-remote (PSSession))
I have copy&pasted so you can check each one individualy.
Any other test that came to your mind please fell free. We can talk first if you want.
- Run scritps local (same host than sql server instance) - This should use robocopy to copy the files, if not exists use Start-BitsTransfer
- Only one file - Execute command only with -SqlServer and -Databases one database parameters. Choose one file, choose destination. Will do an DBCC CHECKDB after database come online.
- Two files - Execute command only with -SqlServer and -Databases one database parameters. Choose one file, choose destination (with this method you only choose on destination for all files).
- Two files with -CheckFileHash switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will take longer than the example before because for each file choosed an hash will be generated for source and destination files to garantee that is the same.
- Two files with -CheckFileHash switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will take longer than the example before because for each file choosed an hash will be generated for source and destination files to garantee that is the same.
- Two files with -NoDbccCheckDb switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will less time than the examples before because no checkdb will be run on database.
- Only one file with -DeleteSourceFiles switch - Execute command only with -SqlServer, one database and -DeleteSourceFiles. When all the process ends, the files no longer be available on the source.
- Generate csv with file structure - Execute command with -SqlServer, one database, -ExportDatabaseStructure and -OutFile ".csv" - Will generate a csv file with all database structure. A message must appear at the end saying which command you should run after change de csv in order to move files.
- Generate csv with file structure - Execute command with -SqlServer, one database, -MoveFromCSV and -InputFile ".csv" - Will move all files specified on csv with valid "DestinationFolderPath" values.
- try to move a file with a size bigger than the existing freespace on the destination drive/lun
- try to move a file to an folder where you don't have access
- Run scritps remotely (outside the host of sql server instance) - This should use robocopy to copy the files, if not exists use Start-BitsTransfer
- Only one file - Execute command only with -SqlServer and -Databases one database parameters. Choose one file, choose destination. This should use Start-BitsTransfer to copy the files and do an DBCC CHECKDB after database came online.
- Two files - Execute command only with -SqlServer and -Databases one database parameters. Choose one file, choose destination (with this method you only choose on destination for all files).
- Two files with -CheckFileHash switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will take longer than the example before because for each file choosed an hash will be generated for source and destination files to garantee that is the same.
- Two files with -CheckFileHash switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will take longer than the example before because for each file choosed an hash will be generated for source and destination files to garantee that is the same.
- Two files with -NoDbccCheckDb switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will less time than the examples before because no checkdb will be run on database.
- Only one file with -DeleteSourceFiles switch - Execute command only with -SqlServer, one database and -DeleteSourceFiles. When all the process ends, the files no longer be available on the source.
- Generate csv with file structure - Execute command with -SqlServer, one database, -ExportDatabaseStructure and -OutFile ".csv" - Will generate a csv file with all database structure. A message must appear at the end saying which command you should run after change de csv in order to move files.
- Generate csv with file structure - Execute command with -SqlServer, one database, -MoveFromCSV and -InputFile ".csv" - Will move all files specified on csv with valid "DestinationFolderPath" values.
- try to move a file with a size bigger than the existing freespace on the destination drive/lun
- try to move a file to an folder where you don't have access
- Run scritps full-remote (outside the host of sql server instance and without access to UNC paths) - This should use robocopy to copy the files, but only if PSSession is available to be used
- Only one file - Execute command only with -SqlServer and -Databases one database parameters. Choose one file, choose destination. This should use Start-BitsTransfer to copy the files and do an DBCC CHECKDB after database came online.
- Two files - Execute command only with -SqlServer and -Databases one database parameters. Choose one file, choose destination (with this method you only choose on destination for all files).
- Two files with -CheckFileHash switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will take longer than the example before because for each file choosed an hash will be generated for source and destination files to garantee that is the same.
- Two files with -CheckFileHash switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will take longer than the example before because for each file choosed an hash will be generated for source and destination files to garantee that is the same.
- Two files with -NoDbccCheckDb switch - Execute command only with -SqlServer, one database and -CheckFileHash. This will less time than the examples before because no checkdb will be run on database.
- Only one file with -DeleteSourceFiles switch - Execute command only with -SqlServer, one database and -DeleteSourceFiles. When all the process ends, the files no longer be available on the source.
- Generate csv with file structure - Execute command with -SqlServer, one database, -ExportDatabaseStructure and -OutFile ".csv" - Will generate a csv file with all database structure. A message must appear at the end saying which command you should run after change de csv in order to move files.
- Generate csv with file structure - Execute command with -SqlServer, one database, -MoveFromCSV and -InputFile ".csv" - Will move all files specified on csv with valid "DestinationFolderPath" values.
- try to move a file with a size bigger than the existing freespace on the destination drive/lun
- try to move a file to an folder where you don't have access
from dbatools.
This is beautiful @ClaudioESSilva, exactly what I wanted 👍 :)
from dbatools.
@ClaudioESSilva : sorry for pinging but isn't this a "duplicate" of #250 ?
from dbatools.
@niphlod no problem. Yes this one was the first. Those tests can be copied later for a new PR.
For now this can be closed.
from dbatools.
Related Issues (20)
- Copy-DbaAgentJob is not migration jobs with operators even though they exist HOT 3
- Versions of included sqlserver DLLs both newer and older than sqlserver module.
- Get-DbaDatabase significantly slower on SQL2022 vs. SQL2016 when executing user is sysadmin HOT 26
- Error copying sql permissions with Copy-DbaLogin when the database user and server user does not match. HOT 4
- Disconnect-DbaInstance does not actually disconnect HOT 2
- Install-DbaInstance Feature MachineLearning(SQL_INST_MR) is not supported on SQL2022 HOT 1
- Copy-DbaDbTableData - Error when attempting to copy tables with a column of datatype Geography
- Backup-DbaDbCertificate and Restore-DbaDbCertificate issue with certificate naming HOT 1
- Copy-DbaLogin / Get-DbaLogin - does not seem to work properly when using array called $sqllogins as input HOT 1
- Get-DbaBackupInformation is not reading values for "IsCopyOnly" attribute
- `Restore-DbaDatabase` - Add `WITH RESTART`
- Install-DbaDarlingData - Missing Procedures and old domain in documentation HOT 5
- Is there a dbatools command that helps you translate an offending thread in the OS to a spid? HOT 1
- Add-DbaRegServer: Settings "Encrypt Connection" and "Trust server certificate" not saved when using CMS
- `Add-DbaDbRoleMember` - Unable to Add Role HOT 4
- Invoke-DbaDbLogShipping error: [Backup-DbaDatabase] SQL Server cannot check if \\HOST\Share\some\url exists. You can try disabling this check with -IgnoreFileChecks HOT 1
- Restore-DbaDatabase fails when using server-SMO as SqlInstance HOT 3
- Test-DbaSpn returns nothing when one of multiple instances does not have tcp/ip enabled on Windows Server 2022
- Copy-DbaAgentJob and Copy-DbaAgentServer using -Force results in loss of links from alerts to jobs HOT 1
- Test-DbaLastBackup fails if backup was mirrored based on Get-DbaBackupHistory output AND transaction logs are included in the restore test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbatools.