sql - Cannot Access Azure DB from powershell -


i'm trying connect azure db , make several changes there powershell.

$folder = "c:\depl" $connectionstring = "data source=servername.database.windows.net,1433;initial catalog=configurationdb;user id=username@servername;password=qwerty$5ok;trusted_connection=false;" $datatable = "[configurationdb].[dbo].[parameters]"      $con = new-object "system.data.sqlclient.sqlconnection" $con.connectionstring = ($connectionstring)  $sqlcmd = new-object "system.data.sqlclient.sqlcommand" $sqlcmd.connection = $con $sqlcmd.commandtimeout = 600000  $con.open()  ... other actions ... 

i't used work without problem, started fall exception:

exception calling "open" "0" argument(s): "login failed user 'username'. session has been assigned tracing id of 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'.  provide tracing id customer support when need assistance." @ c:\depl\changeparams.ps1:21 char:5 +     $con.open() +     ~~~~~~~~~~~     + categoryinfo          : notspecified: (:) [], methodinvocationexception     + fullyqualifiederrorid : sqlexception 

i have no idea happening, because didn't change in .ps1 @ (it setted half year ago, , werent changed because needed run when wanted update parametres).

i thought 1433 port blocked in firewall but... despite not able connect powershell, can without problem in sql server management.

ant ideas wrong? ran out of them...

from error looks if did not replace 'username' in connection string above. please see following code quick example compare/contrast code.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -