Is It Posible To Drop Log File Or Rename It ?

Jan 16, 2001

How to drop transaction log file and create another one
or change logical name of transaction log file?
Thank for any help

View 1 Replies


ADVERTISEMENT

It Is Posible To Define Flat File Size??

Feb 27, 2008

Hi, I was wondering if it is posible to define the size of my Flat File Destination. I need a file of 2500 bytes.
Is this posible to define it in SSIS?
Thanks for your help!

View 6 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

SQL CONNECTION - INSERT - RETRIEVE ID - Rename File - UPLOAD FILE

Sep 15, 2007

Hi there,
I have inherited a databse and am building a new website to go wiht it.
There is a file upload page which will upload images to a directory.  I need to insert into the database retrieve the id just added then upload the image renaming it in the format locID(QueryString)_ImageID(retrieved from database).jpg
The page has a file upload control and a button.
I am trying to write my code behind so that when the button is clicked it inserts location id into the images table retrieves Image id. Renames the file and uploads it to the images folder.
II think i need to call the routine from another routine for the button click but the signatures are different, where am i going wrong? or for that matter have i been pissing into the wind for the last 4 hours?
CODE BEHIND

Imports System.Data
Imports System.Data.SqlClientPartial Class admin_Add_Images
Inherits System.Web.UI.PageProtected Sub UploadImage(ByVal Sender As Object, ByVal e As SqlDataSourceStatusEventArgs)
Dim LocationId As String = Request.QueryString(ID)

' create a new SqlConnectionDim NewConn As New SqlConnection
NewConn = New SqlConnection("server=desktopsqlexpress;uid=xxxxxx;pwd=xxxxxxx;database=MYLOCDEV") 'OleDbConnection i
' open the connection
NewConn.Open()Dim MyInsert = New SqlCommand("INSERT into image([LocationID]) VALUES (@LocationID); SET @NewId = Scope_Identity()")
NewConn.Close()
If Not File1.PostedFile Is Nothing And File1.PostedFile.ContentLength > 0 Then
'RENAME THE FILEDim newid As Integer = e.Command.Parameters("@NewId").Value
Dim fn As String = (LocationId & "_" & newid & ".jpg")Dim SaveLocation As String = Server.MapPath("oicImages") & "" & fn
Try
File1.PostedFile.SaveAs(SaveLocation)Response.Write("The file has been uploaded.")
Catch Exc As ExceptionResponse.Write("Error: " & Exc.Message)
End Try
ElseResponse.Write("Please select a file to upload.")

End If
End SubProtected Sub Submit1_Click(ByVal Sender As Object, ByVal e As System.EventArgs) Handles Submit1.Click

UploadImage()End Sub
End Class

View 2 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

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

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

Rename Dos File Name

Oct 1, 2004

Just a shoot in the dark here...

When SQL Server exports procs to individual files, it creatin them like

dbo.sproc.prc

Needless to say this filename is causing fits...

I've tried to do a rename to no avail

any suggestions?

View 2 Replies View Related

Rename A File

Jan 11, 2006

Hello,

I have a DTS process to import data from txt file to the sql.
The File name I import is LLEEOD.txt

and the directory is from a d:ftpewdata

When my import process completes, I have to rename that file to the current date, lets say 01-11-2006.txt

I was trying to create another DTC (txt to txt) , but I have to provide a name myself. which is a problem, since this is a weekly process.

Is there are other ways to rename the txt file>


Thank you very much.

View 3 Replies View Related

Is It Posible To Put More Than 4000 Bytes Into One Column? ( Sql Server Mobile )

Oct 11, 2006

varchar can only hold 4000 bytes
and there is no text column in sql server mobile

View 6 Replies View Related

How To Rename A File In SSIS

Sep 26, 2006

I want to rename a file that is a variable to a fixed file name in a specific folder in SQL Server System Integration Services using the File System Task Editor. Example: File1.txt to Users.txt or File2 to Users.txt.    The source file is a variable the destination file is not. Here is an example of the File System Task EditorHOW DO I SPECIFY A FIXED OR VARIABLE FOLDER NAME WITH A SPECIFIC FILE NAME?????????File System Task EditorProperties                              ValueDestination ConnectionIsDestinationPathVariable       TrueDestinationVariable                User::ArchivePathOverWriteDestination              TrueGeneralName                                    Rename a fileDescription                            File System TaskOperationOperation                             Rename fileSource ConnectionIsSourcePathVariable           TrueSourceVariable                     User::ImportFilePath Thanks

View 1 Replies View Related

ASPNETDB.MDF I Need To Rename This File

Sep 9, 2007

I need to rename this db and be able to set a path to it. This is because my webhost places all SQL databases on a seperate drive. This is a shared drive with alot of other databases. There fore my ASPNETDB.MDF needs to be renamed and have a path assigned. This doesnt seem tro be taken care of in my web.config file? Can some one help in reasigning the default database name and pathway. my other databases were pretty straight forward.
 Thanks

View 5 Replies View Related

Rename Export File After DTS

Apr 18, 2000

Hi everybody,
I am running DTS export data evry night, where my MyTable is being transformed into MyTable.txt.
In my MyTable which sits in sql 7.0 I have a field which shows today's date as julian date ( today julian date is 109).
Is there a way to write a procedure/trigger which will rename MyTable.txt on daily basis into MyTable109.txt for today;
MyTable110.txt for tomorrow; etc...
Kind of stuck with that..
Thanks alot,
rudi

View 3 Replies View Related

ActiveX To Copy And Rename File

Feb 3, 2006

Hi,

I'm looking to use ActiveX in a DTS to copy a file from on elocation to another.
I have the code for this (attached below kindly supplied by a colleague), so that's cool.

dim filesys
set filesys=CreateObject("Scripting.FileSystemObject")

If filesys.FileExists("D:CreditsCredits_MTD.mdb") Then
filesys.CopyFile "D:CreditsCredits_MTD.mdb", _
"C:CreditsCredits_200602.mdb"
End If

But what I'm looking to do is go one step further.
As you can see, it renames the file to yyyymm, but this is hard coded, and I'm looking for a coded solution so I can rename the file with yesterday's date.

Can anybody help me please?

View 4 Replies View Related

Integration Services :: Rename File In SSIS

May 14, 2013

I have csv files in the source folder being put on an hourly basis by an external software. The format of those files would be in the below way

file_demo-051420131000.csv
file_demo-051420131100.csv
file_demo-051420131200.csv
so on....

If you look at those files, they have date and time being appended

I would have move that file to a Processing folder and process the csv file and move that file to an archive folder every hour.

How would i rename the file to only file_demo.csv file.

View 15 Replies View Related

File System Task Rename Files

Feb 26, 2008



I want to rename files in a folder using filesystem task. My files are like these:

C:FOLDERDatabase20080225.bak
C:FOLDERDatabase120080225.bak etc


I want to remove this datepart and put in a C:FOLDERDatabase.bak file.

I am not quite sure about the string functions usage here...I think I have to map the destination variable to a string function output.

Any other ways to do this job ?
Thnaks for your help,
-Gish



View 2 Replies View Related

SQL 2012 :: Rename A File In SSIS (SSDT) Using Expression

Jul 23, 2015

I have a file named abc-72015.txt.

I have a package that renames the file from abc.txt to abc-72015.txt

I want to do the reverse. I wan to rename it from abc-72015.txt to abc.txt.

I have a variable named myFileValue with a value of abc.txt.

Can I do this by setting the variable as an expressions and use a function to rename it as abc.txt?

What would the syntax be?

View 4 Replies View Related

Integration Services :: File Rename Using SSIS Package

Apr 29, 2015

I have a SSIS package in which i will download the files through FTP from main server to my local server. The file names will be like as follows:

''EYE0001_20150428_0805_INV.TXT''
''EYE0001_20150428_0805_SL.TXT''
''EYE0001_20150428_0805_SV.TXT''

