XML Config Files

Mar 30, 2006

I am new to SSIS. I created a XML configuration file for my package. I found lots of data on how to do this but I can't find anything on how to get the values back out. I am trying to get them out in a Script file. Any help and maybe examples would be appreciated.

View 4 Replies


ADVERTISEMENT

Puzzled By Config Files

Jul 12, 2006

I created a package, created an XML Config file, created a deployment utility and then deployed to server. I scheduled it with agent and I get this error (changed the package name in the error to IMPORT to make it more readable):

Description: The configuration file name "C:Documents and SettingschrisMy DocumentsVisual Studio 2005ProjectsIMPORTIMPORTIMPORT.dtsConfig" is not valid. Check the configuration file name.  End Warning  Warning: 2006-07-12 13:11:39.96     Code: 0x80012059     Source: IMPORT      Description: Failed to load at least one of the configuration entries for the package. Check configurations entries and previous warnings to see descriptions of which configuration failed.  End Warning  Progress: 2006-07-12 13:11:40.56     Source: Import Data      Validating: 0% complete  End Progress  Progress: 2006-07-12 13:11:40.56     Source:...  Process Exit Code 1.  The step failed.

So basically its trying to point to a config file on my dev workstation.  When I created the deploy utility it created a config file in the Deployment directory with the Manifest and the package.  I installed from the deployment directory. When installing it asked where I wanted to install and I left it the default of "C:Program FilesMicrosoft SQL Server90DTSPackagesIMPORT" and if I look in that folder the IMPORT.dtsconfig is there.

Ideas of where I went wrong?  I want to make sure I understand the whole configuration file notion correctly as I am starting to roll a bunch of packages with config files out to production.  I've done the tutorial and thought it was straightforward and made sense.  I can fix it by editing the xml of the package and removing the line pointing to my dev box - just want to know what I am doing wrong :)

View 1 Replies View Related

Config Files Get Lost...

Nov 2, 2006

I created a project with multiple packages. I created a global
config file that all packages reference. I also created a config file
for each package that contains the package specific settings. I
checked it all into TFS. I went to a different machine and checked it
all out. Upon loading a package into the IDE I got the following 3
warnings.

Warning loading MT_LSE_PROD_StageLoad.dtsx: The
configuration file "MT_LSE_PROD_StageLoad.dtsConfig" cannot be found.
Check the directory and file name.
e:contentloadersprint1aMT_LSE_PROD_StageLoad.dtsx
Warning
loading MT_LSE_PROD_StageLoad.dtsx: The configuration file
"Environment.dtsConfig" cannot be found. Check the directory and file
name. e:contentloadersprint1aMT_LSE_PROD_StageLoad.dtsx
Warning
loading MT_LSE_PROD_StageLoad.dtsx: Failed to load at least one of the
configuration entries for the package. Check configurations entries and
previous warnings to see descriptions of which configuration failed.
e:contentloadersprint1aMT_LSE_PROD_StageLoad.dtsxAny
ideas??? And yes, the files *ARE* there! I tried building the project
and it builds. I also tried doing a deployment build and that too
built. I am so confused!!!

View 2 Replies View Related

Deployment Of SSIS With Config Files

Jul 12, 2007

I went through other threads and links on this subject. Still one thing which concerns me is the config files.

My current folder path is C:Karunakaranfolder1folder2

Under folder2 I have the following files

4 dtsx files
1 .database file
1 .dtproj file
1 .dtproj.user file
1 .sln file
1 .suo file

Config folder ( C:Karunakaranfolder1folder2Config)
common.dtsConfig
oracle.dtsConfig

Based on some of the threads, when I enabled package configuration, I changed the path from
C:Karunakaranfolder1folder2Configcommon.dtsconfig -> common.dtsconfig

Once I did this, when I open the project I get a dozen of warning similar to the one below

