Attaching Just A Data File.

Nov 24, 2006

Hi guys,

we lost a drive that was holding our log files for a database. I have the .mdf file from the database. So I'm trying to attach the database using just the mdf file but it fails because its still looking for the log file.

How do i work around this?

View 4 Replies


ADVERTISEMENT

Attaching DB Without .ldf File ???

Aug 12, 2006

hi !!

I want to attach database to SQL Server, but I'hv only .mdf file.

I lost .ldf file, how should i attach this DB to server ?

Thanks

SP



View 38 Replies View Related

Creating Log File && Attaching Db?

Jul 7, 2004

Bit of a SQL newbie, having taken over a support role for a piece of software that my firm sells. It is basically a DB that runs on MSDE or SQL Server in either desktop or enterprise scenarios.

We do sell our software to clients who may or may not already have SQL on their machines. During installation, it searches for sqlservr.exe for existing SQL installations and if it finds nothing, will then install MSDE 1.0 to house the db files.

My question is this -

I can manually create a db or manually attach an existing db through sql query analyser where there is a full-blown SQL installation. Is there any way I can do the same where there is only MSDE installed? The simple solution, I guess, would be to download one of the freeware or shareware MSDE "Enterprise Managers", but this won't always be suitable for a client installation.

Many thanks for your assistance all.

:cool:

View 3 Replies View Related

Attaching BAK File On Database

Apr 12, 2013

there was a failure due to power shutdown,and the .mdf and .ldf files on the DB is not longer available. there is a backup done 5days ago with the title nice_cls.BAK. How do i restore or reattach the .bak file on the NICE-CLS database.

View 10 Replies View Related

Attaching DB Using Single MDF File

Feb 9, 2004

Hi there,
I'm trying to attach a DB using a single MDF file. The file was not properly detached as our server had crashed suddenly neither was the a proper backup done..When I try to attach it says
"the file you've specified is not a valid sql server database file" . But another database was restored using a MDF file without any problems ?
Please do get back if anyone may get what the problem likely is ? It'd be of great help. Let me know if my problem was clear or if I've to put it in a different fashion.

Cheers
Ganesh

View 4 Replies View Related

Error Attaching .mdf File...

Jan 7, 2008

Attemping to reattach a recovered .mdf and associated .ldf from a crashed disk drive and I am getting the error below. I attempted to create a new db, stop the service, replace the new data files with the recovered db files and restarted the SQL service so that I could run a dbcc checkdb while the db was in suspect mode, however was unable to do this. This error leads me to belive that the log file needs to be rebuild, but that the mdf files could be a decent shape. Any help would be apprecaited. Thanks!

===================================

Attach database failed for Server 'AUTOBASEAutobase'. (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

------------------------------
Program Location:

at Microsoft.SqlServer.Management.Smo.Server.AttachDatabase(String name, StringCollection files, String owner)
at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabaseData.PrimaryFile.Attach()
at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabase.SendDataToServer()

===================================

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

------------------------------
Program Location:

at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries)
at Microsoft.SqlServer.Management.Smo.Server.AttachDatabaseWorker(String name, StringCollection files, String owner, AttachOptions attachOptions)
at Microsoft.SqlServer.Management.Smo.Server.AttachDatabase(String name, StringCollection files, String owner)

===================================

An error occurred while processing the log for database 'ABSystem7'. If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log.
Could not open new database 'ABSystem7'. CREATE DATABASE is aborted. (.Net SqlClient Data Provider)

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

------------------------------
Server Name: .Autobase
Error Number: 9004
Severity: 21
State: 1
Line Number: 1


------------------------------
Program Location:

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)

View 7 Replies View Related

Attaching A Database Without A Log File

Jul 20, 2005

Hiis it possible to attach a database when a log file is missing?My database had one .MDF file and 2 .LDFs. I lost one of the .LDFs. Is itpossible to recover any data?Tegie

View 1 Replies View Related

Error Attaching .mdf File

Mar 6, 2008

I have a VBExpress 2008 application that uses LINQ to SQL to manipulate data in an SQLExpress 2005 database.

I successfully instatiate a DataContext object and examine its metadata through its .Mapping methods and properties. But when I attempt to set the DataSource for a BindingSource control to one of the tables, I get a run-time error.

Specifically:

Dim dc As New DiabetesData(My.Settings.DiabetesData_dbPath)

For Each mt As MetaTable In dc.Mapping.GetTables

...(examine some properties)...

Next


frmEZView.bsPrimary.DataSource = dc.GetTable(Of BGTest)()


generates the error:
System.Data.SqlClient.SqlException was unhandled
Class=14
ErrorCode=-2146232060
LineNumber=65536
Message="An attempt to attach an auto-named database for file SbearMedicalDiabetesDiabetesData2.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."
Number=15350
Procedure=""
Server="\.pipe8280AA0D-38A6-41 sqlquery"
Source=".Net SqlClient Data Provider"
State=1



From the Immediate window: ?My.Settings.DiabetesData_dbPath

"SbearMedicalDiabetesDiabetesData2.mdf"


bsPrimary is a BindingSource on a form named frmEZView.


Public Class DiabetesData includes a property Public BGTests As Table(Of BGTest) and a subsequent definition of BGTest.


Can anyone tell me what I'm doing wrong?

Thanks,
--Mable

View 3 Replies View Related

Attaching Database Without Ldf File?

Jul 24, 2007

Hi all,
I have deleted the .ldf file now i am having only the .mdf file. Is it possible to attach the database without shutdown the sql server.
Thanks.

View 9 Replies View Related

Attaching A SQL Server 2000 DB W/out The Log File

Oct 31, 2001

How do I reattached a SQL server database if the log file was not backed up and none is available. Our server went belly up and the backups were only copying the *.MDF files. The log files were not being included in the backup for some reason.

I know in version 7.0 you could reattach with out the log file but I am having a more difficult time figuring out how to get around thin in SQL 2000. Anybody got any ideas???

Thanks!!!

View 1 Replies View Related

Attaching A .mdf File To The MSSQL 2000 Using Commandline

Mar 30, 2007

Hi ,

we have a requirement to create a database of our application in client's system. and we assume that already MS Sql server is installed.

we have a .mdf file of our database. Is there any way I can attach .mdf file to the database using command line. so that I can write a batch file and run that batch to create the database in our client's system.

-regards

GRK

View 4 Replies View Related

Attaching SQL 2000 Database (.mdf) With Missing (.ldf) File

Mar 27, 2007

Hello



Please can anyone help me



I've been given a .mdf file from sql server 2000 which i need to attach but we do not have the .ldf file



I am unable to recover the old .ldf file



I have tried the attach single file command but obvioulsy this still looks for the old .ldf file path which no longer exists



any help would be mostly appriciated



many thanks



Martin

View 5 Replies View Related

Problem Facing When Attaching Back File To Database

May 24, 2008

I had taken back up on employee from my office. Office server name is UMASHANKAR. My server name is XYZ.  I had attached that back up file BY RIGHT CLICKING :: SERVICE OBJECT-->BACKUP DEVICES-->NEW BACK UP DEVICE.Now i create database of EMPLOYEE my server XYZ. I had tried to restore EMPLOYEE back file by right clicking EMPLOYEE database-->TASKS-->RESTORE-->FILE OR FILEGROUP-->To Database: EmployeeSource of Restore:From Device: Employee.bak(I had selected from file by browsing)i had selected recent back up.But server name in back up is UmashankarMy server name is XYZwhen i am clicking ok then i am getting this error.Restore failed for Server 'XYZ'.(Microsoft.SqlServer.Smo)Additional information:|--> An exception occured while executing a Transact-SQL statement or batch.       |       --> The media set has 2 media families but only 1 are provided. All members must be provided. All members must be provided. RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3132)Plz solve this problem. I need it urgently

View 6 Replies View Related

Getting Error On Mail Task While Attaching File Of Size &&> 2MB

Mar 14, 2007

Hi,

can any one help me , i am facing an issue on SSIS mail task, i want to attach a file of size 2 MB. it's getting error :

[Send Mail Task] Error: An error occurred with the following error message: "The operation has timed out.".

thanks,

sun.

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

SQL Server Admin 2014 :: Cannot Access Path When Attaching Database With Data Files On SMB Share

Oct 1, 2014

I have a Windows Server 2012 R2 2 node cluster with SQL Server 2014 FCI installed. Data files are on a separate Windows Server 2012 R2 file server. Data files share has been permissioned to the SQL Server service and SQL Server Agent service accounts as Full Control. NTFS Permissions are Full Control.

When I try to attach a database
CREATE DATABASE AdventureWorksDW2012
ON (FILENAME = 'apricotmssql_VIOLETMSSQL12.MSSQLSERVERMSSQLDATAAdventureWorksDW2012_Data.mdf')
FOR ATTACHI get this error:
Msg 5120, Level 16, State 101, Line 4
Unable to open the physical file "apricotmssql_VIOLETMSSQL12.MSSQLSERVERMSSQLDATAAdventureWorksDW2012_Data.mdf". Operating system error 5: "5(Access is denied.)".

If I log into the file server (called APRICOT) and look at the NTFS permissions they all look good. I have also reapplied the NTFS permissions from the root folder down.

EDIT
If I log on to one of the nodes in the cluster as the SQL Server service account and navigate to apricotmssql_VIOLETMSSQL12.MSSQLSERVERMSSQLDATA and copy and paste the data file, it works fine.

EDIT2:
If I log on to the file server and Enable Inheritance at the root level, then Replace all child objects with inheritable permission entries from this object, I get this error:

User Account Control settings on all nodes and the file server are set to Never notify

View 0 Replies View Related

Copy A Database With Copy The .mdf File And Attaching It With A New Name?

Nov 4, 2006

Hello,

if i have a given database (a model) and i want to copy this database in the same database instance. Is it ok to copy the mdf and ldf file and attach the files with a new database name in the same instance.

Or is the datebase name part of the .mdf file?

Regards
Markus





View 6 Replies View Related

SQL Server Admin 2014 :: Creating Additional Data File For A Particular File Group?

Jul 6, 2015

For a database, we have 4 data files in a particular file group and the file sizes are almost 70 GB each.

Do I come across any performance issues if I create/pre-allocate an additional data file in the same file group so that the existing files don't grow too much?

View 5 Replies View Related

SQL Server Admin 2014 :: Can Delete A Data-file Or File-group

Apr 27, 2015

In a server we had File Growth,And then We had to Add New Hard Drive And New File On It.And Now We have New server with a Huge Hard Drive.But all files remaind.Can I Reduce This files to One data file or not ?

View 3 Replies View Related

Is It Possible To Write A Format File That Skips A Few Bytes Of Header In Data File?

Jul 23, 2005

Hi,I am trying to use BULK INSERT with format file. All of our data hasfew bytes of header in the data file which I would like to skip beforedoing BULK INSERT.Is it possible to write format file to skip these few bytes ofheader before doing BULK INSERT? For example, I have a 1 GB data filewith 1000 byte header. Except for first 1000 bytes, rest of the data isgood for BULK INSERT.Thanks in advance. Sorry if it is really a dumb question as I am newto BULK INSERT and practicing still.Bob

View 7 Replies View Related

Shrink File Tool From EM Took All The Empty Space Allocated To Data File

Jul 20, 2005

I've production sql server 7 sp3 on windows NT. I had a 8GB data file ofwhich 5GB were used and 3GB were unused. I wanted to take back the unused3GB.So I did the following with EM GUI:1. I tried to "truncate fre space from end of the file". Didn't truncatethe file. I believe there was no empty space at the end of the file.2. Next I chose the option to "shrink file to 5GB". And to my horror thedata file instead of taking just 5GB took the empty spaces also and the sizeof the used data file went to 8GB.Any idea what's going on?TIA,SP

View 2 Replies View Related

Meta Data Synchronization With Excel File Source Once We Update The File

Dec 28, 2007



hi all;

1. Excel file Source--> monthly Revenue details
2. Derived Colum Transoformations
3. Oledb Destination

its my flow in one of my packates (ETL job)
Excel file contains monthly revenue details, i wanna import the excel data to my database staging table, so i've created the package.
its working fine...

