Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Tags
#Agile #Docs #Powershell #SQL
Question
How to we catch name erros fpr the server instance ?
Answer

The name of the default instance can be “MSSQLSERVER” or be left out. To make sure the server object is created in the same way for both situation the following code will check the name and declare the target variable.

# Make up the target in case we have a default instance
if(($instance -eq '') -or (($instance).ToUpper() -eq 'MSSQLSERVER'))
{
  $target = $server
} 
else
{
  $target = "$server\$instance"
} 


Tags
#Agile #Docs #Powershell #SQL
Question
How to we catch name erros fpr the server instance ?
Answer
?

Tags
#Agile #Docs #Powershell #SQL
Question
How to we catch name erros fpr the server instance ?
Answer

The name of the default instance can be “MSSQLSERVER” or be left out. To make sure the server object is created in the same way for both situation the following code will check the name and declare the target variable.

# Make up the target in case we have a default instance
if(($instance -eq '') -or (($instance).ToUpper() -eq 'MSSQLSERVER'))
{
  $target = $server
} 
else
{
  $target = "$server\$instance"
} 

If you want to change selection, open document below and click on "Move attachment"

Documenting SQL Server with PowerShell - Simple Talk
ateNotNullOrEmpty()] [string]$server, [Parameter(Mandatory=$true, Position=2)] [string]$instance = '', [Parameter(Mandatory=$true, Position=3)] [ValidateNotNullOrEmpty()] [string]$destination ) <span>The name of the default instance can be “MSSQLSERVER” or be left out. To make sure the server object is created in the same way for both situation the following code will check the name and declare the target variable. 1 2 3 4 5 6 7 8 9 # Make up the target in case we have a default instance if(($instance -eq '') -or (($instance).ToUpper() -eq 'MSSQLSERVER')) { $target = $server } else { $target = "$s

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.