Warning loading <package1>.dtsx: Failed to load at least one of the configuration entries for the package. Check configurations entries and previous warnings to see descriptions of which configuration failed.

What am I doing wrong here? If I have to deploy this to another box, what should I do to ensure that nothing breaks once its copied / installed?

Thanks

View 21 Replies View Related

Using Web.config Connection Strings In Code Behind Files

Jul 2, 2007

in asp usually i have code behind files those .aspx.vb file.can i make use of connection strings in there? i am not really familiar with connection strings. actually shouldn't code behind files "simulate" code being in the .aspx file themselves? i seem to not able to share variables between them? 

View 2 Replies View Related

Config Files For .Net Code In Managed Sprocs

Oct 3, 2006

I have been attempting to create a managed stored procedure which calls a web service using WSE 3.0 for security.

It appears that the WSE-generated config file (or possibly the app.config file) is not accessible to the .Net code.

Is there a method for using config files with CLR managed sprocs?


Thanks,
Max

View 1 Replies View Related

Package Xml Config Files Used In Child Packages?

Sep 19, 2007

I have a package that executes 3 other packages in it. From the command line I pass in which config file to use (just contains db/seerver) does this setting get carried over into the child packages as well?

View 3 Replies View Related

Data Source Passwords In Config Files

Aug 31, 2005

Anybody find a sound approach to being able to store DataSource connection information in a configuration and be able to access a Data Source that requires a password for login?

View 6 Replies View Related

Do SQL Server 2005/CLR Triggers Support .config Files?

Jun 5, 2006

Does anyone know if it's possible to use the standard .config file within a CLR Trigger to read properties via the System.Configuration namespace

I guess it's not possible because the CLR Trigger needs to be compiled as an assembly which is hosted by SQL Server

Thanks

Jason

View 1 Replies View Related

SSIS - Excel Connection Error When Using Config Files

Mar 26, 2008

I have several SSIS packages, some of which retrieve data from excel files - they work fine from th VS designer until I try to store configurations in a SQL database - then I get the following error:


SSIS package "ITAMdiv2.dtsx" starting.

Information: 0x4004300A at Data Flow Task, DTS.Pipeline: Validation phase is beginning.

Error: 0xC0202009 at ITAMdiv2, Connection manager "ExcelDIV2": SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21.

An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040E21 Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".

Error: 0xC020801C at Data Flow Task, Excel Source [84]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "ExcelDIV2" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.

Error: 0xC0047017 at Data Flow Task, DTS.Pipeline: component "Excel Source" (84) failed validation and returned error code 0xC020801C.


any ideas?

Thanks in advance@!

Bob

View 1 Replies View Related

Reporting Services :: Missing SSIS Extension In Config Files?

Oct 15, 2010

in order to use an SSIS package as a data source in a report, I need to enable the SSIS extension in the RSReprotDesigner.config and RSReportServer.config files.  That extension is in neither of these files. I have SSIS running on my machine with Reporting Services.

The path to RSReportServer.config: C:Program FilesMicrosoft SQL ServerMSRS10_50.MSSQLSERVERReporting ServicesReportServer

The path to RSReportDesigner.config: C:Program Files (x86)Microsoft Visual Studio 9.0Common7IDEPrivateAssemblies

Why is this extension not in either of these files?

The following is an abbreviated list of what's present in the RSReportServer.config file:

<Data>
 <Extension Name="SQL"
 <Extension Name="SQLAZURE"
 <Extension Name="SQLPDW"
 <Extension Name="OLEDB"

[Code] ....

The following is an abbreviated list of what present in the RSReporDesigner.config file:

<Data>
  <Extension Name="SQL"
  <Extension Name="SQLAZURE"
  <Extension Name="SQLPDW"
  <Extension Name="OLEDB"

[Code] ....

I'm running SQL Server 2008 R2

ProductVersion  ProductLevel  Edition 10.50.1600.1  RTM   Enterprise Edition (64-bit)

