Password reset for Azure database - azure

I have a new Azure account. I am able to log into the 'manage' page as admin, but I forgot the password to one of my databases. I would like to reset the password on that one DB. How do I do that? Microsoft doesn't seem to have a KB on that - at least not one I could find. Thx.

If you're referring to the administrative password for a specific Windows Azure SQL Database server, you can do this from the new portal. Select the Database choice on the left, then select Servers:
Then, after selecting the server of choice, you'll see the option on the right for resetting admin password:

Using the new azure portal:
https://portal.azure.com
Click browse (to view all resources)
Select SQL databases
Choose a database that's in the server you want to change creds for.
Select the server name url for that selected database. This should open up the server configuration blade.
Reset password is the second button from left.

Another variation on new Azure portal (bypassing the database), #1 go to SQL servers directly; #2 click on the DB Server you want to update the password for, #3 click the pencil, #4 update the password, confirm and save.

To reset the administrator password for a SQL Database server, use the following steps:
Go to the Windows Azure Management Portal at http://manage.windowsazure.com and click SQL Databases in the left-hand navigation pane.
Click the Servers tab at the top of the SQL Databases workspace. This will launch the Server List View.
In the Server List View, click the name of the server to update. This will launch the Server Dashboard.
On the Server Dashboard, click Reset Administrator Password under quick glance tasks on the right-hand side of the workspace.
On the Reset Password dialogue, specify a new password and then confirm the new password.
To complete the operation, click the Check mark button at bottom right. You will be returned to the Server Dashboard for the server.
If you reset the SQL Database server password during a time when there are active connections to databases on the server, you may want to use the KILL statement to terminate user sessions. This will force client connections to refresh their sessions with the database and the host server. For more information, see KILL (Windows Azure SQL Database).

With the current iteration of the interface, the process is similar to what is described above with an additional step:
Get to the Overview as described above.
New: Click on the server name (I just had to stumble into it. Horrible UI design.)
Now there is an option to reset the password.

You can use the following command with the Azure CLI 2.0 to change / reset the password for Azure SQL Database:
az sql server update -n {database server name}
-g {resource group name}
-p {password}
Source: https://buildazure.com/2017/05/18/azure-cli-2-0-reset-azure-sql-database-password/

You can actually reset your admin password to your SQL database using the old/previous Silverlight portal.
Log into https://windows.azure.com/ or into the current one and select "Previous portal" from your login
In the previous portal click the "Database" menu item on the bottom left
Select the database from the subscription
click the "reset password"

Update for new portal:
Go to the SQL server that's hosting your SQL DB and click on "Reset password".

If someone had forgotten his password for DB, First of all, look at the connection string(appsettings.json).
You will find it there.

Related

Web Installer Issue -DB Issue -The server principal "DOMAIN\MACHINENAME$" is not able to access the database

I am getting below error while generating the SQL scripts using a web installer with Integrated security as true /Windows authentication mode on.
It works perfectly fine with SQL authentication mode.
The server principal "DOMAIN\MACHINENAME$" is not able to access the database "" under the current security context.
Regards
Web Installer Issue -DB Issue -The server principal
“DOMAIN\MACHINENAME$” is not able to access the database
First, if you access a private database by your current account, you should make sure that your current account is under the domain.
Then, if you have web.config file in your project, add <identity impersonate="false" /> under <system.web>.
===================
If you use SQL Server,
1) login into it and check whether you can access the database's info. Or just change another
2) Go to SQL Server --> Security --> Logins and right click on NT AUTHORITY\NETWORK SERVICE and select Properties
In newly opened screen of Login Properties, go to the User Mapping tab. Then, on the User Mapping tab, select the desired database – especially the database for which this error message is displayed. On the lower screen, check the role db_owner. Click OK.
=================
If use you SSMS,
Open SSMS --> Security --> Logins.
Right click NT AUTHORITY\NETWORK SERVICE and Click Properties.
Go to Status tab and set Permission to Connect To Database Engine To Grant.
==================
If you use IIS manager,
open IIS manager-->your application pool --> advanced setting-->set custom account under Identity menu-->then enter your domain user name(DOMAIN\USERNAME) and password.
Or you could just click Identity--> slectBuild-in Account and choose NetworkService.

Using Excel as the front end, Azure as the backend

