How can we help you today? How can we help you today?
Ognyandim
It was once again a user privileges problem between SQL and Smart Assembly. I have connected SmartAssembly at the TFS Build Agent while running SmartAssembly GUI using Windows Authentication and it connected to SQL successfully. But TFS is running with 'NT AUTHORITY\NETWORK SERVICE' which does not have sufficient privileges for the SQL! When TFS invokes Smart Assembly it tries to connect to SQL with 'NT AUTHORITY\NETWORK SERVICE' and not with the windows account I have connected through the standard interface. How To Solve : 1. In the build definition change the logging verbosity to 'Diagnostics' 2. Run the build. 3. When it fails open the project log. Not the Activity Log of the Build Agent. At the bottom of the log there are these few lines. ... error : SmartAssembly build failed: error : Failed: SmartAssembly.InformationException: Unable to connect to the SQL database: error : 'Cannot open database "SmartAssembly" requested by the login. The login failed. error : [b]Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.'[/b] ... 4. Create SQL user - SmartAssemblyUser, map the user to the SmartAssembly database and grant it db_datawriter privilege. You can use this user with every SA Developer on devs machines - that is good because this user has minimum rights in the SQL server and therefore IMHO will not be a security breach if someone gets this user from the SmartAssembly.settings file. 5. Edit the SmartAssembly.settings which is located in C:\ProgramData\Red Gate\SmartAssembly ( in my case because I installed it the standart way ) the way this article describes http://www.red-gate.com/supportcenter/content/SmartAssembly/help/6.7/SA_ConfigureErrorReports 6. Save and start the normal GUI, open the project, click options and see if it is connected. If it is not it will diplay an error. 7. If it ( SA ) is connected to SQL now - run your build again and ENJOY! / comments
It was once again a user privileges problem between SQL and Smart Assembly. I have connected SmartAssembly at the TFS Build Agent while running SmartAssembly GUI using Windows Authentication and it...
0 votes
Brian Donahue wrote: The thing that causes problems is that when you initially configure SmartAssembly for SQL, it tries to create the database, and the error message just says "login failed" when it really should say CREATE DATABASE rights are required. So in addition to db_datawriter that you need to put data into the tables during normal operation, you will need CREATE DATABASE and permission to create schema objects initially. Thanks for the quick response. I have logged in once and the database and all of its tables are created. But that initial log-in was with Administrator. Now I need to set things up for regular accounts. The regular account already is db_datawriter. If I can log in with 'sa' and do whatever and then nothing with my regular DC account there must be a difference between the privileges that blocks me. Which differences are important for the proper configuration of SmartAssembly. I want to point out that at the beginning I do not have any user in the SQL server defined. It is defined only in the Active Directory. I must add it manually in the SQL Server instance and give it all the required privileges because everything is not allowed by default. Thanks for your support. / comments
Brian Donahue wrote: The thing that causes problems is that when you initially configure SmartAssembly for SQL, it tries to create the database, and the error message just says "login failed" wh...
0 votes