Out-QLRSqlCsv
From PowerGUI Wiki
Exports data in CSV format.
Contents |
Syntax
Out-QLRSqlCsv [[-Output] [<String>]] [-InputObject [<PSObject[]>]] [-Full] [<CommonParameters>]
Detailed Description
The Out-QLRSqlCsv cmdlet exports input objects into CSV format. The valid input objects are: - DML/DDL command descriptors - Log record descriptors - Transaction descriptors
Related Commands
- New-QLRSqlReader
- Get-QLRSqlCommand
- Get-QLRSqlRecord
- Get-QLRSqlTransaction
- Out-QLRSqlXml
- Out-QLRSqlHtml
- Out-QLRSqlDatabase
Parameters
| Name | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|
| Output | The file where to save the output. If this parameter is not set, output will be written to a pipeline as strings, one string per line. | false | false | |
| InputObject | Objects that will be exported. Can be results of one of the following cmdlets:
- Get-QLRSqlCommand - Get-QLRSqlTransaction - Get-QLRSqlRecord | false | true (ByValue) | |
| Full | Set this parameter to include additional properties to the output.
Note: Setting of this parameter may slow down the exporting process. | false | false |
Input Type
Quest.LogReader.SqlServer.Wrappers.CommandWrapper, aQuest.LogReader.SqlServer.Wrappers.TransactionWrapper, Quest.LogReader.SqlServer.Wrappers.RecordWrapper
Return Values
String if Output parameters is not set or None elsewhere.
Examples
EXAMPLE 1
$lr = New-QLRSqlReader –Online . Northwind Windows Get-QLRSqlCommand $lr Out-QLRSqlCsv C:\out.csv $lr.Close()
These commands open the online transaction log for the Northwind database on the local server. Then all DML/DDL commands are exported into the C:\out.csv file in CSV format.
