I am having trouble configuring the log file path in dtsconfig. I don't want to keep changing the log file path every time I change environments.
Here are the parameters.
<Configuration ConfiguredType="Property" Path="Package.LogProviders[SSIS log provider for Text files].Properties[ConfigString]" ValueType="String">
<ConfiguredValue>SalesForceConnectLog</ConfiguredValue>
</Configuration>
<Configuration ConfiguredType="Property" Path="Package.LogProviders[SSIS log provider for Text files].Properties[Name]" ValueType="String">
<ConfiguredValue>SSIS log provider for Text files</ConfiguredValue>
</Configuration>
I tried to enter the path on [ConfigString] but it didn't work.
Is there any way I can configure the Configuration file Path.
I have an understanding that wherever I store my package but my Configuration file(XML) must be store in the place specified in the package. In my dev environment I have C Drive as such the package is in DevServerNameC:SSIS.
However, there is no C drive allocated in Prod envirnment as such package is going to rest in ProdServerName/SSIS
Now if I place my package and execute here and it will look for configuration files(XML) which are on C file path. Then I guess my package fails.
I am just wondering how can I make my package configure file path dynamic?
I'm running EM on my local box and sql server on a remote internetaccessed box.How do I specify a file path for a DTS package to access files on theremote box?For example, to run a local dts package the filepath isc:filepathfile.txt.How would I change the file path/name to allow the dts package toaccess files on the same remote machine?-Dave
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.
I was wondering if there is a way to 'Move File' with the File System Task inside of a For Each Loop container but to dynamically set the Destination path variable.
Currently, this is what I have: FileDestinationPath variable - set to C:TestFiles FileSourcePath variable - set to C:TestFiles FileNameAndLocation variable - set to blank
For Each Loop Container €“ Iterates through a folder C:TestFiles that has .txt files in it with dates in the file name. Ex: Test_09142006.txt. Sets the file path (fully qualified) to the Variable Mapping FileNameAndLocation.
Script Task (within For Each Loop, first step) €“ Sets the FileDestinationPath to the correct dated folder within C:TestFiles. For example, if the text files I want to move are for the 14th of September, it takes FileDestinationPath and appends the date folder to the end of it. The text files have a date in the file name (test_09142006.txt) and I am picking this apart (from FileNameAndLocation in the For Each Loop) to get the folder date. (dts.Variables(€œUser::FileDestinationPath€?).Value = dts.Variables(€œUser::FileDestinationPath€?).Value & €œ€? Month & €œ_€? & Day & €œ_€? & Year & €œ€?) which gives me €œC:TestFiles 9_14_2006€?.
File System Task (within For Each Loop, second step) €“ This is where the action is supposed to occur. I want it to take the FileDestinationPath and move the FileNameAndLocation file (from the For Loop) into this folder for each run.
Now as for my problem. I want this package to run everyday but it has to set the FileDestinationPath variable dynamically according to that day€™s date. Basically, how do I get this to work since I can€™t hard code the destination path variable from the start? I have the DestinationVariable on the File System Task set to the FileDestinationPath variable, after the script task builds it. However, using FileNameAndLocation as the SourceVariable on my File System Task tells me that the €œVariable €œFileNameAndLocation€? is used as a source or destination and is empty.€?
Let me know if I need to clarify further€¦...I may be missing something very simple. Any help would be greatly appreciated!
I am running my package in sql server 2012, in which i am giving network path for flat file destination. And its working fine. But if i give m local path, its giving me  error " cannot open data file" ...
I have an issue with a DTS package. We create a zip file and then attach it to emails going out using DTS. The problem is that the attachment, when received, is named using the full path to the file, so it is quite long.
Has anyone seen this before? Is there a way out of this?
I am considering mapping a drive to the share holding the file to be named, but the fact is this will shorten the name but will still result in the path being included.
I am wondering if this is a bug, as I suspect this isn't the default behaviour.
I experienced a weird error while deploying my SSIS package. After running the manifest file, i noticed that one of the configuration file's path was not updated in the dtsx file. My solution has 8 packages and almost every package has 2 configuration files. Except 1 file every other config file's path is being updated. Has anybody experieced such a problem?
I am programmatically creating a package in c#. I need this package to contain a flat file connection manager. I have been successfully able to create the connection manager with the following code:
Package p = new Package(); //New package
ConnectionManager cm = p.Connections.Add("FLATFILE"); //Add a flat file connection manager
cm.ConnectionString = "C:DevmyTestFile.txt"; //Set up the connection string
At this point, I want to configure the flat file specific properties of the connection manager (RowDelimiter, HeaderRowDelimiter, etc.). The problem is that the properties collection of the ConnectionManager object is read only. I think I could access the inner object of the connection manager and set the properties in the following way:
ConnectionManagerFlatFileClass ffClass = (ConnectionManagerFlatFileClass) cm.InnerObject; //Get the inner object
ffClass .RowDelimiter = "{LF}"; //Set the properties here Even if this would work, I do not like the solution b/c the BOL states that the ConnectionManagerFlatFileClass "supports the SQL Server 2005 infrastructure and is not intended to be used directly from your code". Does anyone know the "right" way to set these properties? Many thanks in advance! David
I cannot get the log file path read from the configuration.
If the path in the Connection Manager is invalid, package throws an error "SSIS logging provider has failed to open the log" instead of reading it from the config.file. What am I doing wrong?
Here is the portion of the config file. Everthing else is read from the config file correctly.
How do I dynamically change the file path for the source file in DTS? Can i use global variable?. if so , How do i use it in the connection task. Appreciate your help.
I'm trying to write a SP thataccept in input a parameter with the nameof a file (with complete path)but I noticed some problems....It's right this way? Thanks!set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgoALTER PROCEDURE [dbo].[BI]@FileToImport nvarchar(100)ASBEGINSET NOCOUNT ON;DECLARE @SQL nvarchar(200)SET @SQL = "BULK INSERT tmptable FROM '"+@FileToImport+"'"EXEC (@SQL)END
Hey there,I used the FOR XML PATH feature but the XML result is in only one line,it does not conserve the XML structure (treeview). When I open the XMLfile with IE, it s working very (I have the XML hierarchy) but when Iuse Visual Studio or other tool to edit it, I ve just one line!For example:<children group=""><child firstname="" lastname=""></child>=""><childfirstname=""lastname=""></child>..............................</children>............And I d like to have<children group=""><child firstname="" lastname=""></child>=""><child firstname="" lastname=""></child>..............................</children>..............To give you an example of the query:SELECTChild.group AS '@group',(SELECT firstnameAS '@firstname',lastnameAS '@lastname'FROM Collecte_Data_Extract cdeFOR XML PATH('child'), TYPE)FROM Feed AS ChildFOR XML PATH('children'), TYPEAny idea?Many thanks in advance
I have a sql compact table that stores a series of directory paths like so: C:F1BackupadministratorCDatakit.zip__--1-07272007124351.F1O C:F1BackupadministratorCDataDeploySMD_FSWsetup.exe__--1-11292007122443.F1O C:F1BackupadministratorCDataDeploySMD_FSWSMD_FSW.application__--1-11292007122443.F1O
Is there a way in sql that I can get just the directory name so the results would look like this: C:F1BackupadministratorCData C:F1BackupadministratorCDataDeploy C:F1BackupadministratorCDataDeploy
Also, is there a way to just get the file names so the results would look like this: kit.zip__--1-07272007124351.F1O setup.exe__--1-11292007122443.F1O SMD_FSW.application__--1-11292007122443.F1O
I've seen some examples with Sql server but they use the reverse function which is not available in sql compact.
Hello! Please help me. I want to know, what i do wrong or may be samewhere documentation is describe this situation:
sql server on servername filename.txt is situated on servername c:filname.txt and this query is runing on this server Version of Msjet40.dll on servername is 4.0.9025.0 SELECT ( [Host] ) AS [Host] e WHERE EXISTS(SELECT PVListFile.F1 FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source="c:";User ID="Admin";Password=;Extended Properties="text;HDR=No"')...filename#txt as PVListFile WHERE [Host] LIKE PVListFile.F1 COLLATE database_default ) AND NOT ( EXISTS(SELECT PVListFile.F1 FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source="\servernamec$";User ID="Admin";Password=;Extended Properties="text;HDR=No"')...filename#txt as PVListFile WHERE [Host] LIKE PVListFile.F1 COLLATE database_default ) ) ORDER BY e.[Host], e.[Mac], e.[startGMT], e.[stopGMT]
i get this error message [OLE/DB provider returned message: The Microsoft Jet database engine cannot open the file ''. It is already opened exclusively by another user, or you need permission to view its data.] OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' ICommandText::Execute returned 0x80004005: ]. Msg 7399, Level 16, State 1, Line 1 OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.
We are facing some issues with SSIS and thought if you could be of some help.
Actually, instead of Deploying our SSIS projects we copy the SSIS files to a different server from where we execute the SSIS Packages. The reason being, we have a Core Version of the application and this is deployed to different markets and subsequent customisations are performed in the market specific version of the Packages. The problem is although we have a Package Configuration Xml File for our Connection object, the first time when we copy the Packages, we have to manually open each of the Package and change the URL of the Xml File for Configuration. I read through some of the articles on the internet and came to know that the Package Configuration does not support relative path and only absolute path is possible.
Can you please share some of your suggestions on the above problem.
We have an encrypted drive (that can be mounted and dismounted, a third party tool to encrypt drive path). I wanted to store the secondary file to that encrypted drive path. The secondary file stores confidential information. I separated the table from the primary to secondary file. Encryption per column is not advisable to do on that table so we decided to separate that table and put it on secondary filegroup. The physical file is stored in the mounted drive path.
I can read and write in that mounted drive path. I can also read and write if the drive is unmounted (which I believe read and write is really being done). When the drive is unmounted, the physical secondary file (.ndf) is not visible to any user logging in the server itself (this is actually the goal why we do this encrypted drive setup thing). It is kept virtually somewhere in the machine. To mount it back, a password is needed.
I'm a bit confuse, somebody can advise or give their insight on this setup. I believe that when the drive is dismounted, SQL Server stored the transactions in cache until it finds that the drive is mounted back. This means that all transactions are not comitted yet. When the drive is mounted back, I think SQL Server is smart enough to check/know that the drive is physically present and will flash all the pending transaction from the cache to the hard drive.
Is my assumption correct? Is there any thing that I need to know about transaction, committed and those data flashing thing on the hard drive?
Before I launch into a long description of the issue, I was wondering whether its possible to dynamically amend the file path held in a configuration string? (I'm looking at the Package Configurations Organizer)
Basically recreating the /CONF switch in the dtexec utility
So a parent package could somehow tell a child package to pull its configuration from a selection of different xml config files at run time... I couldn't see a variable in the child package to set from the former
My only idea at the moment is to replace the Execute Package Task with an Execute Process Task, and directly invoke the child using dtexec & an expression to dynamically set the /CONF switch..
Hello, I have a situation in which I need to use a foreach iterator that will perform a transformation on each excel file in a directory. The file names will change, but the structure will stay the same.
I was able to get this working by assigning the file path for each iteration to a variable, and then using that variable to set the excelfilepath in the Excel connection manager. However, for this to work I have to assign the variable to a default file.
Because of this, when I try to deploy the package I need to also add a configuration property for the variable, otherwise the first run will fail. The dummy file doesn't even really need to exist - I just have to put in a valid path, and then use any name that has an .xls extension. After that it runs fine regardless of what is in the directory.
This seems odd that I would need to do this - am I missing something? Apart from creating the Excel Connection Manager programatically (which I'm guessing might solve this), is there a way to avoid having to specify this dummy file?
I have a query to pass .csv file data into sql table using bulkinsert . I used :
CREATE TABLE #CSVTest (CouponCode VARCHAR(200)) /* Insertion From csv Source To Table */ BULK INSERT #CSVTest FROM 'C:Apple.csv'
[Code] ....
This worked very fine to me. Now, the thing is i should pass the filename as parameter and so that what ever file i specified in execute command , query should take that file and push that file data from .csv file to sql table.
Hello, Completely new to this stuff, so sorry if I'm asking something that is painfully simple to resolve!!! Also, not sure whether there are standard formats for code, errors etc.
OK. When I create a Login.aspx file in VWD Express on my local Hard Disk Drive, the file works and runs correctly, allowing me to log in etc. However, when I do exactly the same thing using a remote Network Drive connection to an Intranet server, when you enter the Username and Password, and Click the Log In Button, the following error message appears:-
The file "[Network Drive]AuthorsApp_Dataaspnetdb.mdf" is on a network path that is not supported for database files.An attempt to attach an auto-named database for file S:AuthorsApp_Dataaspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. Then I get the following information - which I'm sure is supposed to help, but doesn't!!!
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: The file "S:AuthorsApp_Dataaspnetdb.mdf" is on a network path that is not supported for database files.An attempt to attach an auto-named database for file S:AuthorsApp_Dataaspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): The file "S:AuthorsApp_Dataaspnetdb.mdf" is on a network path that is not supported for database files.An attempt to attach an auto-named database for file S:AuthorsApp_Dataaspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +115 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +346 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +3244 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +56 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +1083 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +272 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +687 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +82 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +558 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +126 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +651 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +160 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +122 System.Data.SqlClient.SqlConnection.Open() +229 System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +114 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +225 System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1105 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +157 System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +68 System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +100 System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e) +100 System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +113 System.Web.UI.WebControls.Login.AttemptLogin() +178 System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +134 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +107 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +178 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +31 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +32 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +72 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3838
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
We have been storing packages in the File System folder. We had noticed that there seemed to be times when re-importing an existing package did not seem to update it properly. We tried deleting the existing package first rather than overwriting it, but to no avail.
Today we noticed that there were two DTS90Packages folders, one on the C drive and one on the D drive. The dates on the files in those folders showed that sometimes the import put the file on one drive, and other times on the other drive.
The MsDtsSrvr.ini.xml file shows this: "<StorePath>..Packages</StorePath> ".
We intend to stored the packages in the msdb database instead in order to work around this problem.
Msg 22006, Level 16, State 1, Line 3 xp_subdirs could not access 'ServerBSQL_Backups*.*': FindFirstFile() returned error 67, 'The network name cannot be found.'
How to check if UNC folder exists in Backup? in my code I want to check if the unc folder exists before doing backup, the unc path is retrieved from other table or backup history.
I am adding a file to a filegroup on a remote system, and i don't know the direcotry structure of that machine, how can i provide the path for FILENAME param. :eek:
ALTER DATABASE TESTDB ADD FILE (NAME = N'TESTFILE', FILENAME = N'physicalfilepath.ndf') TO FILEGROUP TESTFILEGROUP
Below is the test data and my query. Basically i am trying to get the File records along with if any error messages occurred. I am getting the output as expected but the message column has "," at the front and sometime at the end of the column. How do i avoid that.
declare @Files table (ID int identity(1,1) primary key,Filename varchar(50),Date_Created datetime) insert into @Files (Filename,Date_Created) select 'File1',GETDATE()-1 union all select 'File2',GETDATE()-1 union all select 'File3',GETDATE()-1 union all