The operating system is Windows 7 Professional 64 bit.

View 6 Replies View Related

App.Config Files In A Custom Database Extension Class Library

Aug 15, 2006

Good Morning..

We're having a heck of a good time trying to implement our first CDE project in SSRS 2005.

In our SDE class library we have included an App.Config file where we want to store configuration settings..

Trouble is that when we view the configuration settings or connection string settings in debug mode, they're not being read for some reason..

Here's our app.config file:
-------------------------------------------------------------
<?xml version="1.0" encoding="utf-8" ?>


<configuration>

<configSections>

</configSections>

<appSettings>

<add key="eventLogName" value="FocusDPEEventLog" />

</appSettings>

<connectionStrings>

<add name="PassConnString" connectionString="Data Source=SOMEDATASOURSE;Persist Security Info=True;User ID=SOMEUSERNAME;Password=SOMEPASSWORD;Unicode=True"

providerName="System.Data.OracleClient" />

</connectionStrings>

</configuration>

-------------------------------------------------------------
Here's what our Immediate window Debugger is tellin' us about our configuration settings:


-------------------------------------------------------------

ConfigurationManager.AppSettings

{System.Configuration.KeyValueInternalCollection}

[System.Configuration.KeyValueInternalCollection]: {System.Configuration.KeyValueInternalCollection}

base {System.Collections.Specialized.NameObjectCollectionBase}: {System.Configuration.KeyValueInternalCollection}

AllKeys: {Dimensions:[0]}<----incorrect should be 1

ConfigurationManager.ConnectionStrings

Count = 1 <----ok, is one, but the wrong 1, see 3 lines down...

base {System.Configuration.ConfigurationElementCollection}: Count = 1

ConfigurationManager.ConnectionStrings[0]

{data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true}<--Should be PassConnString

base {System.Configuration.ConfigurationElement}: {data source=.SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true}

ConnectionString: "data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"

Name: "LocalSqlServer"

ProviderName: "System.Data.SqlClient"

Now notice the stuff in bold...I have NO IDEA where this gosh-danged thing is reading, but it doesn't seem like it's the app.config file in our class library...

thanks..

Doug

View 1 Replies View Related

SQL Jobs Calling SSIS Packages Within MSDB Not Referencing Connection Info In Config Files

Nov 13, 2007

I have deployed to production a number of nested packages (parent packages that call child packages) to the SQL msdb via the Save As option rather than building a deployment utility. These packages reference configuration files in a static location off of the c: drive on the production server. In the development environment, when connection changes are made and I run the Reload with Upgrade option the connection manager takes on the new server and user id settings. However, out on the production side I get the following error from the SQL job log:

Cannot load the XML configuration file. The XML configuration file may be malformed or not valid.

As a result the SQL job uses the default connection information which references the development database rather than the production database. I did research the error but found no good solutions. Is there a way to ensure the configuration files are formed correctly and that the packages are correctly referencing the configuration files? We are trying to run the ETL updates via a SQL job.

Any suggestions? Thanks.

T

View 3 Replies View Related

Reporting Services :: Parsing SSRS Config File And Dynamically Changing File Path Of Config File In Code

Sep 2, 2015

Currently have a single hard coded file path to the SSRS config file which parses the file and provides the reporting services web service url.  My question is how would i run this same query against 100s of servers that may or may not share the same file path as the one hard coded ?

Is there a way to query the registry to find the location of the config file of any server ? which could be on D, E, F, H, etc. 

I know I can string together the address followed by "reports" and named instance if needed, but some instances may not have used the default virtual directory name (Reports).

Am I going about this the hard way ? Is there a location where the web service url exists in a table ? I could not locate anything in the Reporting service database. Basically need to inventory all of my reporting services url's.

View 2 Replies View Related

What's The Best Practice...1 Package Many Config Or Many Package W/1 Config

Apr 4, 2007

Hello all,



