VSTS LoadTest, connection string and TFS2010 - connection-string

We have a couple of loadtests running on a build server and I've been having problems with persisting the results from the test in a resultstore database. It works fine when running locally and up and until a week ago, the test result got persisted when running on the build server (TFS2010). Note I have no test controller or test agents. Only a build controller and build agents. I've setup the connection string for the controller 'Local - No controller' and it is seemed to be saved correctly (can see the connection string on the build server too). But when running via the build server, the result is not saved in the database. Locally works fine. So what am I doing wrong here and where is the connection string saved? My guess is that it follows the test controller and hence I do not explicit have one, my guess is that it uses a default local test controller. Any thoughts on where the chain breaks?

A fixed the problem, by opening visual studio on each of the build servers and configuring the connection string - *sigh

Related

KingswaySoft SSIS error when Published - A password is required

I've created a package that gets some information from a sql database and inserts them into Dynamics CRM.
When testing the package from Visual Studio everything goes as expected and the task finishes without any errors and the rows get inserte . However , when I publish the package to SSISDB on Sql Server the package fails with this error :
KingswaySoft.IntegrationToolkit.DynamicsCrm.CrmServiceException : CRM service call returned an error : A password is required in order to establish the connection ...
I tried changing the package protection level to EncryptSensitiveWithUserKey but it still gives the same message as above , created the package again from scratch still doesn't work . This package was working before , maybe there's something I did the last time in configuration which made it work but I cannot replicate it anymore .
Also I tried the Integrated Authentication it says this :
KingswaySoft.IntegrationToolkit.DynamicsCrm.CrmServiceException : CRM service call returned an error : The caller was not authenticated by the service .
#Drinv, this is a typical SSIS runtime deployment issue. You need to make sure that you have provided a password for your job configuration for the connection manager. What you provided to the package doesn't count as far as sensitive fields are concerned (password being one) when you are using the EncryptSensitiveWithUserKey option since user key is not transferrable between different systems or different users. An easy workaround is to change your SSIS package/project's ProtectionLevel setting to encrypt using a password instead, although it may not be the best practice. If you still have trouble getting this going, please reach out to us directly, our team can walk you through the issue.
I found out what I was doing wrong .
My SSIS project was on Project Deployment Model and I was trying to deploy only the package. After making my connections available on project level and deploying the whole project everything worked as expected .

SQL Server 2014, SSDT : deploying .dtsx packages to live, problems with connection managers & variables

Summary: A "master" database houses a set of connection strings. A .dtsConfig XML file is used to point the packages to this database. Dynamic connection assignment accomplished by using package variables and expressions on the connections. Works flawlessly in the development environment, but once deployed to live it falls over.
I'm currently running into issues when deploying .dtsx packages to a production environment. The issue is specifically related to the connection manager when the jobs run. The history log reports a ... network ... error with a Login timeout error as the reason.
(For reference, I'm using Visual Studio 2013 with SQL Server Data Tools)
I have a table in a master database that holds the connection strings that it needs to process.
The packages check for a configuration file, that points them to the database as stipulated in (1).
The connections are retrieved and are placed in an object variable.
The variable is mapped to a foreach loop container, where a set of connection string variables are mapped to the relevant columns.
The packages then progress as normal.
Some notes:
When I did the development, I provided default values on my network for the connection strings.
I have checked the connection string parameters and formatting inside the database, and they conform to Microsoft's specification.
Our implementers installed SSDT on a client's QA server, where I altered the connection variables to point to their network. This solved the problem, but it is not sustainable (in my mind at least).
So my question is: how do I get my production deployments to work correctly with dynamic connection management assignment without having to alter the connection string variables inside each package on a per client basis?
Any help will be appreciated.
After doing more research by posing plenty of questions to DuckDuckGo, I finally got my answer here.
A quote from the above blog:
I had a set of SSIS packages running for my client using the third option listed above. The packages worked fine for ages until one fine day when they failed. The logs showed the packages had failed validation and I discovered that all the packages had their connection managers’ DelayValidation property set to False. The variable used to set the connection string had a default value pointing to the DEV server. These packages in production were actually trying to validate against DEV database though the connection string was dynamically set via a variable to point to PROD. This was dangerous as the jobs will not run if DEV server was down, which is exactly what had occurred.

Connecting to Google Cloud SQL from Eclipse Not Using App Engine

We are trying to connect to Google Cloud SQL from Eclipse using the Database Development perspective. To do so I'm trying to add a new Database Connection, which I was able to do successfully for a local MySQL instance running on my machine.
The motivation for doing this is that we currently run our JUnit tests against the local instance. However, we are switching to Hibernate and want to make sure that all of our configuration files work with Cloud SQL. As a general guide I've been using:
https://developers.google.com/appengine/articles/using_hibernate
We're diverging slightly in that we're using hibernate.cfg.xml instead of persistence.xml, but I don't think this will actually have a bearing on the current issue of simply connecting to the database. From another answer as well as some Google documentation I'm aware that I can't use the com.google.appengine.api.rdbms.AppEngineDriver, because that needs to be run from an AppEngine instance. Instead I'm trying to follow the directions here:
https://developers.google.com/cloud-sql/docs/external
and am using com.mysql.jdbc.Driver.
I have assigned my Cloud SQL instance an ip address and have added my current ip address to the whitelist, as described here:
https://developers.google.com/cloud-sql/docs/access-control#appaccess
My driver is the Connector/J driver I've been using successfully with the local instance, and the url I'm using is:
jdbc:google:rdbms://my-app:my-cloud-sql-instance/myDatabase
which I got based on:
https://developers.google.com/appengine/articles/using_hibernate
After adding the connection and setting the information I click Test Connection, which worked successfully on my local instance. However, this throws the following error:
java.lang.Exception: Connection failed with unspecified error.
at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:110)
at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:73)
at org.eclipse.datatools.enablement.internal.mysql.connection.JDBCMySQLConnectionFactory.createConnection(JDBCMySQLConnectionFactory.java:28)
at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)
at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)
at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)
at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Obviously this isn't very helpful.
I've tried fiddling with the url, tried a number of users (none of which require passwords, so I'm leaving the password fields blank), and different versions of the driver for different versions of MySQL. Nothing has worked.
There are perhaps more deep-seated issues with doing it this way, such as how I will easily switch between test and deployment versions of my hibernate.cfg.xml, and I don't have good answers. I was just planning on editing them by hand back to the AppEngineDriver, which means I might run into further configuration issues at that point even if the JUnit tests are passing. Nevertheless, I think getting a connection set up to Cloud SQL that will allow JUnit testing will be a step in the right direction. I'd appreciate any input!
You should use jdbc:mysql://<cloudsql-instance-ip>:3306/<database-name> to connect from an external network. The connection string you are using is to connect from Google App Engine.