Problem
if we change the new data for the next month and running the package its not running;
the same file, same format, only we delete the contents, of the file except first row of the excel sheet,
and pasting the new data;
new data is coming from Oracle DataBase in the form of excel sheet ( manually they will copy the data and sending to us)

i open that package in design mode and while double clicking the excel file source it says <column name>'s Meta Data needs to be synchronized
Do you want to Fix this issue automatically with the available external column's meta data

Clearly noted that its a data type issue; i have changed the corresponding data types as it is in the previous Excel sheet which is equivalant to the Table its copying to.

now the package is running with validation warnings, External Column "Invoice Amount" needs to be updated...etc. some 2 or three warning messages i can able to see in the package Execution wizard,

ok, i'm ready to accept these warnings, and i want my package running from my server;( packages had been deployed in to the Centeralized server; every time if we want to run the package, we have the asp.net webpage, that is executing the package in an On_click event)

The package is not running from the server, its due to the meta data change in the Excel file( i guess)

please suggest me some guide lines to resolve this meta data issue, i want my excel sheet meta data should not change when we have new updates in it;

otherwise suggest me some solutions that i can validate the excel sheet before running the package and testing whether the data is in correct format or not? its a kind of Data Profiling activity;

i know its some what crazy, but i need to maintain the system with permanent solution, instead of facing this meta data mismatch issue!!!

some what lenthy explanation--> its needed for my dear powerful microsoft responders. i think i 've explained my problem clearly, if i don't let me know your queries, i'll try my level best.

View 3 Replies View Related

SQL Connection Using SQL Native Client From A File E.g. Microsoft Data Link(udl File)

Oct 26, 2007

How to use Microsoft Data Link(Udl) type file to connect with SQL Server using SQL Native Client,If i use OLDEDB Connection i can make connection using UDL file with Database ,but how can i use a file for a connection using SQL Native Client.Is there any other data link file that can be used to connect with SQL server using SQL Native Client.

View 5 Replies View Related

SSIS - Data Flow To Flat File - Insert At Start Of File

Oct 24, 2007

Hi all,

In a foreachloop, I am inserting records into a flat file which is working fine. But the thing is that as the file grows, it takes longer for it to locate the EOF(End of File) of the flat file so as to insert the records.

I have around 70-100 lines written to the file at each loop and there are more than 20k records to be looped. wihich means that at the end I should be having 1400k - 20000k line in the text file.


One solution would be to insert the records at the start of the file itself so that it does not has to lookup the EOF each time before writting.

Another would be to generate separate files and then merge it.

Any idea how can this can be done?


Beside this I have to zip the file and then SFTP to a given address.

Any suggestion or help would be welcome.


Rdgs

David



View 5 Replies View Related

Integration Services :: Network Path For Flat File Destination - Cannot Open Data File

Apr 6, 2015

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" ...

Nothing is wrong with package.

View 10 Replies View Related

Re-Attaching DB

Aug 10, 2005

Forgive my ignorance, but I'm just working thru some examples, and I tried to reattach a db to another server, without the log file I created for the db. Having reattached it, it worked fine - without the log file??? Where does it make any log records? Why didn't it complain?

View 3 Replies View Related

Attaching MDF Without LDF

Oct 27, 2005

Hi GuysI'm recovering from a hard disk crash, trying to reattach recoveredfiles.The MDF file seems fine, but I get:"Server: Msg 9004, Level 23, State 1, Line 1An error occurred while processing the log for database'NetCoverAdmin'."when I try to include the LDF file. My command was:EXEC sp_attach_db @dbname = N'NetCoverAdmin',@filename1 = N'c:Program FilesMicrosoft SQLServerMSSQLDataNetcoverAdmin_Data.MDF',@filename2 = N'c:Program FilesMicrosoft SQLServerMSSQLDataNetcoverAdmin_Log.LDF'Is there any way I can restore the database without the LDF file?My backups where on another disk that mysteriously failed at the sametime, so I have to work what I got...Any help appreciated!!Thanks

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

SQL Server 2008 :: Log File Space Is 5 Times The Data File

Mar 16, 2015

one of my database data file is 100 GB and the log file is 500 GB.DB is in full recovery model and the transaction logs happen once in 6 hours.Even then, the Database log file isn't reducing in size.

View 9 Replies View Related

How Do I Insert Data From A Flat File Or .csv File Into An Existing SQL Database???

Mar 29, 2006

How do I insert data from a flat file or .csv file into an existing SQL database???

Here what I've come up with thus far and I but it doesn't work. Can someone please help? Let me know if there is a better way to do this... Idealy I'd like to write straight to the sql database and skip the datset all together...

strSvr = "vkrerftg"

StrDb = "Test_DB"

'connection String

strCon = "Server=" & strSvr & ";database=" & StrDb & "; integrated security=SSPI;"

Dim dbconn As New SqlConnection(strCon)

Dim da As New SqlDataAdapter()

Dim insertComm As New SqlCommand("INSERT INTO [Test_DB_RMS].[dbo].[AIR_Ouput] ([Event], [Year], [Contract Loss],[Company Loss], " & _

"[IndInsured Loss Prop],[IndInsured Loss WC],[Event Info]) " & _

"VALUES (@Event, @Year, @ConLoss, @CompLoss, @IndLossProp, @IndLossWC, @eventsInfo)", dbconn)

insertComm.Parameters.Add("@Event", SqlDbType.Int, 4, "Event")

insertComm.Parameters.Add("@Year", SqlDbType.Float, 4, "Year")

insertComm.Parameters.Add("@ConLoss", SqlDbType.Float, 4, "Contract Loss")

insertComm.Parameters.Add("@CompLoss", SqlDbType.Float, 4, "Company Loss")

insertComm.Parameters.Add("@IndLossProp", SqlDbType.Float, 4, "IndInsured Loss Prop")

insertComm.Parameters.Add("@IndLossWC", SqlDbType.Float, 4, "IndInsured Loss WC")

insertComm.Parameters.Add("@eventsInfo", SqlDbType.NVarChar, 255, "Event Info")

da.InsertCommand = insertComm

Dim upComm As New SqlCommand("UPDATE [Test_DB_RMS].[dbo].[AIR_Ouput] " & _

"SET [Event] = @Event " & _

",[Year] = @Year " & _

",[Contract Loss] = @ConLoss " & _

",[Company Loss] = @CompLoss " & _

",[IndInsured Loss Prop] = @IndLossProp " & _

",[IndInsured Loss WC] = @IndLossWC " & _

",[Event Info] = @EventInfo", dbconn)

upComm.Parameters.Add("@Event", SqlDbType.Int, 4, "Event")

upComm.Parameters.Add("@Year", SqlDbType.Float, 4, "Year")

upComm.Parameters.Add("@ConLoss", SqlDbType.Float, 4, "Contract Loss")

upComm.Parameters.Add("@CompLoss", SqlDbType.Float, 4, "Company Loss")

upComm.Parameters.Add("@IndLossProp", SqlDbType.Float, 4, "IndInsured Loss Prop")

upComm.Parameters.Add("@IndLossWC", SqlDbType.Float, 4, "IndInsured Loss WC")

upComm.Parameters.Add("@EventsInfo", SqlDbType.NVarChar, 255, "Event Info")

da.UpdateCommand = upComm

da.Update(dsAIR, "TextDB")



************* ANY HELP WOULD BE GREATLY APPRECIATED************

THANKS

View 6 Replies View Related

How Do I Insert Data From A Flat File Or .csv File Into An Existing SQL Database???

Mar 29, 2006



How do I insert data from a flat file or .csv file into an existing SQL database???

Here what I've come up with thus far and I but it doesn't work. Can someone please help? Let me know if there is a better wway to do this... Idealy I'd like to write straight to the sql database and skip the datset all together...

strSvr = "vkrerftg"

StrDb = "Test_DB"

'connection String

strCon = "Server=" & strSvr & ";database=" & StrDb & "; integrated security=SSPI;"

Dim dbconn As New SqlConnection(strCon)

Dim da As New SqlDataAdapter()

Dim insertComm As New SqlCommand("INSERT INTO [Test_DB_RMS].[dbo].[AIR_Ouput] ([Event], [Year], [Contract Loss],[Company Loss], " & _

"[IndInsured Loss Prop],[IndInsured Loss WC],[Event Info]) " & _

"VALUES (@Event, @Year, @ConLoss, @CompLoss, @IndLossProp, @IndLossWC, @eventsInfo)", dbconn)

insertComm.Parameters.Add("@Event", SqlDbType.Int, 4, "Event")

insertComm.Parameters.Add("@Year", SqlDbType.Float, 4, "Year")

insertComm.Parameters.Add("@ConLoss", SqlDbType.Float, 4, "Contract Loss")

insertComm.Parameters.Add("@CompLoss", SqlDbType.Float, 4, "Company Loss")

insertComm.Parameters.Add("@IndLossProp", SqlDbType.Float, 4, "IndInsured Loss Prop")

insertComm.Parameters.Add("@IndLossWC", SqlDbType.Float, 4, "IndInsured Loss WC")

insertComm.Parameters.Add("@eventsInfo", SqlDbType.NVarChar, 255, "Event Info")

da.InsertCommand = insertComm

Dim upComm As New SqlCommand("UPDATE [Test_DB_RMS].[dbo].[AIR_Ouput] " & _

"SET [Event] = @Event " & _

",[Year] = @Year " & _

",[Contract Loss] = @ConLoss " & _

",[Company Loss] = @CompLoss " & _

",[IndInsured Loss Prop] = @IndLossProp " & _

",[IndInsured Loss WC] = @IndLossWC " & _

",[Event Info] = @EventInfo", dbconn)

upComm.Parameters.Add("@Event", SqlDbType.Int, 4, "Event")

upComm.Parameters.Add("@Year", SqlDbType.Float, 4, "Year")

upComm.Parameters.Add("@ConLoss", SqlDbType.Float, 4, "Contract Loss")

upComm.Parameters.Add("@CompLoss", SqlDbType.Float, 4, "Company Loss")

upComm.Parameters.Add("@IndLossProp", SqlDbType.Float, 4, "IndInsured Loss Prop")

upComm.Parameters.Add("@IndLossWC", SqlDbType.Float, 4, "IndInsured Loss WC")

upComm.Parameters.Add("@EventsInfo", SqlDbType.NVarChar, 255, "Event Info")

da.UpdateCommand = upComm

da.Update(dsAIR, "TextDB")



************* ANY HELP WOULD BE GREATLY APPRECIATED************

THANKS

View 3 Replies View Related

Importing Data To An Existing Database Column From An .xsl File Or .cvs File

May 15, 2006

good morning,

 I want to load data that i receive everydays from my customers in .xls file format (excel) or cvs file format,  to the database that i have created on this purpose. but  when trying to do that whith SSIS; i got an error message .... that i can't import redudant data in my database column.

 

Best regards.

View 1 Replies View Related

SQL 2012 :: DBCC Shrinkfile Empty File Not Distributing Data Evenly In Primary File Group With Multiple Files

Apr 29, 2014

Why shrinkfile empty file does not redistribute data evenly in the primary file group with multiple files:

Please run the script attached to see what the end result is.

This is what I set up last night on my test machine.

1) Create database [FGTest] size 200MB
2) Create table called TEST on primary
3) Insert 40MB of data into test
4) Create another file group called temp in primary size 200MB
5) Shrinkfile('FGTest',emptyfile) so that all data is transfered from FGTest into temp file group.
6) Add another 2 files called DATA2 and DATA3. Both are 200MB.
7) We now have 3 empty files that I want data distributed evenly on. FGTest, DATA2 & DATA3
8) Shrinkfile('temp',emptyfile) to move all the data from temp over the 3 file groups evenly

I would expect at this stage to have the following:

FGTest = 13MB,
DATA2 = 13MB,
DATA3 = 13MB

(40MB of data over 3 files should be about 13 MBish in each file)

What I actually end up with is this:

FGTest = 20MB
DATA1 = 10MB
DATA2 = 10MB

It looks as though SQL Server is allocating 50% of all data to the original file and then 50% evenly over
the remaining files in PRIMARY.

View 3 Replies View Related







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