Wednesday, August 27, 2014

Application (user) Management

Hey!

I am talking about the Application Management time to time in my posts and now I'd like to tell you a little bit about the application user management in TransSQL.

First of all, I'd like to make this "application" notion clear. By saying "application" we mean some kind of shortcut that your developers will use every time they create a new package.

To deploy some code from server X to server Y, you need to declare the server X and its database, server Y and its database, besides the version of the application (if applicable). Repeating this process every time to create a new package is boring, time consuming and error-prone, also these details can be complex and difficult to remember especially when there are lots of databases and servers in the environment. Application notion comes into play to prevent from this problem.

TransSQL administrator(s) can create applications in the Applications tab in TransSQL once for every environment and developers use those application name and environment details to create packages. Every application must have at least one environment, but they can have multiple environments too. For instance an application can have a "Development->Test" environment and it can also have a "Test->Production" environment. It will be listed for once in the Applications drop down box in the Package entry tab in the main window but when you choose it, you will see two environments in the Environments drop down box according to this scenario.

After explaining the application notion, I'd like to talk about a scenario about adding a new application.

To deploy some code from one database to another, TransSQL's application user has to have permissions on those databases. As we know that this could be a cumbersome task to do, we thought it would be better if TransSQL performs this task itself. I will try to explain how it happens with the help of some screen shots below.

When you enter the necessary information to add a new application and hit the Add button, the following message window pops up.

Pops up when you hit the Add button.
I will not write further details as the message in the message box is self-explanatory. However I need to say that you may opt to perform this task yourself. Although until now we have not met a situation where a manual action could be needed, but it's optional anyway.

If you hit the Yes button, TransSQL first performs these tasks on the source database. Please be informed that, TransSQL performs these actions using your Windows account. If your user does not have necessary permissions to perform these tasks, then the operation will fail.

All done tasks are listed as a summary of the operation.

As a reminder, you can see that two application users are created. The names of the application users may vary according to your choice during TransSQL's database setup. The first application user is the one which is used to perform deployments and the other one which has a "_reader" suffix is used to run SELECT queries against your servers which can be done using the List type in the Package entry tab.

If the users are already exist at the database then they are not recreated but they are fixed to prevent from a possible orphaned-user problem.

If the users are already exist at the database then they are fixed to prevent from a possible orphaned-user problem as the message explains.
These explanations concludes this post.

Thanks for your time!
Ekrem Onsoy

No comments:

Post a Comment