Case Sensitive DB Name problem

  • I have a powershell script that scales up a SQL Azure database. It uses the cmdlet Get-AzureSqlDatabase.

    Users can pass in parameters to specify things like DatabaseName.

    Unfortunately, this parameter is case sensitive and we don't have a consistent naming pattern for our databases.

    Is there any way to make this case insensitive?

    $ddw = Get-AzureSqlDatabase -ResourceGroupName $Group -ServerName $ServerName -DatabaseName $DBName

    $DBName should be able to be "MyDatabase" or "MYDATABASE" or "Mydatabase" and still retrieve the db information.

    --------------------------------------
    When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
    --------------------------------------
    It’s unpleasantly like being drunk.
    What’s so unpleasant about being drunk?
    You ask a glass of water. -- Douglas Adams

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply