Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm deploying an Autohosted App for SharePoint 2013 (Online).

In the web project of my autohosted app, there is a database which is thus deployed on the remote web (on windows azure) when my autohosted app is deployed.

But I'd like to know if it is possible to access this database from another place than inside the remote web of my autohosted app?

Currently I haven't been able to find any connection string or something else that could allow me to access to the database of the deployed remote web, do somebody have an idea or a solution about this?

Thanks a lot for your assistance !

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

It is actually possible. If you follow this post http://msdn.microsoft.com/en-us/library/office/apps/fp179902.aspx to include the database in your app, you have to create a SqlAzureConnectionString app setting.

When you publish this app and use it, the connectionstring is replaced with the connectionstring for the sql azure database. If you write this setting to a page, you are able to see the actual connectionstring. It will look something like this:

"Data Source=b2p09toyr4.database.windows.net;Initial Catalog=db_a6d1dee5_4ee6_47f3_ba44_9858f706f141;User ID=db_a6d1dee2_4ee6_47f3_ba45_9858f706f141_dbo;Password=21F4balh/453.Pq"

You are then able to create a connection with SQL Management Studio. (Don't forget to expand the options and connect to your database because you can't connect with the master database)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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