I'd like to know what's considered a best practice in the following scenario...



We're in the process of converting DTS to SSIS, our current SQL2K setup has one DTS package per database, each database and package are mirror images of each other, with the exception of connection properties and the files path's they pull from. (Occasionally there may be a one off Execute SQL Task that differs from package to package...but this will be handled in a different manner outside of the package from this point on)



From a administration perspective this has been somewhat cumbersome, as every time there is a schema change we need to update the transformations in each individual package...after updating 120 packages my index finger has a bad case of carpel tunnel!



My thought with SSIS is that I can create one package, with many configuration files (one for each database).



Now my question is, 1) is this a good idea? 2) Anytime we create a new database (New Customer = New Database) and need to create a new xml config file, do I have to create the config in BIS/SSIS package then redeploy the package?...or Can I simply add a new config file to the appropriate directory and reference this config in the scheduled job?



Any suggestions are greatly appreciated!



View 1 Replies View Related

SQL Server Admin 2014 :: Separate Data Files / Log Files / TempDB / Backups

Jan 9, 2015

I proposed on a new server that we separate Data Files, Log Files, tempDB, Backups, etc. onto separate LUNS on a SAN with High Speed Solid State Drives.I was told that with the new technology with solid state SAN's that it would decrease performance and that it did not work the same way as it did when you had RAID 5's etc.I thought that if things were cared out correctly by a SAN Administrator they would know how to configure for optimal performance.

View 2 Replies View Related

For Loop - Iterate From Older Files To Newer Files Based On File's Timestamp

Mar 13, 2008

In the For Loop, How to Iterate from Older flat files to Newer flat files based on File's Timestamp. If there are some older files in that folder, it should be processed first and then continue with the newer one.

Any Suggestions?

View 3 Replies View Related

Script Task: How To Compare Files On FTP With Existing Files In Local Folder Before Transfer!

Apr 24, 2008

In the first step of my SSIS package I need to get files from FTP and dump it/them in a local directory, but it's more than that, the logic is like this:
1. If no file(s) found, stop executing and send email saying no file(s) found;
2. If file(s) found, then compare it/them with existing files in our archive folder; if file(s) already exist in archive folder, stop executing and send email saying file(s) already existed, if file(s) not in archive folder yet, then transfer it/them to the local directory for processing.

I know i have to use a script task to do this and i did some research and found examples for each of the above 2 steps and not both combined, so that's why I need some help here to get the logic incorporated right.

Thanks for the help in advance and i apologize for the long lines of code!

example for step 1:
----------------------------------------------------------------------------------------------------------

' Microsoft SQL Server Integration Services Script Task
' Write scripts using Microsoft Visual Basic
' The ScriptMain class is the entry point of the Script Task.

Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Imports Microsoft.VisualBasic.FileIO.FileSystem
Imports System.IO.FileSystemInfo

Public Class ScriptMain

' The execution engine calls this method when the task executes.
' To access the object model, use the Dts object. Connections, variables, events,
' and logging features are available as static members of the Dts class.
' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
'
' To open Code and Text Editor Help, press F1.
' To open Object Browser, press Ctrl+Alt+J.

Public Sub Main()

