SSIS 2012 connection manager red arrow - ssis

I have project where there is allready connection manager created called ODS, and this connection manager used domain account before, now I have to switch it to user and password, the problem is that when I simple go to edit and change it doesn't work, but when I create new then it works. I saw that there are two icons near the connection manager, red arrow and fx , what does it mean ?
Edit:
OK I assume that fx means that it is parametrized and red arrow means problem with connection. Unfortunally there seems to be a bug, when connection manager is paramterized and there is connection string in parameter it doesn't work locally.

Cause:
Your connection manager goes offline when you make a change to the connection string that is incorrect, ex. spelling error in the server name, and the system can not validate the connection.
To fix it:
Correct the mistake in the connection string
Right click on the connection in the connection manager and un-select the "Work OffLine" option. This remove the "Red Arrow" icon and make your connection "live" again.

The red downward facing arrow indicates that the resource the connection manager is using is offline or unreachable in some fashion.
I believe you are stating that when you manually edit the connection manager, it doesn't work/persist and that is due to the Expression overriding the values. To resolve this, right click on your project level ODS Connection Manager and choose properties. Click the plus sign on the Expressions property and from there, you can identify the Variables and/or Parameters that are actually setting the values.
A Variable will take the form of #[Schema::VariableName]
A package level parameter will take the form of #[$Package::ParameterName]
A project level parameter will take the form of #[$Project::ParameterName]
Once you have identified the source of the Expression, then you will go to the Variables Pane (View -> Other Windows, Variables); Parameters tab at the top of the package; Projects.params and change the values there.
If all of that has the correct values, then you may be running into an incompatibility with your Project and packages' Protection Level. If it's DontSaveSensitive, clicking Save might result in the password being removed. I haven't worked with SQL Logins for some time so I don't know for sure how they will behave. You might be able to set the password, if it's a parameter, as Sensitive and see if that doesn't make it better. Might make it worse as there are strict rules about how you access a Sensitive parameter versus a non-sensitive.
Finally, the fx glyph signifies there is an expression somewhere on the connection manager. While it's likely on the ConnectionString or the individual components of database name, user and password, I've seen people use expressions on more esoteric properties.

the answer was to take connection manager ofline and connection manager worked for me in this format Data Source=xxx;User ID=xxx;Password=xxx;Initial Catalog=xxx;Provider=SQLNCLI11.1;Auto Translate=False;

Related

Parameter Value: "Get values from a query" not working on host

I'm having problems when using the option "Get values from a query" in my Parameter settings.
On the server everything works like a charm.
But when I deploy and then launch the report on my hosting, I get an error message:
If I use the option: "None", then everything works fine.
I've placed a test Tablix, to see the result of the dataset on the host, and also this causes no problem.
So the issue is only with the "Get values from a query" section AND only on the hosting.
Anybody got an idea?
EDIT: I turned EnableRemoteErrors on, as requested by the errormessage, but no additional info is given.
The detail of the error is in the SSRS log file located at -->
<SSSRS_INSTALL_DIR>\Report Server\Log Files.
That is where I would go. Based how you describe the dataset driving the parameters works but not when given a value then I would expect this to be a parameter mismatch or missing parameter. Make sure that you are feeding the dataset the parameters you think you are. Also, if you don't allow nulls then make sure you are supplying a default value.
You said, you placed a tablix on the report showing the results of the YearsDOW dataset and this fails. If this also fails when you set your available values to 'None' then we can assume, as the error states, that the issue was with executing the query itself, not your report design.
As this seems to work when you run it from your local machine in development but fails when run from the server I would suspect it's an authentication/permissions issue.
Check the credentials on the datasource in your development environment and compare these to the SSRS server's version of the datasource. Remember, by default datasources do not get overwritten so it maybe that you deployed the datasource initially with one set of credentials then then changed them in your development environment.
If this is the case and the datasource is not used for other reports on the server, then you can either change the project properties to overwrite datasources but personally I prefer to delete the datasource from the server and then redeploy, that way future changes won't affect the servers version unintentionally.
If the datasource is used in other reports without problems then you could just rename the datasource to something unique so it will get redeployed under the new name and your report will point to that new version.

Unable to resolve valid table in PhpStorm