''EYE0002_20150428_0805_INV.TXT''
''EYE0002_20150428_0805_SL.TXT''
''EYE0002_20150428_0805_SV.TXT''

After the download is over from the server to my local server.i will manually rename the files into like this as below,

''EYE0001_20150429_0805_INV.TXT''
''EYE0001_20150429_0805_SL.TXT''
''EYE0001_20150429_0805_SV.TXT''

''EYE0002_20150429_0805_INV.TXT''
''EYE0002_20150429_0805_SL.TXT''
''EYE0002_20150429_0805_SV.TXT''

SO i need to automate this files renaming process through ssis package.

View 7 Replies View Related

To Rename A File By Attaching Date Stamp Using SSIS

Feb 26, 2008


Hi All,

I have a dataflow task that creates a text file and posts it in a FTP share.
In need to rename the file attaching datestamp(current date of package execution) at the end of filename.
For ex: My dataflowtask creates a file called 'Samplename.txt'

I need to rename it to : 'Samplename20080225.txt.

I think it can be done using the File task...I see an option to rename the file but not sure of how to configure the task to attach current datestamp.

I see some suggestions online, but complete steps on how to implement the above would be highly appreciated.


Thanks,

View 3 Replies View Related

Rename Tabs In Excel File Created By SSRS

Nov 13, 2007



I love SQL Server Reporting Services (SSRS), but it doesnt let me name the tabs when exporting to Excel. The feature is well documented as not being available.

So I figured I can use the cell(1,1) on each tab to contain the tab name, and have an SSIS job poll a file share, open the file, read the cell, rename tabs, rename the file, and then email out the file. Polling the directory and emailing is a piece of cake, but I can't find any way to rename a tab without having Excel loaded on the SERVER. Not to mention instantiating an entire instance of Excel on the SERVER every time I want to do this.

I want to leverage SSRS, and preserve the formatting of the excel file, which is why I don't just dump the data in with SSIS to begin with.

Anybody have any ideas?

View 4 Replies View Related

Integration Services :: Dataflow Task - Rename File In SSIS

Aug 26, 2015

I have a dataflow task that load data from flat file to SQL Table.

In need to rename the file with the  datestamp(current date ) at the end of filename.

I am daily getting a file like Vendor_20150820_2484.csv , Vendor_20150821_2484.csv as the file name getting changed so I cannot load data .

I want to change the file name  Vendor_20150820_2484.csv to Vendor_yyyymmdd.csv.

This file I will use to load into sql...

View 4 Replies View Related

SQL 2012 :: Restart Computer Prompt - Pending File Rename Operations Does Not Exist

Jul 21, 2014

I am attempting to install SQL Server Express 2012. Th setup support rule to "restart computer" continues to fail.

I tried to locate and change PendingFileRenameOperations under HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession Manager.

I am not able to locate PendingFileRenameOperations both when following the registry path and even searching at the HKEY levels.

View 3 Replies View Related

File To Drop Tables

Dec 6, 2006

I need to create a file that removes (drops) all of your database objects.

View 12 Replies View Related

SQL 2012 :: Not Able To Drop File Group

Dec 11, 2014

I am not able to to drop few file groups that has been created to add partition range.

Steps taken so far:

--Empty files started
DBCC ShrinkFile(YEAR2015_FG,EmptyFile);
GO
--Removing files

Alter DATABASE ETL_MART REMOVE FILEGROUP YEAR2015_FG;
GO
-- Remove parition scheme depednecy

[code]...

View 2 Replies View Related

MDF File Still Exists After DROP TABLE

Nov 5, 2005

