Files for docs.dbatools.io
dataplat / docs Goto Github PK
View Code? Open in Web Editor NEWThe documentation for dbatools module. Issues with command doc and bugs should be reported to dataplat/dbatools.
Home Page: https://docs.dbatools.io
The documentation for dbatools module. Issues with command doc and bugs should be reported to dataplat/dbatools.
Home Page: https://docs.dbatools.io
Request - Only download some specified language and processor (x86/x64) editions for updates.
Optionally - Allow multiple languages and/or processors.
When using "Update-DbaInstance -Download" the number of updates downloaded (and the consequent space used) can be limited by only downloading, say, x64-enu. Otherwise, the space used is quite substantial.
I thought the docs would be wrong for this command since the last example is broken i the webpage
https://docs.dbatools.io/#New-DbaAvailabilityGroup
but it is good in the docs. Something inserted a line in the json or the website and it's no longer copyable.
is there any way to...
Hello Niph 🐬
Can we have two lil radio buttons or something that has search the command name by default but also the option to search all text?
thankssss
Contractions are being counted as code quotes. Is there a way to detect common words vs code?
FYI: I cannot subscribe to your newsletter on your website: 405 Not Allowed
Thank you
It seems that the list of available commands is affected by previous search results. This bug occurs when you already searched for something, but then want to re-start the search. Reproduce steps:
if the first search result haven’t had any matches with that new string, it would’ve switched to ft: search, which is not what I wanted in the first place.
Managed to do this
but the problem/constraint is that multiline statements in the "commandline" of the help are not supported by CBH. So either we go for this representation and go correct the CBH on the few commands that have multiline examples, or we keep it the way they are right now...
e.g. of "mangled multiline"
When I visit https://dbatools.io/
and choose "Docs"
I am taken to https://docs.dbatools.io/
I enter "Set-DbatoolsConfig" into the "search" edit control
which takes me nowhere.
Just verifying why syntax is at the bottom of the page? Can it be at the top, after the description at least so we don't have to scroll to the bottom of the page.
Please let us know how to handle command output within the help:
https://docs.dbatools.io/#Test-DbaConnection
https://docs.dbatools.io/#Invoke-DbaPfRelog
https://docs.dbatools.io/#Backup-DbaDbMasterKey
name: Feature request/idea 💣
about: Suggest a new feature or enhancement
I think the layout of the Syntax parameters list on the website commands documenation might be easier to read and find parameters if it was formatted similar to how MS Docs has their Powershell Cmdlet documentation. Example from SqlServer Module:
https://docs.microsoft.com/en-us/powershell/module/sqlserver/Add-RoleMember?view=sqlserver-ps
I was unable to find where the are listed in the docs, even with a site-specific Google search. If they are there, it might be helpful to include a link to those in the main docs page. Thanks.
Search Console has identified that your site is affected by 3 new Mobile Usability related issues. This means that Mobile Usability may be negatively affected in Google Search results. We encourage you to fix these issues.
Top new issues found, ordered by number of affected pages:
Hi Everyone, https://docs.dbatools.io/#Test-DbaDiskAlignment isn't rendering.
https://docs.dbatools.io/#Get-DbaCmsRegServer
instead of scrolling, just have syntax always expanded to the lines it needs
The synopsis, description, syntax and example sections appear to be corrupted in Select-DbaObject.html
Sometimes, it just doesnt line break when it should
https://docs.dbatools.io/#Export-DbaInstance
https://docs.dbatools.io/#Start-DbaMigration
@potatoqualitee or @niphlod what is the external JSON file for?
I can set up an action that will pull the index file when we release it to the master branch. Just wondering what that external file is for where the version is being bumped on each release.
Hello,
I have developed a big bunch of modules at my job for internal use and I would love to generate a similar doc as the one of dbatools.
I expect that you use a tool for that, is it available somewhere ? (can't find a ref in this repo)
Thanks :)
PowerShell natively leaves no space, which feels cramped. Can you please add a space when it doesn't exist?
See https://docs.dbatools.io/#Export-DbaScript example 5 for more info
Examples on this page https://docs.dbatools.io/#Dismount-DbaDatabase refer to different commands.
Is it possible to make a tool to write it to disk instead of using javascript? javascript doesn't index as well and I find it to be less usable than regular static HTML.
thank you
I'll be adding this to the commands that cant support linux like the Performance Monitoring commands. The code is if (Test-NotWindows) { return }
Can that be added to json and thus docs somehow?
OKay so when you first go to a page like
https://docs.dbatools.io/#Start-DbaMigration
It takes a second (or longer on slower connections) to load that JSON, then the documentation appears. Totally understandable.
Would it be possible to detect if there is a #Command-Name
, and show some sort of loading bar under the "Welcome" portion in the middle of the page?
If a person just loads docs.dbatools.io with no specific command name, no need to show loading bar.
Long powershell commands get truncated when rendered on the dbatools.io documentation website:
Example from Write-DbaDataTable:
In the code we're OK:
I'm happy to submit a PR to add a line break, but I'm not sure how I can validate that my addition of a backtick and line feed on line 113 will be rendered by the utility which renders our powershell inline help.
Hi, when is the build index updated - updates was released last week but not in build index yet.
I love the sidebar for https://dbachecks.readthedocs.io/en/latest/
where we can add other relevant shortcuts like the various related posts (Cms, Xevents, DA, etc)
can we have something similar? merci
Hello.
I am trying to use Import-DbaCsv to import large files, and it works great most of the time. But we sometimes get malformed data... I passed the -ParseErrorAction 'AdvanceToNextLine' argument however I am still getting an error and it stops my script.
WARNING: [19:25:55][Import-DbaCsv] Failure | Input string was not in a correct format.
This is my whole command line FWIW.
Import-DbaCsv -path $tmpfileName -SqlInstance $currentServer -ParseErrorAction 'AdvanceToNextLine' -Database 'PWSETL' -Schema $split[0] -Table $split[1] -Truncate -Delimiter '|' -NullValue '' -NoProgress
I am using dbatools v1.1.117.
If I understand the help file correctly, passing the -ParseErrorAction should cause Import-DbaCsv to ignore any individual errors and keep loading, either it doesn't work or I misunderstood. If I misunderstood, can we possibly add such an ability? The files I process are large, usually multi-gigabyte, losing a few rows due to malformed data isn't a big deal.
Yes
This is not a dbatools module code issue, but on page https://dbatools.io/commands/, in the Categories section, "Data Masking" appears twice. One occurrence has a valid anchor, the other does not.
N/A
Yes
N/A
Windows PowerShell (powershell.exe)
N/A
N/A
The "commands" link at the top of the page points to https://dbatools.io/functions/
which results in a 404 error.
I believe it should be pointing to https://dbatools.io/commands/
download
get started
commands
docs
team
subscribe
find us
build reference
bill of health
can we remove bill of health, subscribe, & docs
and perhaps call build reference
just build ref
or sql build ref
can we make it case insensitive? that way, we can support /functions/get-dbalowercase redirect in addition to dbatools.io/Get-ProperCase
The old page used to link to the GitHub command. Can this be done again?
Want to see the source code for this command? Check out Test-DbaSpn on GitHub.
I am not sure if this is intentional behavior, a problem that can't be fixed, or a bug.. but when using the Copy-DbaDbTableData I ran into an issue where I was moving data from a production secondary down to our dev environment for a developer and hit the 'stop' button in my Powershell ISE before the first batch could complete. I found out 10 days later that the "SELECT *" on the table was still running and I am not sure if it was because of the size of the table or because their was no longer any communication to my ISE occurring. This ultimately caused version store to fill-up on the secondary and eventually tempdb.
Expected behavior would be to kill the query once the ISE shows everything as being stopped.
This can easily be repeated in a test environment.
as discussed
The formatting for New-DbaDatabase example 5 is incorrect, the code block only surrounds the first line.
Navigate to https://docs.dbatools.io/New-DbaDatabase and see Example 5
servername is returning an empty string.
Example:
Get-DBADatabase -SqlInstance MySQLInstance -RecoveryModel Full | Backup-DbaDatabase -Path V:\servername\Backup\dbname\backuptype -FilePath dbname-backuptype-timestamp.bak -ReplaceInName -CompressBackup -Checksum -type Full -OutputScriptOnly | Out-File C:\DBA\BackupDatabasesFullRM.sql
Getting message:
SQL Server cannot check if V:\\Backup\<databasename>\Full exists. You can try disabling this check with -IgnoreFileChecks
When I run this without the Get-DBADatabase being piped to it (and adding -SqlInstance to the command), it works properly.
we have two real C# cmdlets, Select-DbaObject and Set-DbatoolsConfig, which export in cmdletstoexport in the psd1 instead of functionstoexport. Anyway, they aren't being added to the json.
We have some servers where the owners have created SPN entries that are interfering with Update-DbaInstance. WINRM errors result. We think it is due to the function appending the domain name to the servers we pass to it. Can this be turned off or made to be an option?
and add that in
When viewing documentation, the sidebar links href is set to "#" which prevents ctrl + clicking to open in a new tab correctly.
This happens on any of the subpages within the docs.
Example page: https://docs.dbatools.io/Repair-DbaDbOrphanUser
Error Message:
Set-DbaDbCompatibility : Cannot validate argument on parameter 'TargetCompatibility'. The argument "16" does not belong to the set "9,10,11,12,13,14,15" specified
by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.
At line:1 char:117
Need to use SqlServer Module 22.0.30-preview to implement workaround:
`$dbs = get-DbaDatabase -sqlInstance $instance -database $db
$dbs.Compatibility = "Version160"
$dbs.Alter()
`
Further, get-dbaDbCompatibility returns Compatibility as 160 instead of "Version160".
when using Copy-DbaDatabase to copy a database to 3 destination servers the third server errors as it adds the backup devices twice then complains that the number is wrong.
here is the debug output...
DEBUG: [15:04:07][Connect-DbaInstance] Starting process block
DEBUG: [15:04:07][Connect-DbaInstance] Starting loop for 'DestinationSQLServer3': ComputerName = 'DestinationSQLServer3', InstanceName = 'MSSQLSERVER', IsLocalHost = 'False', Type = 'Default'
DEBUG: [15:04:07][Connect-DbaInstance] Input Object was anything else, so not full smo and we have to go on and build one
DEBUG: [15:04:07][Connect-DbaInstance] isConnectionString is false
DEBUG: [15:04:08][Connect-DbaInstance] will build server with instance.FullSmoName = 'DestinationSQLServer3'
DEBUG: [15:04:08][Connect-DbaInstance] server was build with server.Name = 'DestinationSQLServer3'
DEBUG: [15:04:09][Connect-DbaInstance] AppendConnectionString was not set
DEBUG: [15:04:09][Connect-DbaInstance] We try to connect
DEBUG: [15:04:10][Connect-DbaInstance] We try connection with server.ConnectionContext.SqlConnectionObject.Open()
DEBUG: [15:04:13][Connect-DbaInstance] Connect was successful
DEBUG: [15:04:15][Connect-DbaInstance] no SqlConnectionOnly, so we go on
DEBUG: [15:04:15][Connect-DbaInstance] we don't have server.ComputerName
DEBUG: [15:04:15][Connect-DbaInstance] but we would have instance.ComputerName = 'DestinationSQLServer3'
DEBUG: [15:04:15][Connect-DbaInstance] we try to use server.NetName for computername
DEBUG: [15:04:16][Connect-DbaInstance] Ok, computername = server.NetName = 'DestinationSQLServer3'
DEBUG: [15:04:16][Connect-DbaInstance] We add IsAzure = 'False', ComputerName = computername = 'DestinationSQLServer3', DbaInstanceName = instance.InstanceName = 'MSSQLSERVER', NetPort = instance.Port = '1433', ConnectedAs = server.Connec
tionContext.TrueLogin = 'SomeAD\SomeAdminDude'
DEBUG: [15:04:16][Connect-DbaInstance] We return server with server.Name = 'DestinationSQLServer3'
DEBUG: [15:04:17][Copy-DbaDatabase] Performing SMO version check.
DEBUG: [15:04:17][Copy-DbaDatabase] Checking to ensure the source isn't the same as the destination.
DEBUG: [15:04:17][Copy-DbaDatabase] Checking to ensure server is not SQL Server 7 or below.
DEBUG: [15:04:17][Copy-DbaDatabase] Checking to ensure detach/attach is not attempted on SQL Server 2000.
DEBUG: [15:04:17][Copy-DbaDatabase] Checking to ensure SQL Server 2000 migration isn't directly attempted to SQL Server 2012.
DEBUG: [15:04:18][Copy-DbaDatabase] Warning if migration from 2005 to 2012 and above and attach/detach is used.
DEBUG: [15:04:18][Copy-DbaDatabase] Ensuring destination server version is equal to or greater than source.
DEBUG: [15:04:18][Copy-DbaDatabase] Writing warning about filestream being enabled.
DEBUG: [15:04:18][Copy-DbaDatabase] Building database list.
DEBUG: [15:04:18][Copy-DbaDatabase] Performing count.
DEBUG: [15:04:19][Copy-DbaDatabase] Building file structure inventory for 1 databases.
DEBUG: [15:04:19][Get-SqlFileStructure] SomeDatabaseBeingCopied
DEBUG: [15:04:19][Copy-DbaDatabase]
######### Database: SomeDatabaseBeingCopied #########
DEBUG: [15:04:19][Copy-DbaDatabase] Checking for accessibility.
DEBUG: [15:04:20][Copy-DbaDatabase] Checking Availability Group status.
DEBUG: [15:04:21][Copy-DbaDatabase] Started: 03/02/2021 15:04:19.
DEBUG: [15:04:21][Copy-DbaDatabase] Reuse = False.
DEBUG: [15:04:21][Restore-DbaDatabase] Starting
DEBUG: [15:04:22][Restore-DbaDatabase] Parameters bound: SqlInstance, DatabaseName, ReuseSourceFolderStructure, NoRecovery, TrustDbBackupHistory, WithReplace, Continue, EnableException, ReplaceDbNameInFile, AzureCredential, KeepCD
C, KeepReplication
DEBUG: [15:04:22][Restore-DbaDatabase] Changing statement timeout to infinity
DEBUG: [15:04:22][Restore-DbaDatabase] ParameterSet = Restore
DEBUG: [15:04:22][Restore-DbaDatabase] Trust Database Backup History Set
DEBUG: [15:04:23][Restore-DbaDatabase] ParameterSet = Restore
DEBUG: [15:04:24][Restore-DbaDatabase] Trust Database Backup History Set
DEBUG: [15:04:25][Restore-DbaDatabase] Processing DatabaseName - SomeDatabaseBeingCopied
DEBUG: [15:04:25][Format-DbaBackupInformation] Starting
DEBUG: [15:04:26][Format-DbaBackupInformation] String passed in for DB rename
DEBUG: [15:04:26][Format-DbaBackupInformation] New DbName (String) = SomeDatabaseBeingCopied
DEBUG: [15:04:26][Format-DbaBackupInformation] 1 PhysicalName = G:\Data\SomeDatabaseBeingCopied.mdf
DEBUG: [15:04:27][Format-DbaBackupInformation] PhysicalName = G:\Data\SomeDatabaseBeingCopied.mdf
DEBUG: [15:04:27][Format-DbaBackupInformation] 1 PhysicalName = L:\Logs\SomeDatabaseBeingCopied_log.ldf
DEBUG: [15:04:28][Format-DbaBackupInformation] PhysicalName = L:\Logs\SomeDatabaseBeingCopied_log.ldf
DEBUG: [15:04:29][Format-DbaBackupInformation] New DbName (String) = SomeDatabaseBeingCopied
DEBUG: [15:04:29][Format-DbaBackupInformation] 1 PhysicalName = G:\Data\SomeDatabaseBeingCopied.mdf
DEBUG: [15:04:29][Format-DbaBackupInformation] PhysicalName = G:\Data\SomeDatabaseBeingCopied.mdf
DEBUG: [15:04:31][Format-DbaBackupInformation] 1 PhysicalName = L:\Logs\SomeDatabaseBeingCopied_log.ldf
DEBUG: [15:04:31][Format-DbaBackupInformation] PhysicalName = L:\Logs\SomeDatabaseBeingCopied_log.ldf
DEBUG: [15:04:31][Select-DbaBackupInformation] Filtering by DatabaseName
DEBUG: [15:04:32][Select-DbaBackupInformation] processing diffs
DEBUG: [15:04:32][Select-DbaBackupInformation] Found LogBaseLsn: 1067000005312000001 and FirstRecoveryForkID:
DEBUG: [15:04:33][Restore-DbaDatabase] VerifyOnly = False
DEBUG: [15:04:33][Get-DbaDbPhysicalFile] SELECT DB_NAME(database_id) AS Name, physical_name AS PhysicalName FROM sys.master_files
DEBUG: [15:04:34][Test-DbaBackupInformation] Testing restore for SomeDatabaseBeingCopied
DEBUG: [15:04:35][Test-DbaBackupInformation] VerifyOnly = False
DEBUG: [15:04:37][Test-DbaLsnChain] Testing LSN Chain
DEBUG: [15:04:38][Test-DbaLsnChain] Testing LSN Chain - Type Type
DEBUG: [15:04:38][Test-DbaLsnChain] Passed LSN Chain checks
DEBUG: [15:04:39][Test-DbaBackupInformation] Marking SomeDatabaseBeingCopied as verified
DEBUG: [15:04:39][Restore-DbaDatabase] SomeDatabaseBeingCopied passed testing
DEBUG: [15:04:40][Restore-DbaDatabase] Passing in to restore
DEBUG: [15:04:41][Invoke-DbaAdvancedRestore] Killing processes on SomeDatabaseBeingCopied
DEBUG: [15:04:42][Invoke-DbaAdvancedRestore] WithReplace = True
DEBUG: [15:04:43][Invoke-DbaAdvancedRestore] restore action = Database
DEBUG: [15:04:43][Invoke-DbaAdvancedRestore] Adding device \SomeHost\SomeRootDirectory\SourceSQLServer\SomeDatabaseBeingCopied\COPY\SomeDatabaseBeingCopied_202103021501-1-of-3.bak
DEBUG: [15:04:44][Invoke-DbaAdvancedRestore] Adding device \SomeHost\SomeRootDirectory\SourceSQLServer\SomeDatabaseBeingCopied\COPY\SomeDatabaseBeingCopied_202103021501-2-of-3.bak
DEBUG: [15:04:44][Invoke-DbaAdvancedRestore] Adding device \SomeHost\SomeRootDirectory\SourceSQLServer\SomeDatabaseBeingCopied\COPY\SomeDatabaseBeingCopied_202103021501-3-of-3.bak
DEBUG: [15:04:44][Invoke-DbaAdvancedRestore] Adding device \SomeHost\SomeRootDirectory\SourceSQLServer\SomeDatabaseBeingCopied\COPY\SomeDatabaseBeingCopied_202103021501-1-of-3.bak
DEBUG: [15:04:45][Invoke-DbaAdvancedRestore] Adding device \SomeHost\SomeRootDirectory\SourceSQLServer\SomeDatabaseBeingCopied\COPY\SomeDatabaseBeingCopied_202103021501-2-of-3.bak
DEBUG: [15:04:46][Invoke-DbaAdvancedRestore] Adding device \SomeHost\SomeRootDirectory\SourceSQLServer\SomeDatabaseBeingCopied\COPY\SomeDatabaseBeingCopied_202103021501-3-of-3.bak
DEBUG: [15:04:46][Invoke-DbaAdvancedRestore] Performing restore action
DEBUG: [15:04:46][Invoke-DbaAdvancedRestore] Failed, Closing Server connection
DEBUG: [15:04:46][Invoke-DbaAdvancedRestore] Failed to restore db SomeDatabaseBeingCopied, stopping | System.Data.SqlClient.SqlError: The media loaded on "\SomeHost\SomeRootDirectory\SourceSQLServer\SomeDatabaseBeingCopied\COPY\SomeDatabaseBeingCopied_202103021501-1-of-3.bak" is f
ormatted to support 3 media families, but 6 media families are expected according to the backup device specification.
DEBUG: [15:04:47][Invoke-DbaAdvancedRestore] Succeeded, Closing Server connection
DEBUG: [15:04:47][Restore-DbaDatabase] Failure | System.Data.SqlClient.SqlError: The media loaded on "\SomeHost\SomeRootDirectory\SourceSQLServer\SomeDatabaseBeingCopied\COPY\SomeDatabaseBeingCopied_202103021501-1-of-3.bak" is formatted to support 3 media families, but
6 media families are expected according to the backup device specification.
WARNING: [15:05:04][Copy-DbaDatabase] Failure attempting to restore SomeDatabaseBeingCopied to DestinationSQLServer3 | System.Data.SqlClient.SqlError: The media loaded on "\SomeHost\SomeRootDirectory\SourceSQLServer\SomeDatabaseBeingCopied\COPY\SomeDatabaseBeingCopied_202103021501-1-of-3.
bak" is formatted to support 3 media families, but 6 media families are expected according to the backup device specification.
DEBUG: [15:05:04][Copy-DbaDatabase] Failure attempting to restore SomeDatabaseBeingCopied to DestinationSQLServer3 | System.Data.SqlClient.SqlError: The media loaded on "\SomeHost\SomeRootDirectory\SourceSQLServer\SomeDatabaseBeingCopied\COPY\SomeDatabaseBeingCopied_202103021501-1-of-3.ba
k" is formatted to support 3 media families, but 6 media families are expected according to the backup device specification.
DEBUG: [15:05:12][Copy-DbaDatabase] Successfully restored SomeDatabaseBeingCopied to DestinationSQLServer3.
DateTime : 2021-03-02 15:04:19.650
SourceServer : SourceSQLServer
DestinationServer : DestinationSQLServer3
Name : SomeDatabaseBeingCopied
Type : Database
Status : Successful
Notes :
DEBUG: [15:05:13][Copy-DbaDatabase] Finished: 03/02/2021 15:05:12.
DEBUG: [15:05:17][Copy-DbaDatabase] Elapsed time: 00:00:53.
Docs page is 1.1.114 vs latest version which is 1.1.122 .
https://docs.dbatools.io/#Invoke-Sqlcmd2
Being that we can't modify the documentation on this command to our standard can it just be removed from our documentation? I mean it is an external command we simply include in the module for convenience.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.