Rest API database connection issues with Codeigniter

I'm using Phil Sturgeons Rest as an API between the server and mobile APP. Locally this works brilliantly, on the server it bounces back with an issue when using API Keys authentication:
Unable to connect to your database server using the provided settings.
Filename: core/Loader.php
This is while $config['rest_enable_keys'] = TRUE; is enabled, when I change the variable to false the API service works just fine. Both locally and the server are running the same table layout and both have the same API key in the keys table. Rest of the site works fine doesn't show any database connection errors.
Changing the line $config['rest_database_group'] = 'default'; prompts a different error, which would lead me to believe that it is infact connecting to the correct database, just can't establish the keys table?
You have specified an invalid database connection group.
There's no difference in the code between the server and locally yet locally I get the correct error message of {"status":false,"error":"Invalid API Key."}
Could this be an issue with using multiple database connections? I checked the environment and it seems to be correct but this wouldn't explain why it would work locally.
Thanks a lot to nithin-meppurathu who helped me debug the core of the rest library to find the problem.
The problem lied in the multiple database connections, due to switching what is used depending on the environment it was always being defaulting back to the 'default' database environment. Changing $config['rest_database_group'] = 'default'; to my ENVIRONMENT variable I was able to get it pointing to the correct place.

Storing Load test results in Database using Controller and Agents

I have a load test solution with one load test and one web test. I have created a Agent where the load test solution lies and a Controller which has a SQL server set up. So i am using the Controller to store the Load test results in database. While running the test case i am facing the below issue -
The load test results database could not be opened. Check that the load test results database specified by the connect string for your test controller (or local machine) specifies a database that contains the load test schema and that is currently available. For more information, see the Visual Studio help topic 'About the Load Test Results Store'. The connection error was: An error occurred while attempting to create the load test results repository schema: To create the database 'LoadTest2010' your user account must have the either the SQL Server 'sysadmin' role or both the 'serveradmin' and 'dbcreator' roles
Note - The same solution runs fine for two of my colleagues. So i think it is something to do with permissions. I have matched the permissions which i and my colleague share on controller, agent, database, they are exactly the same.
I am blocked from two days, it would be great if anyone can spend some time and help me.
Thanks in advance.
Load Test Repository is configured at Controller Level. So, if someone else can do Load Tests, configuration is ok.
Maybe, you are not using a remote Test Controller in your Test (Local Testing only).
You should create a remote test settings in VS and specify the remote test controller.

Resources