Hello,Using Enterprise Manager, I deleted from my database the only tablethat contained records (Right-Click on Table, Choose "Delete Table").My expectation was that the LARGE .mdf file would be reduced to minimalsize (at least as small as the Northwind MDF). However, it's still 4+Gig in size!! (Northwind is 2.62 MB). This is a problem, bc I deletedthe table in order to recapture hard drive space.NOTE: I already tried using Shrink Database in EM. This significantlyreduced the size of the .mdf file from its original (i.e. pre-delete)size of 38 Gig to present size of 4 Gig.What can I do to further reduce the size of the MDF file?Thank you.

View 1 Replies View Related

Watch File Drop In Ssis

Jan 30, 2008

I have a folder that gets 2 to 3 files dropped everyday. I want to create a package that loads only the new files into the database. The old files (Processed files) remain in the same folder and cannot be moved. How do i accomplish this in ssis?

I found something about the file watcher task with the for loop, but just can't put it all together.



Any help would be appreciated.



Thanks

View 6 Replies View Related

Depending On The Drop Down Selection I Need To Show Another RDL File.

Dec 12, 2007

Hi all,

i have a requirement that user only sees drop down list and a button. when he selects an item from drop down and click button then i need to load rdl dynamically depending on the selection from the DDL.

i have created 3 rdl files, each one contains different content. I need to show the user, the selected rdl from the drop down.

is it possible in SSRS?

if you didn't understand well, feel free to ask.

please help me out.

thanks
-Praveen.

View 5 Replies View Related

Help!!!! Restore File Mdf After Exec Drop Table... To Previous State.

Aug 8, 2006

Hi all.
First, sorry about my poor english.

I have a database which above 6 gb data and i have droped all table in my database.
I try to restore from log file but my database is set to simple backup and auto shrink so log file doesn't help anymore.
I have used some software to recovery from log file too but useless.
My only hope right now is mdf file.
Please help me. How could i restore my mdf file to state before i droped tables.
Thanks

View 14 Replies View Related

Drop All Indexes In A Table, How To Drop All For User Tables In Database

Oct 9, 2006

Hi,I found this SQL in the news group to drop indexs in a table. I need ascript that will drop all indexes in all user tables of a givendatabase:DECLARE @indexName NVARCHAR(128)DECLARE @dropIndexSql NVARCHAR(4000)DECLARE tableIndexes CURSOR FORSELECT name FROM sysindexesWHERE id = OBJECT_ID(N'F_BI_Registration_Tracking_Summary')AND indid 0AND indid < 255AND INDEXPROPERTY(id, name, 'IsStatistics') = 0OPEN tableIndexesFETCH NEXT FROM tableIndexes INTO @indexNameWHILE @@fetch_status = 0BEGINSET @dropIndexSql = N' DROP INDEXF_BI_Registration_Tracking_Summary.' + @indexNameEXEC sp_executesql @dropIndexSqlFETCH NEXT FROM tableIndexes INTO @indexNameENDCLOSE tableIndexesDEALLOCATE tableIndexesTIARob

View 2 Replies View Related

Rename

Jun 6, 2008

i am trying to set up a way of renaming a table in a sp.

ive been using

exec sp_rename 'old table', 'new table'

however if i try and specify to database and owner i end up with a weired db.owm.db.own.table name in the outcome. ive tried putting using it without specifying a db name in a sp and then sched job to exec the sp but it doesnt rename, probably because it doesn know which db to look for the ld table name in. however the sched job doesnt fail?

any ideas?

View 2 Replies View Related

Rename SP

Nov 5, 2007

Hello All,

Does anyone know how to rename SP using Transact SQL ?

Thanks in advance

--kneel

View 10 Replies View Related

Rename Aspnetdb ?

Jun 4, 2007

 Hello,I have a shared hosting plan which already has aspnetdb.mdf on the server so of course I cannot use that db name for my site...I have renamed the db and now I get an error Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion My question is, how can I make this thing work?  All help is greatly appreciated! 

View 12 Replies View Related

SQL Server Rename

Aug 12, 2007

Can anybody please tell me how to rename an sql server express.
I have an SQL server instance named 'PC075/Sqlexpress'. I have to change it to 'PC075'.
Thanks,

View 4 Replies View Related







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