2

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?

  • @PJMahoney - The SQL Server was installed as part of the asp.net framework I linked from my question, the google cloud package installer installed the databse server along with the .net environment, IIS etc. all in one go once I clicked the 'go' button on that web link. I've installed SQL Server many times on my own servers and understand the usual process but can't work out the google cloud environment for it. I'm looking now for the sa password somewhere in the google cloud console. – John Nov 12 '15 at 3:16
4

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 for c2d-property-saPassword value under Custom metadata.

  • under Deployment Manager > Deployments , click on your deployment. In right pane look for SQL Server Express Administrator and Initial 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"}

2

OK, I found the sa password. I took screenshots during the setup process and it was there in the 'Google Cloud Developers Console - Deploy ASP.NET Framework to Google Compute Engine' screen. I'm not sure where I could find this if I didn't take screenshots though. I've added san admin account and my windows account as an admin now so I shouldn't get locked out! Thanks for the discussion @PJMahoney

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.