Dim cDataFileName As String
Dim cFileType As String
Dim cFileFlgVar As String
WriteVariable("SCFileFlg", False)
WriteVariable("OOFileFlg", False)
WriteVariable("INFileFlg", False)
WriteVariable("IAFileFlg", False)
WriteVariable("RCFileFlg", False)
cDataFileName = ReadVariable("DataFileName").ToString
cFileType = Left(Right(cDataFileName, 4), 2)
cFileFlgVar = cFileType.ToUpper + "FileFlg"
WriteVariable(cFileFlgVar, True)
Dts.TaskResult = Dts.Results.Success
End Sub
Private Sub WriteVariable(ByVal varName As String, ByVal varValue As Object)
Try
Dim vars As Variables
Dts.VariableDispenser.LockForWrite(varName)
Dts.VariableDispenser.GetVariables(vars)
Try
vars(varName).Value = varValue
Catch ex As Exception
Throw ex
Finally
vars.Unlock()
End Try
Catch ex As Exception
Throw ex
End Try
End Sub
Private Function ReadVariable(ByVal varName As String) As Object
Dim result As Object
Try
Dim vars As Variables
Dts.VariableDispenser.LockForRead(varName)
Dts.VariableDispenser.GetVariables(vars)
Try
result = vars(varName).Value
Catch ex As Exception
Throw ex
Finally
vars.Unlock()
End Try
Catch ex As Exception
Throw ex
End Try
Return result
End Function
End Class

example for step 2:
-------------------------------------------------------------------------------------------------------

' Microsoft SQL Server Integration Services Script Task

' Write scripts using Microsoft Visual Basic

' The ScriptMain class is the entry point of the Script Task.

Imports System

Imports System.Data

Imports System.Math

Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain

' The execution engine calls this method when the task executes.

' To access the object model, use the Dts object. Connections, variables, events,

' and logging features are available as static members of the Dts class.

' Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.

'

' To open Code and Text Editor Help, press F1.

' To open Object Browser, press Ctrl+Alt+J.

Public Sub Main()

Try

'Create the connection to the ftp server

Dim cm As ConnectionManager = Dts.Connections.Add("FTP")

'Set the properties like username & password

cm.Properties("ServerName").SetValue(cm, "ftp.name.com")

cm.Properties("ServerUserName").SetValue(cm, "username")

cm.Properties("ServerPassword").SetValue(cm, "password")

cm.Properties("ServerPort").SetValue(cm, "21")

cm.Properties("Timeout").SetValue(cm, "0") 'The 0 setting will make it not timeout

cm.Properties("ChunkSize").SetValue(cm, "1000") '1000 kb

cm.Properties("Retries").SetValue(cm, "1")

'create the FTP object that sends the files and pass it the connection created above.

Dim ftp As FtpClientConnection = New FtpClientConnection(cm.AcquireConnection(Nothing))

'Connects to the ftp server

ftp.Connect()

'ftp.SetWorkingDirectory("..")

ftp.SetWorkingDirectory("directoryname")

Dim folderNames() As String

Dim fileNames() As String

ftp.GetListing(folderNames, fileNames)

Dim maxname As String = ""

For Each filename As String In fileNames

' whatever operation you need to do to find the correct file...

Next

Dim files(0) As String

files(0) = maxname

ftp.ReceiveFiles(files, "C: emp", True, True)

' Close the ftp connection

ftp.Close()





'Set the filename you retreive for use in data flow

Dts.Variables.Item("FILENAME").Value = maxname

Catch ex As Exception

Dts.TaskResult = Dts.Results.Failure

End Try

Dts.TaskResult = Dts.Results.Success

End Sub

End Class

View 16 Replies View Related

SQL 2012 :: FOR FILES Command To Delete Old Backup Files On Remote Server?

Feb 24, 2015

I have the need to delete old backup files via TSQL job. Found this solution online:

PushD "
emoteservershareDIFF" &&(
forfiles -m *DIFF*.sqb -d -1 -c "cmd /c del /q @path"
) & PopD

It works remotely if I run it via command prompt. But when I add this to a TSQL job on my remote SQL instance, it runs without deleting anything. What I'm missing?

View 6 Replies View Related

IIS And The Web.config

Oct 31, 2007