I'm getting unable to resolve table errors appear in php files containing SQL querying valid tables.
If I Ctrl + Enter over the query, then I get expected results in the DB console, and if I expand the database in the DB explorer tab then I can see the tables.
It's not affecting code execution, but it's annoying because it catches my eye when writing code, and it masks real SQL errors.
I've tried refreshing the database connection, and I've verified that the php tab is connecting to the correct database.
In 2017.2 I had to go to
Settings > Languages & Frameworks > SQL Resolution Scopes
and add my project and database link in there to get it right again.
Try re-creating DB connection from scratch (delete existing one and create it again).
Thinking of possible reasons ... I can think of this scenario:
working with project in current stable version (currently 2016.1.x);
trying EAP build for next version (2016.2 at this moment) on this project and make some DB-related changes there (even simple syncing DB);
going back to stable version (2016.1.x) .. and because new version uses newer file format/versioning for DB-related data (cached DB structure etc) IDE may start ignoring "unknown/newer" format for such data and instead of throwing appropriate warning it just "silently" throwing "unresolved table" message.
No other ideas.
I was getting what OP was getting, and the problem was my DB Server was MariaDB and i had MySQL selected as the SQL Dialect.
See File > Settings: Languages & Frameworks > SQL Dialects.
Faulty error pollution DRIVES ME NUTS TOO!
If I start having SQL resolution issues, I will check my resolution scopes (settings -> Languages & Frameworks -> SQL Resolution Scopes).
Generally I have the most issues when my project mapping is set to 'All Data Sources' by default.
The following steps always fixes it for me:
Click the Project Mapping Dropdown
Uncheck the global 'All Data Sources' setting (required to make other selection available)
Click the drop down arrow for your Database connection
Check 'All Schemas' (Or Specific Tables)
Click OK to close the settings window
Your false resolution errors should disappear after the next parse cycle.
You aren't limited to applying the above steps to just one DB connection, you can do it for all connections in your project.
Sometimes adding a custom resolution scope will work as well, but it is hit or miss for me.
Click the plus sign (top right)
Select the file you are working on and hit 'OK'
Select the 'Resolution Scope' column
Deselect 'all data sources'
Select the specific DB resources you want
Reconnecting to the DB never works for me.
Specifying the table works well... but it can become very cumbersome as the project grows.
I have also run into an additional situation where PHPStorm would only resolve some of my queries, no matter what scope resolution settings I used. However, after I attached a console to my file, they resolved just fine.
(Search for 'Attach Console' in Help | Find Action. You can also add it to a 'Quick List' or Keymap it.)
Although this answer is specifically for phpstorm, I had this same issue in IntelliJ and none of the above fixes worked for me. I had my scope added, everything was active. I could query the database in the console window perfectly fine, and I was totally stumped.
Eventually, I noticed some text in the database panel that said 0 of 4 in tiny text. It looked like this:
Upon clicking on the 0 of 4 text, I discovered there were no schemas added to the connection, even though a default database was set upon making the connection originally. Going to that page allows you to add schemas. Be sure to either select "All schemas", "Current schema", or the specific database that you want to use with your connection.
Changed dialect to MariaDB on global and project level.
OR
To dismiss this error in PHPStorm versions before 2017 which have no SQL Resolution Scopes option:
Go to File
Go to Settings...
Go to Editor and then Inspections
In SQL chapter uncheck Unresolved reference
Click Apply and then OK
Adding database name before the table name worked in my case.
For instance, instead of writing SELECT * FROM Client, put SELECT * FROM database.Client.
I will add another answer, because for me, it was a completely different (embarrassing) cause:
I somehow forgot to add the database name in the data sources general settings (where you also set the host, user and password).
In my case, I have clicked the right button in the SQLScript and change the Dialect to "Generic SQL". It worked for me.
I solved this problem as follows:
CTRL + SHIFT + F10
new query console
Write a selection query to the database, for example:
SELECT * FROM user WHERE user_email='$email' AND user_password='$password'
Enter your code page and click on the table name in the query
ALT + ENTER
run query in console
Select the console you created
First, you need to check the Schemas tab, and make sure you've added the database.
If the unable to resolve table error stills appears, there're two options to fix this:
1.You can edit the properties of the Data Source and add the name of Database, then you can see that select * from table works well.
2.On the other hand, you can also use sql like this select * from database.table. It works for me.
By the way, in many situations, autocomplete can be very useful.
[PHPSTORM]I solved this problem by setting
Languages&Features
SQL Dialect
adding your current file into path and modify its SQL Dialect as a server you are using.
NOTICE!!!!! mine is MySQL but it is exactly MySQL causing problems, after switching into [generic SQL] PROBLEM SOLVED!!!

The connection manager will not acquire a connection because the connection manager OfflineMode property is set to TRUE