I have a SQL Database on Azure to which I can successfully get connected from within an Excel file. I am using ADO and the connection string uses my own username and password. Since this file will be used by many users, how can I create a generic login and password so that I would not give out my own username and password in the code? The Excel file runs many VBA macros to communicate with the Azure SQL database.
I am using Excel 2010 (yeah, it is old, I have to) and this is my connection string:
mstrConnectionString = "Driver={SQL Server Native Client 11.0};" & _
"Server=tcp:<servername>.database.windows.net,1433;" & _
"Database=<databasename>;" & _
"Uid=<myusername>#<servername>;" & _
"Pwd={MyPassword};" & _
"Encrypt=yes;Connection Timeout=30;"
According your comment, I have an idea that you can create a new login/user for you Azure SQL database.
Then you use this user and password as public account to get or writer data from your Azure SQL database within Excel.
Here's the example T-SQL statement, this code is create a new login and a user in your Azure SQL database. You can run this query in SSMS:
--running in master db
USE [master]
GO
CREATE LOGIN [sagarreadonly] WITH PASSWORD='password'
GO
-- running in Azure SQL DB
USE [DataEncryptDemo]
GO
CREATE USER [sagarreadonly] FOR LOGIN [sagarreadonly] WITH DEFAULT_SCHEMA = Marketing;
GO
EXEC sp_addrolemember 'db_owner', 'sagarreadonly';
GO
The new user is created as 'db_owner' to the specified database.
For more details about database roles, please see Database-Level Roles.
About login and user:
A login is used for user authentication
A database user account is used for database access and permissions
validation.
Logins are associated to users by the security identifier (SID). A login is required for access to the SQL Server server. The process of verifying that a particular login is valid is called "authentication". This login must be associated to a SQL Server database user. You use the user account to control activities performed in the database. If no user account exists in a database for a specific login, the user that is using that login cannot access the database even though the user may be able to connect to SQL Server.
A Login is an identity used to connect to a SQL Server instance. A User allows you to log into a SQL Server database and is mapped to a Login. So you will need to first create a Login, before you can create a User in SQL Server.
Hope this helps.
You can create a "Database login" dialog box to prompt a user for database connection information by using text boxes, buttons, or other dialog box controls. Typically, when you type text in a text box, the text appears as you type. However, you can use a property of the Microsoft Visual Basic for Applications (VBA) Edition User Form to create the effect of a hidden or "masked" text box for creating a password dialog box, where you do not want the text that is typed in a text box to be "visible". Here you will find how to do that.
The information the user types on the "Database login" can be used to build the connection string you posted above.
To create a custom dialog in Excel please follow this instructions.

Connectons API: Posting on behalf of others / Impersonation

I'm currently implementing a solution, where an external tool is making posts to the Connections API. These calls are made via basic authentication with a service account configured in the external tool.
However, I need the posted content in Connections to appear as posted by another user than the service account (users ids/emails are known to the external tool). Is there any way, the service account can post on behalf of others/impersonate users when posting to the API?
You need to add support for your the external user account to the right websphere roles
These Application / Roles are:
WidgetContainer trustedExternalApplication, admin
You can follow this article to set it up on your system.
In order to give a user administrative access to widgets, we can assign some privileges to one of the users - fadams.
You need to start the deployment manager on the quickstart.
Connect to the system via SSH
sudo /etc/init.d/ConServer_DM_was.init start
Navigate to https://${HOSTNAME}:9044/ibm/console/login.do?action=secure
Enter User ID : wasadmin
Enter Password : lcsecret
Click Login
Expand Applications > Application Types
Click on WebSphere Enterprise Applications
Select one of the Applications (from the table)
Application Role
Homepage admin
WidgetContainer trustedExternalApplication admin
Communities widget-admin admin
Profiles admin
Click on Homepage
Click on "Security role to user/group mapping"
Select One of the Roles (Admin)
Click Map Users
Enter Search String - fadams
Click Search
Click the Right Arrow
Click Ok
Click Ok
Click Save
Repeat for Each Application and Each Role in the Table Above
....
Click System Administration on the Left
Click on Nodes
Check localhostNode01
Click Synchronize
The Servers are now synchronized with your updates to the roles.
Click Servers > Server Types > WebSphere application servers
Check conServer
Click Restart
Once you see the Green arrow again, the connections server is fully restarted
Navigate to https://${HOSTNAME}:444/homepage
Login as fadams with your password
You should see administration on the left side of your connections instance
http://www-10.lotus.com/ldd/appdevwiki.nsf/dx/How_to_update_the_quickstart_to_support_Widgets

How to access Azure web site's database

I created a Wordpress web site in Azure. Is there anyway to access the database that was set up along with it? (so I can back / or if I should want to Migrate in the future )
If you go to the website dashboard tab, you will see a link call "view connection string". If you click that you will see the connection string with database and server name, user name, and password , etc. You should be able to use those to log into your MySql database using tool such as http://dev.mysql.com/downloads/gui-tools/5.0.html

SharePoint caches incorrect credentials

Every morning when i fire up my VM and IE (in my host OS) and go to my SP site it always logs me on automatically as DOMAIN\george which is a user I created for testing permissions.
So every morning after that I click "sign in as a different user" to sign in as my sys admin user instead and most days that is the only user I use. Any idea why george's credentials are being cached?
Part of "firing up my VM" is running a script that starts IIS as well as some services. I'm not entirely sure SharePoint is responsible for this, could very well be ASP.Net.
EDIT: I've already tried clearing my cookies.
Had a very similar problem! To solve it, go to 'User Accounts' under the Windows Control panel.
Navigate to 'Manage your network passwords'. Select the domain you wish to clear and select 'Remove'.
You should now have a clean login dialogue box and when you check the 'remember me' box, this will be stored as the login default for that domain.
I was able to remove the test login credentials using the User Account control panel applet in Windows 7
Open the Manage Credentials link.
Find the Sharepoint Login in the Windows Vault.
Expand the address for the site
Remove the test login for this site.
After doing this I am no longer prompted for the login and login as different user prompt.
Have you checked that there are no logins and passwords being stored by the browser? Assuming you are using IE, see this article on how to clear them.
If DOMAIN\george is same user ID you are logging in to the VM ? If that is the case try changing the Setting in IE that dictates what user name is send to the Server. Just go to Tools - > Settings - > Security and Click on Custom Level, scroll down to bottom and you will find User Authentication option Select the Prompt for User name and Password.
It could also be that you are using IE8, that caches my credentials as well it seems.
IE8 stores credentials for favourites it seems, don't ask me why. What you should do is log in as the needed user, then save a new favourite (or add it to the favourites bar by dragging it). Then use that link to go to your site.

Resources