CleanCode PowerShell Libraries v1.2.08 API: CleanCode » SqlTools » Out-SqlTable
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
Name of the table to create on the SQL Server instance.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
Character string or SMO server object specifying the name of an instance of
the Database Engine. For default instances, only specify the computer name:
"MyComputer". For named instances, use the format "ComputerName\InstanceName".
If -ServerInstance is not specified Out-SqlTable attempts to infer it:
* If on a SQLSERVER: drive (or alias) and the path specifies the SQL folder,
Out-SqlTable uses the server and instance specified in the path.
* If not on a SQLSERVER: drive but the current location on your SQLSERVER:
drive specifies the SQL folder, Out-SqlTable uses the server and instance
specified in that path.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
A character string specifying the name of a database. Out-SqlTable connects to
this database in the instance specified by -ServerInstance.
If -Database is not specified Out-SqlTable attempts to infer it:
* If on a SQLSERVER: drive (or alias) and the path specifies both the SQL folder
and a database name, Out-SqlTable uses the database specified in the path.
* If not on a SQLSERVER: drive but the current location on your SQLSERVER:
drive specifies both the SQL folder and a database name, Out-SqlTable uses
the database specified in that path.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
Specifies the login ID for making a SQL Server Authentication connection
to an instance of the Database Engine. The password must be specified
using -Password. If -Username and -Password are not specified, Out-SqlTable
attempts a Windows Authentication connection using the Windows account running
the PowerShell session. When possible, use Windows Authentication.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
Specifies the password for the SQL Server Authentication login ID specified
in -Username. Passwords are case-sensitive.
When possible, use Windows Authentication.
SECURITY NOTE: If you type -Password followed by your password, the password
is visible to anyone who can see your monitor. If you use -Password in
a .ps1 script, anyone reading the script file will see your password.
Assign appropriate permissions to the file to allow only authorized users
to read the file.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
Capacity for VarChar and VarBinary columns (limited to 8000 maximum).
Any data longer than this defined value will be truncated when inserted.
Required? false
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
Serving as both a switch and a column name, specifying -RowId adds
an identity column to the table with the value supplied as the column name.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
If enabled, Out-SqlTable will check whether the table exists before
attempting to create it. If it does exist, it is first dropped.
Attempting to use Out-SqlTable without this switch when the table already
exists generates an error.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
Number of rows to send to server at one time (set to 0 to send all rows).
This parameter maps to the same named parameter in the .NET class SqlBulkCopy.
Required? false
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
Number of seconds for batch to complete before failing. Though not advised,
you can use 0 to indicate no limit.
This parameter maps to the BulkCopyTimeout parameter in the .NET class SqlBulkCopy.
Required? false
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
Number of seconds for connection to complete before failing. Though not advised,
you can use 0 to indicate no limit.
Required? false
Position? named
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
This function is part of the CleanCode toolbox
from http://cleancode.sourceforge.net/.
Since CleanCode 1.1.05.
$dt = Get-Process | select ProcessName, Handle | Out-DataTable
Add-SqlTable -TableName "processes" -DataTable $dt
Write-DataTable -TableName "processes" -Data $dt
This documentation set was created with CleanCode's DocTreeGenerator.