When I open my existing SSIS project in design view I get the following error:
The connection manager will not acquire a connection because the connection manager OfflineMode property is set to TRUE
Meanwhile the OfflineMode is set to false. Can anyone tell me why am I getting this error?
DelayValidation property of the connection is set to false and if I set it to true, the error goes away. But I just wanted to figure out why is this happening. I am not setting connection dynamically and last time I used the project, there were no errors and it ran while DelayValidation was set to false. What has changed?
Right-click on the Connection Managers area of SSIS Designer and then look at the "Work Offline" option to ensure it is not checked. If it is checked, uncheck it.
or
You may have to do this for each connection manager.
This didn't work for me because I was using a connection string expressions. Clearing the 'work offline' check would temporarily appear to work, but then it would suddenly recheck. This was frustrating to say the least.
Once I edited the connection string to place the provider in the correct place (see image for what worked for me) then it stopped toggling the 'offline' mode on because it could connect to the DB.
Please create a variable for data source of the connection manager and apply to the connectionString Expression.
Yes you can test your connection and it works but you get this error whenever you try to access anything from the DB.
Actually you've probably just accidently selected the offline mode.
Go to the SSIS menu option.
Find the selection "Work Offline"
Unselect it and you should be good.
I accidentally hit this every once in a while when accessing the variables menu... very frustrating.
Somehow that got turned on for me and in 2019 it's in
Extensions>SSIS>Work Offline
Just uncheck it
Please check package parameterize properties, right click over your package area and select Parameterize item from the Menu, then set property to OfflineMode and see if it set to any existing parameter or not. if it's the case, then the parameter value is changing to True at run-time. try to find the location where this Parameter is changing.
I had the same issue and it was due to the provider in the Connection String. So what I did was create a new connection to the server and database, and check which provider were used in the new connection. Then change the provider in the old connection (it is assigned by expession). It worked.
I had this same concern, and the above information was helpful. I was able to overcome the concern by placing a default value in my expressions 'Connection String' variable.
Had this issue, just ignore the error it gives you and try running it anyways. If you were offline from the network recently it might show this error but ignore it.

SSIS Project Level Connection Manager Property configurations

I have just started looking at using the SSIS 2012 Project Deployment. One thing I have noticed is that once the project is deployed all the properties relating to the project level connection manager get deployed too and hence need to be configured (Linked to SSIS Environment Variables).
Was just wondering whether the SSIS environment is smart enough to infer the ConnectionString property from the InitialCatalog and ServerName properties. That way I would only need InitialCatalog and ServerName Environment Variables and not a third variable containing the actual connection string which would result in a duplicate configuration.
Please see screenshot below showing an example of this.
If I got your question right, you want to set the initial catalog and server name property paramatically.
Here are the steps to do it: [Applicable for SSIS 2005 and above]
Step-1: Create two variable in SSIS package (Package scope) and name them DbName, ServerName
Step-2: In connection manager, create a OLEDB connection and test connection.
Step-3: Now, right click on the connection manager and click properties.
Step-4: In properties, click expression. You will see below window. In this window select initial catalog
Step-5: Now click on expression and drag drop DbName (i.e. your catalog name) variable from upper left window to expression text box and evaluate it.
Step-6: Do the same for Server name. and you are done
Remember: If your initial catalog and database parameter name are not
correct then you may face connection issue.
Other way, Specifically for SSIS 2012 and above
Now, as you have mentioned SSIS2012. Let;s utilize its feature of Project parameter
Create project level variables, You can either create two variable names [DBName, ServerName] or complete connection string.
Create OLEDB connection in connection manager and right click on the connection. Then select, "Parameterize"
Based on your parameter, you can set parameter to properties like Initial catalog, Server Name, Connection string etc. Or you can create project level parameter from here by selecting appropriate values, as shown below
Read this link for more details
I tested several combinations of ConnectionString, InitialCatalog and ServerName. It looks like servername (DataSource) and initialcatalog have to be in the connection string and the initialcatalog has to have a value. If I left servername blank it worked as long as DataSource was in the connection string.

SSIS parametrize connection strings

I am trying to set up deployment process for single package usinig project deployment so VS2012. I found that to change dynamicaly connection string on the server I can parametrize connections so I did this and created enviroments and I run my package with inviroment which has connnections strings as parameters and all seems to be fine, but why on connection manager I can still see some old setup made while developing? How can I remove it ?
By Parameterize, I assume you're using the Configuration section to globally configure a project/package or on a per-execution basis. This is in contrast to using project/package Parameters
I have created an SSIS Environment variable named ConnectionStrings in my deployment folder and it has two values: ServerName and CatalogName.
I right clicked on my project, DeployMe, and selected Configure. In your screenshot, you have clicked on the specific package and selected Configure. That or you manually changed the Scope drop down.
I first click on the References and add a pointer to my Environment
Back to the Parameters tab, I click over to Connection Managers and I'm going to configure the CM_Project connection manager's ServerName property to use my environment variable's ServerName value. Clear right?
After configuring the ServerName, I also configured the InitialCatalog property but instead of using my Environment Variable's value, I used the "Edit Value" option (above) to set it. The net result is that my properties now look like this.
The underscore indicates it's set from an environment variable
The bold text indicates it's set manually.
Now when I go to run my package, via Agent or manual execution, the first thing it's going to prompt me for is an environment reference. I've lost my bolding for the InitialCatalog but the underlining remains for ServerName property. None-the-less, both are different values and were I to execute it, they would pick up the correct values.
All that said, I find it far easier to just store the whole ConnectionString value. You will observe, if you take this route, that the values displayed for ServerName would show your design-time values but that's fine because the ConnectionString as a whole will override the individual values at run-time.
I know this is a generic answer but I'm hoping I've hit on what you're missing step-wise.