Hi,My application is acting weird and the research I've done leads me to an answer why it's breaking, but not how to fix it.My web app is hosted by a remote company. I have the main website sitting in the root web directory and in a subfolder I have another application that will handle login and updating the content in the SQL 2K5 backend (not an Express DB).The website itself is able to pull in informaiton from the DB without any trouble, so I know it's able to connect to the DB and everything is peachy. The login app though is acting as though it can't get to the DB. I've applied the ASPNET schema to the DB using the aspnet_regsql.exe from the framework and the login application is using the same connection string as the main website.One thing to note here is that the website and the login app have seperate web.config files since they were developed as different projects.With my customized provider defined in the web.config for the login app I get this error on page load:"Parser Error Message: It
is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.  This
error can be caused by a virtual directory not being configured as an
application in IIS." If I comment out the custom provider, the page loads but when I try to create a user it tells me that "...the SQL Server couldn't be contacted. This may be because it doesn't accept remote connections." Thing of it is that it's not a remote connection and it's the same connection string and db as the other site.Now, the research I've done points at the two different web.config files, which makes sense. But how do I make the one web.config work for both the website and the subdirectory with the login app? Keep in mind that I can't create any new virtual directories or modify IIS since this is a remote hosting company.Can someone help me understand the fix with a little more clarity? 

View 1 Replies View Related

Config

Mar 30, 2007

Hi,

I'm kind of the first person at my new company to start a project using SSIS. My question(s) revolves around setup and configuration, maybe even best practices.

1. Connection Manager Config - What are some of the methods you use to config your connection managers? I was planning on creating a folder (C:SSISConfig or something) and keeping a config file for each connection there. That way it would be fairly trivial for each developer to also put said folder on there box for deving.

2. Solution set up - Are people creating solutions for each package or just using one Master solution and adding all the packages to that? Or maybe some combination, like having solutions for different areas of functionality or something..? I'm trying to figure out what the pain points are with different approaches.

If you have any other information or horror stories about SSIS that you think might help, feel free to pass them along.

Thanks,

-Ryan

View 1 Replies View Related

SQL Config

Mar 10, 2007

I want to make an application using a distributed database (single logical database, parts of which are located at more than one location or more than one server). It acts as a single collection of data but the database itself is geographically in separate locations.
How do I make it in SQL Server 2005?

View 4 Replies View Related

App.config?

Jul 10, 2006

Hello All,

I am trying to use a custom C# dll from within a script task. The C# dll relies on the Enterprise Library 2.0. Where do I put the enterprise library configuration when I am debugging a package and then when I have the package in production. I cannot find any documentation anywhere on this.

Thanks for any help,

Justin

View 5 Replies View Related

HELP!!! Cannot Import SSIS Package Files From .dtsx Files

Oct 8, 2007





Brief overview...Running SQL Server 2003 Server Enterprise 64 bit - All Service Packs and patches current
SQL Server 2005 Enterprise Edition 64 bit Build Microsoft SQL Server 2005 - 9.00.3054.00 (X64) Mar 23 2007 18:41:50 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)

I cannot import any SSIS packages nor crete any new folders under stored packages. I hve googled the news groups and looked at BOL to no avail. HELP!!!!

View 20 Replies View Related

Web.config File Example

May 24, 2007

Does anyone have an example of a web.config file that works with Dynamic Data controls?  I asked because I can't seem to arrange my "config sections" in any working order. I use 1 connection string in the web.config to establish a conversation with the database.   Thanks in Advance. 

View 1 Replies View Related

How To Access Web.config

Nov 15, 2007

I am using vs2005 and have a solution file with 4 projects, 2 of which are presentation layers (admin sections), 1 is a business logic layer, the other a data access layer.
The data access layer project is simply a class library that will provide data access functionality.  Im using a dataset (xsd) to create my data access objects.  My question is how do I select a connection string from the web config file (which is in each of the presentation layer projects)  as the data access layer is a class library there is no web.config.  Using the connection string selector in the dataset wizard doesnt show any available connection strings.

View 1 Replies View Related

Web.config File

