I wan to know that how to read connection string from app.config using installshield es, though there is an option to import the app.config file XML structure but the problem is the section of the connection is being updated at runtime.
During Upgrade i need to fetch the the app.config file's connection string section is there any way to implement this.
Thanks
Related
My question is around : storing Azure blob key in config file.
Below is the picture of my package overview. I'm trying to pull data from Oracle source and put a flat file on Azure blob storage (in csv format). That is the scope of this SSIS package.
Right side of picture shares that I can execute the package via commandline if **Protection level =' EncryptSensistiveWithUserKey' **
But NOW packages need to be run via a service account and not developer, architects accounts.
Looping back into my question: HOW do I store blob key in config file by setting the **Protection level = 'DONOTSAVESENSITIVE'** . Config file code after the package overview.
Config File currently being used
<?xml version="1.0"?><DTSConfiguration><DTSConfigurationHeading><DTSConfigurationFileInfo GeneratedBy="BI\MonkeyMan" GeneratedFromPackageName="Package" GeneratedFromPackageID="{9BDF0000-CAC9-4823-A6D8-EE59C3BB31A0}" GeneratedDate="4/6/2020 6:48:57 PM"/></DTSConfigurationHeading><Configuration ConfiguredType="Property" Path="\Package.Connections[Prod v18].Properties[ConnectionString]" ValueType="String">
<ConfiguredValue>SERVER=1.1.1.01:1521/DB;USERNAME=MonkeyMan;WINAUTH=0;data source=1.1.1.01:1521/DB;user id=MonkeyMan;password=isharemypasswords;
</ConfiguredValue></Configuration></DTSConfiguration>
Finally picture of when I try to run the package via dtexec with protection level set to DO NOT SAVE SENSITIVE.
Thanks for all your help around this.
The easiest way might be to use the builtin config-editor and select the properties you want to save to the config file.
Here's one tutorial to set it up: https://www.tutorialgateway.org/ssis-package-configuration-using-xml-configuration-file/
I am writing a program in Golang that connects to local Ignite clusters through an ODBC driver package written in Go.
During development I began getting this error repeatedly:
Too many open cursors (either close other open cursors or increase the
limit through
ClientConnectorConfiguration.maxOpenCursorsPerConnection)
[maximum=128, current=128]
After opening an issue with the golang odbc packgage I was using and providing a sample app, the author was kind enough to help me verify there was no issue in the golang code that would result in leaving cursors opened: https://github.com/alexbrainman/odbc/issues
I have since attempted to configure the setting for QueryCursor to value autoclose in the xml file I use for Ignite Configuration on initiating a cluster. I have used this doc as reference: https://ignite.apache.org/releases/latest/javadoc/index.html
However after some attempts I am not sure whether my syntax is wrong, or this is simply not a configurable property through the xml configuration file, and that the only way to tell Ignite to close the cursor is in the code, after queries.
I'm trying to migrate my TeamCity server to use SQL Server following the instructions at https://confluence.jetbrains.com/display/TCD10/Migrating+to+an+External+Database.
In step 3 it says
Create a temporary properties file with a custom name (for example, database.database_type.properties) for the target database using the corresponding template (TeamCity Data Directory/config/database.database_type.properties.dist).
but I can't find database.database_type.properties.dist anywhere on disk or in the installer package.
Where is database.database_type.properties.dist?
It's database.<database_type>.properties.dist where <database_type> in your case is mssql, so you should look for a file database.mssql.properties.dist.
The file is under <TeamCity data directory>/config. Path to the data directory you can see on Administration -> Global Settings page in TeamCity web interface.
I have a talend job that uses tOracleInput component with connection type of ORACLE CUSTOM. It is working well.
Now, I have a requirement to use jndi as the database connection. Any ideas how can this be achieved?
First deploy your job as a webservice. After that you should be able to alter the Use or register a shared DB Connection in tOracleConnection. There you can define your JNDI datasource.
Source: https://www.talendforge.org/forum/viewtopic.php?pid=50374#p50374
The answer that I went with is creating my own custom talend component. Because deploying the talend job as a separate package than the actual web application is kind of, let's say, not an ideal solution in our case.
I have copied the tOracleInput component, and using Talend's component designer, I have added a "Use JNDI" checkbox and "JNDI name" textbox on the component. And modified the javajet files to build the connection from JNDI (InitialContext) using the JNDI name if the checkbox is checked. Else, proceed as usual on tOracleInput codes.
So, whenever I exported my talend job, I would tick the "Use JNDI" checkbox but if I'm just testing within Talend Studio, I would uncheck it and filled up the database properties will be used.
Hope this helps future readers.
Thanks!
**https://intodata.eu/tag/talend/
I have used the 3 part tutorials (on link above) on how to a build custom component to helped me start
I have never used Visual Studio 2017 (or previous versions) before and have been asked to work on a project that includes getting information from a sql database. I am trying to open a connection to the database using an external config and then using configSource in my App config. However when I run this code I get an error: The ConnectionString property has not been initialized. I have been doing a bit of research on this but I'm uncertain of some of VS features and syntax. First, does the ConnectionString need to be initialized in the app config or somewhere else like a module or form? Here are my app config and external config code.
External config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="WindowsApp4.My.MySettings.TrakConnectionString"
connectionString="Data Source=Trak;Initial Catalog=Trak;User
ID=TrakMe;Password = TrakMeData;"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
App config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings configSource ="external_conn.config"/>
</configuration>
Thank you for any help.
To answer your question
I have always kept my connection strings in the app.config file. I can't think of a good reason to keep it in a separate file, so I would suggest moving it to app.config.
The Data Source should be the address of the server hosting the SQL database. If this is your machine you should use localhost, if it is a dedicated server you could use the server's IP address.
I don't think it could be the spaces around the equal sign for Password but I would get rid of those if only for consistency. Voodoo might be making your password " TrakMeData"
What I would do
Just let VS handle it by using Entity Framework to make the database connection. Right click in your Solution Explorer and select Add > ADO.NET Entity Data Model, enter a name and select EF Designer from database. Create a "New Connection..." and you'll have a handy dandy interface with a "Test Connection" button so you don't have to keep recompiling to see if the connection string in your app.config is correct. Here's a tutorial (that follows a different path to the same result) with pictures! You can probably skip the database creation bit as I'm assuming you already have one up somewhere.