Coder Social home page Coder Social logo

dataplat / docs Goto Github PK

View Code? Open in Web Editor NEW
15.0 7.0 12.0 87.9 MB

The documentation for dbatools module. Issues with command doc and bugs should be reported to dataplat/dbatools.

Home Page: https://docs.dbatools.io

HTML 99.94% CSS 0.01% PowerShell 0.05%
dbatools powershell

docs's Introduction

docs

Files for docs.dbatools.io

docs's People

Contributors

niphlod avatar potatoqualitee avatar wsmelton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

Update-DbaInstance - Limit Downloads to Language and Processor

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.

Expand Search Criteria

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

405 Not Allowed

FYI: I cannot subscribe to your newsletter on your website: 405 Not Allowed

Thank you

Second search is affected by the results of the first search

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:

  • Click on a Database tag in a tag cloud
  • Select all symbols in a search string
  • Start typing “instance” in an attempt to show “Connect-DbaInstance” help
  • Instead you see only Get-DbaInstanceTrigger

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.

better help rendering

Managed to do this

image

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"

image

Syntax at the bottom?

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.

Website Commands documentation - Syntax layout


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


Summary of new feature

  • Clear/concise description of what the problem is that the new feature can solve.

Proposed technical details (if applicable)

  • e.g. Blog post reference that shows example code or functionality

Latest version of dbatools as of writing

  • Please provide the latest released version of dbatools module.

google alert - Mobile Usability issues detected

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:

  • Viewport not set
  • Clickable elements too close together
  • Text too small to read

Which tool do you use to generate the docs ?

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 :)

Write HTML to disk

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

Initial load

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.

[Bug] - [Documentation] Long powershell commands get truncated when rendered on the dbatools.io documentation website

Report

Long powershell commands get truncated when rendered on the dbatools.io documentation website:

Example from Write-DbaDataTable:
image

In the code we're OK:

https://github.com/sqlcollaborative/dbatools/blob/1640c64014ec5546eaa10396d7d5149993557339/functions/Write-DbaDbTableData.ps1#L109-L115

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.

Build update

Hi, when is the build index updated - updates was released last week but not in build index yet.

Import-DbaCsv ParseErrorAction

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.

DataMasking category issue on page https://dbatools.io/commands/

Verified issue does not already exist?

Yes

What error did you receive?

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.

Steps to Reproduce

N/A

Are you running the latest release?

Yes

Other details or mentions

N/A

What PowerShell host was used when producing this error

Windows PowerShell (powershell.exe)

PowerShell Host Version

N/A

SQL Server Edition and Build number

N/A

"Commands" link in header points to wrong URL

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/

Top bar nav

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

case sensitivity

can we make it case insensitive? that way, we can support /functions/get-dbalowercase redirect in addition to dbatools.io/Get-ProperCase

Copy-DbaDbTableData hangs SELECT query when script is 'cancelled' in Powershell ISE

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.

Issue with Piping Get-DBADatabase to Backup-DBADatabase and using -ReplaceInName

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.

CmdLets not exported

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.

Resolving to Fully-qualified Name in Update-DbaInstance

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?

Set-DbaDbCompatibility does not Support SQL Server 2022 "Version160" yet

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".

Issue with Copy-DbaDatabase with 3 destination servers

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.