Feb 21, 2008

 Hi the data connectionstring will be generated automatically in web.config file after dragging a data table from database into webpage.for example: <configuration> <add name="SQLProfileConnString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|MSPetShop4Profile.mdf;Integrated Security=True;User Instance=True"   providerName="System.Data.SqlClient"/> </> But what if I have to write the connectionString part myself, I mean where I can get  the syntax of it? Thanks a lot 

View 1 Replies View Related

SessionState In Web.config

Nov 21, 2003

When I connect locally, my app runs fine. But when I try to connect via FTP to a dedicated server, I can't connect at all. My connection string is in the web.config file. I noticed that the sessionState in web.config is automatically generated with the standard sa blank pwd. I still can't connect even when I change this to the correct uid and pwd. Does anyone know what I need to do? My conn string's data source is "." Please help.

Thank you,
Tina

View 22 Replies View Related

Get ConnectionString From Web.config

Apr 6, 2006

I've defined my connection string in the web.config file:
<add name="RealtorXConnectionString" connectionString="Data Source=localhostSQLExpress;Initial Catalog=RealtorX;User ID=sa;password=welcome" providerName="System.Data.SqlClient" />
Now I want to get that string and use it in some code where I'm going to run a query against the database.  This query happens in PageLoad, and won't be bound to any UI component.   How can I replace XXXXX below with the value stored in web.config?
Dim strConnection As String = XXXXX
Dim cn As Data.SqlClient.SqlConnection = New Data.SqlClient.SqlConnection(strConnection)
cn.Open()

View 4 Replies View Related

DTEXEC /Config

Aug 6, 2007

This was directly from BOL.

/Conf[igFile] filespec

(Optional). Specifies a configuration file to extract values from. Using this option, you can set a run-time configuration that differs from the configuration that was specified at design time for the package. You can store different configuration settings in an XML configuration file and then load the settings before package execution by using the /ConfigFile option.

Does this mean that I can specify which configuration file to use during runtime?
Or is just because I'm too desperate for that, I understood that way

Thanks

View 14 Replies View Related

Get SQL Connection For SQL Config From XML

May 30, 2007

Hi

In toder to make my SSIS packages portable, I need to be able to set connection string to sql package configuration. I thought I can do that via XML package, problem is, at execution time SQL server package configuration is queried first, then variables from XML.
This way, I have no chance to set connection via XML.
Any ideas on how to aproach this ?
(I want to have as much configuration on SQL server so I can modify it easily from future GUI application.

best regards

View 4 Replies View Related

What Happens To Config On Import?

Feb 19, 2008

I have a simple SSIS Package where the Connections are specified in Configuration files, which was built locally and I wanted to deploy it to a server. Looking at the different options I decided to try the "Import Package..." from Management Studio (SSMS), since I have limited access to the server (and no access to the file system). It does appear to have imported the package from the local file system to the servers "SSIS Package Store".

My question is, what happened to the Configurations files when a package is imported?

When I "Run Package" from SSMS, the Execute Package Utility shows Connection Managers with only part of the connection info, but it executes just fine. Also, it shows no Configurations at all.

My impression is that during "import" the connection managers are created from a snapshot of the current Configurations, so what ends up in SSIS are static connection managers, not Configurations. However I can't seem to find any documentation one way or the other. Also, I suspect that the only reason the partial connection info actually works is due to dtexecUI (?) running locally under my own account.

Any information is greatly appreciated.

Thanks

View 3 Replies View Related

Config File Is Ignored

Mar 25, 2008

I have a simple SSIS package which includes one Analysis Services Processing Task. I have created a connection manager object (cmo) and assigned it to the AS task. Within the cmo I selected a specific user name and
password to log on to the server with. Tested this [domain][user account] and it works. Now here is the problem. When I run the package either in debug mode or from a command line, the packages ignores the connection manager and
attemps to use the account I am logged into the server with.

Using a config file to hold the credentials does not work either. When DTEXEC is used, the package attempts to use the credientials used to log in to the server.


Does anyone have any ideas why this is happening?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved