File Archival System Table Design

Dec 13, 2007

I am preparing to design an application that will archive files created by another application. In my SQL database I want to store details about the file and then the file its self. Each file is about 500kb in size and there will be about 20,000 files generated per year.

My preference is to store these files in a blob field. It makes storage, linking to file meta data, backup etc easy for me. I have already solved the technical issues surrounding pulling the file in and out of a blob field.

By my calculations I will need a server with 10GB of disk space for each year of files archived which doesn't seem outlandish for table size.

I do not want to design my application however to find out a year from now that I should have been storing these files in a traditional file system because of (... whatever ...) and just linking them by path in the sql database.

I'm curious what users of this forum believe to be the best practices surrounding this type of database?

View 2 Replies


ADVERTISEMENT

DB Design :: Specifying Table Types - Master Or Transaction File

Jul 17, 2015

Is it possible to categorize a table by "type"; for example "Master file" or "Transaction file"?

If yes, then:

Where is this specification made on the table, and how can I interrogate the table to determine the "type" ....

View 8 Replies View Related

Capture System.IO Rows From Incoming File And Insert Into Table

Mar 24, 2006

Ok, I'm not quite sure how to approach this one.  This is a VB.NET console app in which I want to capture each row and throw it into a table.  The reason being, they want a report on what was processed...which I'll be able to do easily in Reporting Services 2005 once this crap is in a table where it should be.
1) What should I use to do this, dataset?  I want to use stored procedures also, not inline SQL
Function here takes an incoming file, and splits it up into separate files.  I want to insert each row that is succesfully split
    Public Sub ProcessFiles(ByVal sIncomingfile As String, ByVal sOutputDirectory As String)
        If sIncomingfile <> "" And sOutputDirectory <> "" Then
            Dim f As New Security.Permissions.FileIOPermission(Security.Permissions.PermissionState.None)            f.AllLocalFiles = Security.Permissions.FileIOPermissionAccess.Read
            Dim file As New IO.FileInfo(sIncomingfile)            Dim filefs As IO.FileStream = Nothing            If file.Exists Then                Try                    filefs = New IO.FileStream(file.FullName, IO.FileMode.Open)  'Place: 1                Catch ex As Exception                    SendEmail("Incoming .mnt or .naf Filename Invalid or not found", "Place: 1")                    Application.Exit()                End Try            End If
            Dim reader As New IO.StreamReader(filefs)            Dim counter As Integer = 0
            Dim CurrentFS As IO.FileStream            Dim CurrentWriter As IO.StreamWriter            Dim extension As String = IO.Path.GetExtension(file.FullName)
            If extension = ".mnt" Then                While Not reader.Peek < 0                    Dim Line As String = reader.ReadLine                    If IsNumeric(Line.Substring(0, 1)) Then                        Dim Parts() As String = Line.Split(" "c) ' split row into parts                        If Parts(0).Length = 8 Then ' if first part is 8 then know we hit another header so cut and then write to file                            counter += 1                            If Not CurrentWriter Is Nothing Then CurrentWriter.Flush() : CurrentWriter.Close()                            CurrentFS = New IO.FileStream(IO.Path.Combine(IO.Path.GetDirectoryName(sOutputDirectory), Line.Substring(59, 4) & "[" & counter.ToString & "]" & Now.ToString("MM-dd-yyyy") & IO.Path.GetExtension(file.FullName)), IO.FileMode.Create)                            CurrentWriter = New IO.StreamWriter(CurrentFS)                        End If
                        If Not CurrentWriter Is Nothing Then                            CurrentWriter.WriteLine(Line)                        End If
                    End If                End While
                If Not CurrentWriter Is Nothing Then CurrentWriter.Flush() : CurrentWriter.Close()
                MoveFilesFTP(sOutputDirectory, "mnt")
            ElseIf extension = ".naf" Then                While Not reader.Peek < 0                    Dim Line As String = reader.ReadLine                    If Not IsNumeric(Line.Substring(0, 1)) Then ' if first part is not a number, then we know it's a header so split the file                        counter += 1                        If Not CurrentWriter Is Nothing Then CurrentWriter.Flush() : CurrentWriter.Close()                        CurrentFS = New IO.FileStream(IO.Path.Combine(IO.Path.GetDirectoryName(sOutputDirectory), Line.Substring(6, 4) & "[" & counter.ToString & "]" & Now.ToString("MM-dd-yyyy") & IO.Path.GetExtension(file.FullName)), IO.FileMode.Create)                        CurrentWriter = New IO.StreamWriter(CurrentFS)                    End If
                    If Not CurrentWriter Is Nothing Then                        CurrentWriter.WriteLine(Line)                    End If
                End While
                If Not CurrentWriter Is Nothing Then CurrentWriter.Flush() : CurrentWriter.Close()
                MoveFilesFTP(sOutputDirectory, "naf")            End If        Else            'input file not valid            SendEmail("Incoming .mnt or .naf Filename Invalid", "Place: 1")        End If    End Sub

View 2 Replies View Related

Analysis :: Large Fact Table - File System Error

Apr 29, 2015

I have  a large fact table about 500 million rows, and I am using 2008 r2, thus I am having the file system error, I have browsed online and tried all the fix , but I am still having the error . I tried taking only about year data (which was still around 200 million records) and  I was still having the error.

View 11 Replies View Related

How To Create A System Type Table/ Change User Table To System Table.

May 23, 2007

Is there any Posibility to change a User Table to System Table.

How to create one system table.

I am in Big mess that One of the Table I am using is in System Type.

I cant Index the same. Is there any Mistake we can change a user table to system table.....

View 9 Replies View Related

Archival And Purging

Jul 17, 2004

How to implement a optimal archival and purging in MSSQL SERVER
databases

View 3 Replies View Related

Archival Logic/algoritm

Feb 6, 2004

We are in need of finalizing an archival approach for one of our Web and Client server application. The major requirements are



a) User can click on Web front end to start archival process.

b) The system should move the related data to archived space in a backup location.

c) Could be a batch process.

d) The relation between tables is extensive i.e. > 30 tables need to be managed for archival one component.

e) Database size is not very huge < 10 MB.





We were planning to have a table to store archival flag, which will be set when user click on Archival. Then a batch program will copy the database in to a backup location and delete the entries from archived database where archive flag is not set and delete entry from master database where archive flag is set. The problem is how to synchronize the changes when archival process runs next time i.e. the master database would have changed so how to put that data in archival database with out removing existing data.



Any other approach/practical solutions will be very helpful.





Regards,

Mridul Mishra

View 2 Replies View Related

Testing For Archival Process

Nov 11, 2014

I am currently working on a stored procedure which will delete records from multi tables. I want to know testing approach of how I can test the same in the DEV environment.

Do I need to create all new tables copying the structure and constraints from the original tables or can use the original tables.

As the tables are used by other developers as well in the DEV environment thereby I am not sure if any important data is deleted during my unit testing.

View 1 Replies View Related

Tagging System Database Design

Apr 20, 2007

Hi Guys,I've been thinking about a normalised schema for a folksonomy syetem for my site. I'm fairly sure this is a good way to do things, but I have a coupld of questions... firstly, here's a quick low down on planned schema: Usersuser_idetc.Itemsitem_iditem_descetc.Tagstag_idtag_textItemTagstag_iduser_iditem_id Okay, now here's the thing. Obviously this is quite a normalised schema. I can retrieve all of an item's / user's tags easily. What I'd need to be able to do is return the list of tags and count for each item (perhaps just an item at a time).I can't really see any problems with this right now. But what happens if I have millions or Billions of rows. What's the proper way to retrieve tag counts for a huuuge set of data. I don't neceserrily need to implement something, but I'd quite like to know how one would get around the performance aspect of such a huge table. Ideas are welcomed greatly..Thanks. 

View 3 Replies View Related

Database Design For Email System

Nov 13, 2007

Hello to all out there

I want to design a database for an Email system.

Two options are coming to my mind

1) Whether I will go with a separate table for each user which will contain in each field information like MSGid, recipient, sender, subject, message.

2) or I will maintain the information in a single table for each user.

I am not able to comprehend the pros and cons of each solution above.

Please help.

View 3 Replies View Related

DB Design Question - Survey System

Jul 23, 2005

I've written several survey systems in which the majority of the questionshave the same or similar responses (Yes/No, True/False, scale of 1 - 5,etc).But this latest survey system I'm working on has 8-10 sections, with avariety of question attributes and answer scales. Some items have just adescription and require a Yes/No answer, others have a description and anactive status and require a Yes/No and price answer, some require a comment,etc.Rather than build a separate response table for each survey section, I wasthinking of building one generic response table, and trying to force allsections to fit by adding columns - some of which won't apply to some items.Like this:Survey Category (will apply to all items)Survey Section (will apply to all items)Item Description (will apply to all items)Item YN (will apply to all items)Item Price (will apply to about 10% of the items)Item Points (will apply to about 10% of the items)Item Active YN (will apply to about 10% of the items)Item Fail YN (will apply to about 10% of the items)Item Comment (will apply to about 10% of the items)For instance, in the structure above the field "Item YN" would representmultiple types of answers: is the item in use?, is the item in place?, isthe item given away for free?, is the item on display?, etc. Basically,anywhere a Yes/No answer is used.The advantage is one source table (rather than 8) for storing answers, andit might be easier to query and report on.The disadvantages I see are 1) it's more difficult to understand the meaningof the responses when the answer field is named Item YN, and 2) you have anon-normalized table that's difficult for a 3rd party to understand.If I have the questions and responses in separate tables, I'll use nameslike "ItemComplimentaryYN" and "ItemUsedYN" depending on the question. It'seasier for others to learn the data.I actually don't like the "generic" approach, and probably won't use it, butI figured I'd try to get some input from others who've written surveysystems.Thanks

View 5 Replies View Related

Modifying Db Design (internal Message System)

Jun 9, 2008

Hi,

I currently have an internal message system, and I want to modify the db design so users can create their own custom folders.

Currently I have just this table in use, with the bolded column, the one I want to add. With this design, I am thinking of defaulting each "folderID" in this table to a value of 0, which will denote the standard inbox folder. I think this is better because I don't think its necessary or beneficial to have each user have their own row in this table just for their standard inbox.


CREATE TABLE [dbo].[tblMessage](
[MessageID] [int] IDENTITY(1,1) NOT NULL,
[MessageFrom] [int] NOT NULL,
[MessageTo] [int] NOT NULL,
[Message] [varchar](1500) NULL,
[prevMessage] [varchar](500) NULL,
[Subject] [varchar](50) NULL,
[date] [smalldatetime] NULL,
[Checked] [tinyint] NULL,
[deletedbySender] [tinyint] NULL,
[deletedbyRecipient] [tinyint] NULL,
[IP] [varchar](15) NULL,
[folderID] [int] NULL
)

I am planning on adding a table like this below


CREATE TABLE [dbo].[tblMessage_folders]
(
[folderID] [int] IDENTITY(1,1) NOT NULL,
[userID] [int] NOT NULL,
[folderName] [varchar](50) NULL,
[dateCreated] [smalldatetime] NULL,
)


Any differing opinions, or anyone agreeing with me I would love to hear your opinions. I'm just want to be sure this doesnt create any problems I might not be seeing.

Thanks once again!!
mike123

View 2 Replies View Related

Database Design For Ticketing System; User Ticket Quotas

Mar 21, 2006

My question takes two parts; firstly, is the new table that I'm proposing going to handle the business logic I describe below, and secondly, if I put the new table in, how in hell do I use it?

Right; present schema attached.

The idea, which I hope is fairly clear from the schema, is that you send it a buch of parameters about the event, admission date, etc, and it will return all tickets matching those parameters. An example stored proc for this is below:


CREATE PROCEDURE [dbo].[getSingleTicketsByParameters]
@eventIdINT,
@standIdINT,
@admissionDateIdINT,
@bookingDateIdINT,
@concessionIdINT,
@bookingMinQuantityIdINT,
@bookingMaxQuantityIdINT,
@membershipIdINT
AS
SET NOCOUNT ON
SELECT
[tblTickets].[id],
[tblTickets].[booking_date_id],
[tblTickets].[booking_min_quantity_id],
[tblTickets].[booking_max_quantity_id],
[tblTickets].[ticket_concession_id],
[tblTickets].[membership_id],
[tblTickets].[event_id],
[tblTickets].[stand_id],
[tblTickets].[admission_date_id],
[tblTickets].[price],
[tblTickets].[availability],
[tblTickets].[description],
[tblTickets].[admin_description],
[tblTickets].[ticket_open],
[tblTickets].[ticket_live],
[tblEvents].[event_name],
[tblEvents].[event_open],
[tblStands].[stand_name],
[tblStands].[stand_open],
[tblBookingDates].[booking_start_date],
[tblBookingDates].[booking_end_date],
[tblTicketConcessions].[concession_name],
[tblBookingMinQuantities].[booking_quantity],
[tblBookingMaxQuantities].[booking_quantity],
[tblAdmissionDates].[description],
[tblAdmissionDates].[admission_start_date],
[tblAdmissionDates].[admission_end_date],
[tblAdmissionDates].[date_open],
[tblMemberships].[membership_name]
FROM [tblTickets]
LEFT JOIN [tblEvents] ON [tblEvents].[id] = [tblTickets].[event_id]
LEFT JOIN [tblStands] ON [tblStands].[id] = [tblTickets].[stand_id]
LEFT JOIN [tblBookingDates] ON [tblBookingDates].[id] = [tblTickets].[booking_date_id]
LEFT JOIN [tblTicketConcessions] ON [tblTicketConcessions].[id] = [tblTickets].[ticket_concession_id]
LEFT JOIN [tblBookingQuantities] AS tblBookingMinQuantities ON [tblBookingMinQuantities].[id] = [tblTickets].[booking_min_quantity_id]
LEFT JOIN [tblBookingQuantities] AS tblBookingMaxQuantities ON [tblBookingMaxQuantities].[id] = [tblTickets].[booking_max_quantity_id]
LEFT JOIN [tblAdmissionDates] ON [tblAdmissionDates].[id] = [tblTickets].[admission_date_id]
LEFT JOIN [tblMemberships] ON [tblMemberships].[id] = [tblTickets].[membership_id]
WHERE 1=1
AND ([tblEvents].[id]=@eventId OR @eventId=0)
AND ([tblStands].[id]=@standId OR @standId=0)
AND ([tblTicketConcessions].[id]=@concessionId OR @concessionId=0)
AND ([tblAdmissionDates].[id]=@admissionDateId OR @admissionDateId=0)
AND ([tblBookingDates].[id]=@bookingDateId OR @bookingDateId=0)
AND ([tblBookingMinQuantities].[id]=@bookingMinQuantityId OR @bookingMinQuantityId=0)
AND ([tblBookingMaxQuantities].[id]=@bookingMaxQuantityId OR @bookingMaxQuantityId=0)
AND ([tblMemberships].[id]=@membershipId OR @membershipId=0)
GO



So. It's all about to get horribly, horribly complex (well, it is to me) so take a deep breath.

Tickets are subject to quotas. However, quotas are subject to... well, at the moment they can be based on event, stand, admission date, concession, or any combination of these. They can also be based on an individual ticket. All quotas, however, are annual; they only apply to ticket purchases in the same year. For example:
- you can't buy more than 4 tickets for date A, in stand B at event C, per year.
- you can't buy more than 2 tickets for stand D per year.
- you can't buy more than 4 of ticket number 123.

Now, I'm thinking that all I need to manage this is one table, and it's going to look a little like this:

tblQuotas
id INT PK
ticket_id INT FK
event_id INT FK
stand_id INT FK
admission_date_id INT FK
quota INT

So, if I put a record in there with an event, stand and admission date - and a quota - then I've met the first business rule that I described above. If I put in a record with just a stand id and a quota, then I've met the second sort. If I put in one with just a ticket id and a quota, then I've met the third.

Now we return to that big SQL statement above. The one that says "get me all eligible tickets that match these parameters". And it's got to get a lot bigger because I now need to not only join in tblQuotas, to see if any quotas apply to the ticket I've chosen (or to the event, stand, etc that make it up), but I've also got to join in tblBasket, and tblOrders, and tblUsers, to find out how much of any particular quota they've already used up in previous orders. Although that's only orders placed in the current year, mind. And of course I also now haveto pass the users ID in as a parameter so I can look up their order history.

Your head's hurting too, right?

So... this is where I've got to:

SELECT SUM(ticket_quantity) FROM [tblBasket]
INNER JOIN [tblTickets] ON [tblBasket].[ticket_id] = [tblTickets].[id]
INNER JOIN [tblOrders] ON [tblBasket].[order_id] = [tblOrders].[id]
WHERE
[tblTickets].[stand_id] = @standId
AND [tblOrders].[user_id] = @userId
AND ([tblOrders].[order_date] BETWEEN '2006/01/01' AND '2006/12/31')


What I want to do is incorporate that into the big SQL query up top, in such a way to make it only return tickets that not only match the ticket parameters but that also aren't linked to stands, admission dates or anything else, that the user has reached their quota on.

Oh, and I'm in a bit of a hurry so do try and get a move on won't you? ;)

But seriously - how do I put those two SQL querys together? Do I need one for each paramater that might have a quota attached, or is there a quicker way? All suggestions and advice, up to and including "get an easier job, dude", received gratefully :)

View 2 Replies View Related

DB Design :: Table Design For Packages

Aug 18, 2015

I would like to create a table called product. My objective is to get list of packages available for each product in data grid view column while selecting each product. Each product may have different packages type (eg:- Nos, CTN, OTR etc). Some product may have two packages and some for 3 packages etc. Quantity in each packages also may be differ ( for eg:- for some CTN may contain 12 nos or in other case 8 nos etc). Prices for each packages also will be different that also need to show.  How to design the table.. 

Product name   :  
Nestle milk |
Rainbow milk
packages  :
CTN,OTR, NOs |

CTN, NOs
Price:
50,20,5 |
40,6

(Remarks for your reference):CTN=10nos, OTR=4 nos  
| CTN=8 Nos

View 3 Replies View Related

Integration Services :: Renaming / Replacing Part Of A File In File System Task

May 14, 2015

I'm copying files to a folder with the naming convention as follows in the source folder:

CM_ABC_MY_TEST.txt

In the destination folder, this filename needs to appear as:

CM_XYZ_MY_TEST.txt

In my File System Task, I'm pretty sure I'm going to need an expression with a replace, substring, etc. But am having a hard time nailing down the exact syntax.

View 10 Replies View Related

Help Getting Error When Using Operation Rename A File In The File System Task Editor?

Aug 18, 2006

Does anyone know how to do this using variables?  Everytime I try it, I get the

Error: Failed to lock variable for read access with error 0xc00100001. 

 I also tried it writing a script and still the same error.  If I hard code the values into the variables it works fine but I will be running this everday so that it will pull in the current date along with the filename.  So the value of the variables will change everyday.  Here is my expression:

@[User::Variable] +(DT_WSTR,4) YEAR( GETDATE() )+"0"+(DT_WSTR,2) MONTH( GETDATE() ) + (DT_WSTR,2) DAY( GETDATE() )

The result:

C:Documents and SettingsmroushDesktopOSU20060818

the 20060818 part will change everyday ie.(tomorrow will be 20060819, next day 20060820 and so on.)

 

View 6 Replies View Related

File System Task - Move File With Dynamic Destination Path

Oct 9, 2006

I am having an issue with the File System Task.

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:TestFiles9_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!

View 10 Replies View Related

File System Task Error When Using SQL Server Agent (when Move File On Network Drive)

Jun 8, 2007

I am able to run SSIS packages as SQL Server Agent jobs with a Control Flow items "File system task", if I move a file (test.txt) from a drive (c on the server (where SQL Agent jobs run) to a subdirectory on the same drive. But, if I try to move a file on a network drive, the package fail.



What I can do to solve this issue.



Bye!

Daniel

View 1 Replies View Related

SQL Server 2008 :: SSIS Copy File From SharePoint Library Using File System Task Permissions?

Jun 19, 2015

Historically I've always written a VB script to copy a file from a sharepoint library. I don't like this method because I have to input a username & password in the script and maintain a config file.

Yesterday I was playing around with using a file system task. The sharepoint file has a UNC path so why not? I created a simple test package with a single file system task that copies the sharepoint file (addressed via UNC) to another network location. Package runs fine locally.

I try running on our utility server but am getting a "The file name [SHAREPOINT UNC PATH] specified in the connection was not valid" error. Package is running with a proxy on the server and the proxy account has the same permissions to the sharepoint site (so far as I can tell) as me.

View 0 Replies View Related

Cannot Attach Mdf: Create File Encountered Operating System Error 5 While Attempting To Open The Physical File...

Sep 5, 2006

I have used the copy database wizard, but I realized I had forgotten to shrink the transaction log file. So I canceled the wizard. My database, detached by the wizard, has now disappeared. The mdf file is still there, but when I try to attach it manually I get the "create file encountered operating system error 5 while attempting to open the physical file..." error.

Any way I can recover it?

Thanks.

View 4 Replies View Related

Integration Services :: File System Task - Set Source Variable And Pickup BAK File In Directory To Delete

Nov 9, 2015

I have created a File System task which is contained in a Foreach Loop Container. I have .bak files that are populating a directory from a maintenance backup plan.

There is a point where I need to delete the .bak file's after I've zipped them all up.

How do I set the SourceVariable to read through the directory and pick up just the .bak file's in the directory to delete.

View 3 Replies View Related

DTS Migration Wizard Failed To Save Package File -with Error 0x80070002 - Th System Cannot Find The File Specified.

Jan 31, 2007

Hi,

I use the DTS 2000 Migration Wizard to migrate one of the DTS 2000 packages to SSIS. The migration failed with the following error message:


LogID=17
#Time=6:31 PM
#Level=DTSMW_LOGLEVEL_ERR
#Source=Microsoft.SqlServer.Dts.MigrationWizard.Framework.Framework
#Message=Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: Failed to save package file "C:Documents and SettingsfuMy DocumentsVisual Studio 2005ProjectsKORTONKORTONProcessCubesMF.dtsx" with error 0x80070002 "The system cannot find the file specified.".
---> System.Runtime.InteropServices.COMException (0xC001100E): Failed to save package file "C:Documents and SettingsfuMy DocumentsVisual Studio 2005ProjectsKORTONKORTONProcessCubesMF.dtsx" with error 0x80070002 "The system cannot find the file specified.".

at Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.SaveToXML(String FileName, IDTSPersist90 pPersistObj, IDTSEvents90 pEvents)
at Microsoft.SqlServer.Dts.Runtime.Application.SaveToXml(String fileName, Package package, IDTSEvents events)
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Dts.Runtime.Application.SaveToXml(String fileName, Package package, IDTSEvents events)
at Microsoft.SqlServer.Dts.MigrationWizard.DTS9HelperUtility.DTS9Helper.SaveToXML(Package pkg, String sFileLocation)
at Microsoft.SqlServer.Dts.MigrationWizard.Framework.Framework.StartMigration(PackageInfo pInfo)

Looking at the call stack, it looks like COM wrapper fails on SaveToXML. Can someone tell me how I should workaround this problem?

Thanks,

Bobby Fu

View 1 Replies View Related

Integration Services :: Reading Data File Present In A File System From A Package Deployed In SSIS DB?

Dec 4, 2014

I am trying to create and later read a data file from a package deployed in SSISDB, but it is not reading it while it is successfully creating the file. The same package when run from the file system package, runs successfully. Generating ispac and deploying in SSISDB is running for infinite time. Is it a permission issue?

View 7 Replies View Related

Operating System Error 38(Reached The End Of The File.) On File C:Datamyfile_log.LDF

Dec 21, 2006

Hi,

I am facing a problem on a server which has raid 5 solution (3 disks), the raid controller went down 2 of the disks were off in the Bios.

We added the 3 disks to a different server identical in brand and architecture, the raid controller was able to reconfigure the virtual drive H:.

All files were there, we installed sql server 2005 on the new server, but when we tried to attach the database we got the error below:

TITLE: Microsoft SQL Server Management Studio
------------------------------

Attach database failed for Server 'myserver'.  (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

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

The operating system returned error 38(Reached the end of the file.) to SQL Server during a read at offset 0x00000000af0000 in file 'C:Datamylog_log.LDF'. Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
Operating system error 38(Reached the end of the file.) on file "C:Datamylog_log.LDF" during ReadFileHdr.
Could not open new database 'mydb'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 823)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=823&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

 

I tried the following steps but it always failed:

- create a new db with the same name of the lost db;

 - put the db in emergency mode;

 - stop sql service and replace the mdf file;

 - start sql service;

 - Run Dbcc checkdb('mydb')

we got the error below:

Msg 945, Level 14, State 2, Line 1

Database 'ism0506' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.

 

Any HELP please ?

Thanks,

Tarek Ghazali

Sql Server MVP

 

View 5 Replies View Related

File System Task - Output File Variable Syntax????

Feb 7, 2007



Hi

This should be incredibly simple and easy, but I can't find any examples of how to do this.

I just want to make a File System Task move a file, and have the destination be filename + date and time. For example \serversharefilename02072007.txt

What syntax do I use in a variable to make this work?

Thanks

View 16 Replies View Related

Deleting A File From File System - Syntax Error

Jun 29, 2015

Ok so I have some dynamic sql to delete a file that is created via sql earlier on. It is to provision a copy of a database to an instance on link server. Everything works great and the files used to delete. Now, with no code changes it is throwing a syntax error. I do a print of what the dynamic sql is creating before executing and then I copy / paste what was generated into command prompt and guess what!! The file deletes.

Here is the result on screen:

@DeleteBackupFileStatement: DEL adas16.clients.advance.localwip$AvionteAP_Template_893.bak /Q
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ''.
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ''.

Here is the code that creates the statement:

SET @DeleteBackupFileStatement = NULL
BEGIN
SET @DeleteBackupFileStatement = 'DEL ' + LTRIM(RTRIM(@BackupFile)) + ' /Q'
END
PRINT '@DeleteBackupFileStatement: ' + cast(@DeleteBackupFileStatement as varchar(400))
BEGIN
EXEC adasdb.master.sys.Sp_executesql
@DeleteBackupFileStatement
END
END

The value of @BackupFile is simply the path of the file with the file name, everything in the prepared statement with the exception of DEL and the switch at the end.

View 9 Replies View Related

Move And Rename File With File System Task

Jul 12, 2006

Hello

I want to move and rename a file and embed the date/time into it, so that each time the package runs a new file is created. For example MyFile_20060712_150000.doc.

Can someone give me a hint how to do this with the File Systen Task SSIS Control Flow Item?

Thanks for an early reply

Regards

Chaepp

View 12 Replies View Related

File System Task - Dynamic Source File Name

Feb 27, 2008



Hi All,

I have a source files folder where the files generated everyday.
My goal is pick the latest file and copy this single file to another folder.
I used the Foreach loop container and got the latest file and stored the file name to a varible i.e. LatestFile
Then i want to use the File System Task to copy this to the destination.
On the beginning, I could not setup the Latestfile since I don't its name then, so when I setup the Source Connection property of the File system task, it is not allowed to leave the SourceVarible as blank!

Any suggestion?


Thanks

Micor

View 3 Replies View Related

Rename File Using File System Task Editor

Jul 13, 2006

Could someone please instruct me on how to use the File System Task Editor to rename a file? I place control on control flow tab, change the operation to rename, from there I am not sure what to do.

View 29 Replies View Related

File System Task-Moving File

Jan 19, 2008

I have the following directories

\servershare
\serversharearchvie

I have a for each file loop and inside it a data flow that pulls from one of the flat files in the directory and then a file system task. If I choose the "Move File" option in the file system task to move the file to the archive directory, it fails with an access denied message. The access denied message occurs after a message saying file was successfully deleted. I am running this from BIDS right now and my local user can write delete etc in both the above directories. However, if I do a "copy file" in the file system task it seems to work. I think what is happening is it is deleting the file first and then trying to move it, but it no longer exists because it has been deleted--is this possible? Is this a bug of some sort?

For now I am going to workaround by putting in another file system task that deletes the files after they were copied and see how that goes, but would prefer just to do the "move" option.

Thanks,
Kayda

View 3 Replies View Related

Renaming A File With File System Task

May 10, 2006

I'm having trouble working this out in SSIS. I am trying to use a File System task to rename a file using an expression so that file.zip will be renamed to filemmyy.zip at the end of every month (for instance this month would be file0506.zip).

I am using the destination expression variable. But I'm not sure what to put for DestinationConnection. It seems to want a file name, but the file name is going to be variable, so I'm not sure what to put.

Any ideas?

View 2 Replies View Related

How To Rename The File Using File System Task.

Mar 19, 2007

Hi there,

Can some one tell me how to rename the file Dynamically using file system Task.

I could able to rename the file and couldnt do it dynamical renaming.

Please let me know if anyone have an idea.



Thanks and Best Regards

View 3 Replies View Related

Using File System Task To Move A File

May 19, 2006

Hi All,

I am having a problem using the file system task, what I am trying to achieve is to move a file after it has been processed . I am using a For each loop container to process bunch of files but I want to remove the files that have been processed after every loop.To achieve this I added a File System Task after my data flow task and was using the same variable used in the for each loop container as my source variable but the package is not being validated and is gives the following error

"variable used as the source or the destination is empty"

Appreciate your help

Thanks

View 6 Replies View Related







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