I've recently setup a google cloud server for the first time and I installed the asp.net framework which is marketed as "Windows dev stack featuring IIS, SQL Express and ASP.NET". I'm familiar with SQL Server, c# asp.net and would like my first project done with these technologies for simplicity.
I manually installed sql server data tools, I can jump on the RDP and log into the localhost sql server via SSMS but my windows account does not have permissions to add a new database or create a user who does have permissions. I can see the sa user in there but do not know the password.
How can I add a sql server database into the local sql server express?
Best Answer
Using Developers Console, you can check the
sa
username's password in two different places :under
Compute Engine > VM instances
, click on your deployed ASP.NET instance and look forc2d-property-saPassword
value underCustom metadata
.under
Deployment Manager > Deployments
, click on your deployment. In right pane look forSQL Server Express Administrator
andInitial SQL Express Administrator password
values.Using PowerShell command line from inside of your deployed ASP.NET Windows instance, you can run this one-line command to get the sa initial password:
Invoke-RestMethod http://metadata.google.internal/computeMetadata/v1/instance/attributes/c2d-property-saPassword -Headers @{"Metadata-Flavor"="Google"}