DB Design :: Merge MDF And LDF Files Into One File

Jul 14, 2015

In my enviornment i have one database with 6 ndf files and 5 ldf files and one mdf file.Actuvally what i am looking is to merge 6 ndf files into one ndf file and 5 ldf files into one ldf file.is it possible to do like this? , i tried using MOVE and TO option while backup is restorating but getting below error messages.

ERROR:
Msg 3176, Level 16, State 1, Line 4
File 'J:NDFabc.ndf' is claimed by 'Finance_data2'(4) and 'Finance_data1'(3). The WITH MOVE clause can be used to relocate one or more files.

View 4 Replies


ADVERTISEMENT

Table Design Considerations For Merge Replication?

Oct 31, 2006

Can someone point me to a resource for Table Design Considerations for Merge Replication? I have an ASP.Net/SQL2K5 app that I need to run on disconnected machines, then allow dfor data sync through merge replication. I assume that the first step is getting my tables indexed in a replication friendlt manner?

Many Thanks to anyone who can point me in the right direction!

View 3 Replies View Related

DB Design :: Optimizing Merge Statement By The Use Of Indexes On Target

Nov 13, 2015

This website describes how Merge statements should be optimized by the use of indexes on the target?source tables: [URL]..... It says that a clustered index should be created on the join column in the target and a unique covering index on the source table. 

I have read in other articles that insert/delete/update statements perform worse on tables with clustered indexes as the leaf level pages will have to be reorganized.

Why in the case of Merge statement having a indexes actually improve the performance of insert/delete/update statements?

View 3 Replies View Related

Why Does The Merge Join Edit Control Take So Long To Close At Design Time?

May 14, 2008



When I'm designing a merge join in BIDs, in particular a large one with say a couple hundred columns on the left part of the join (and only 1-2 columns on the right side), it takes 2-3 minutes to close and I notice it pegs the CPU on the computer during that time. I'm developing on a quad dual core 64 bit machine with 32 Gb of RAM.


What makes this problematic is if you have a several merge joins in the pipe, and you do something like add a column. Then you have to re-open every merge join to include that column, waiting 2-3 minutes for it to close. So adding a column to a pipe with 10 merger joins will take 20-30 minutes, most of which is just waiting for edit boxes to close. I've tried the options of "work offline" and setting the ValidateExternalData to false in the merge join property but those don't help. Anyone encounter this problem?

Thanks,
Lee

View 6 Replies View Related

Merge Two Files In SQL Server

Apr 12, 2006

Hi folks!

I have a question - do you know if there is a sql command to merge two files? Basically, I want to merge the header for the xml file with actual xml data (generated via SQL) in another file - is that possible without running any DOS commands?

Something like header.txt+myfile.xml???

Thanks so much!

-Parul

View 3 Replies View Related

Merge Replication Using Files.

Nov 25, 2006

Is it possible to use merge replication without direct connection from suscriber/publisher? I'm trying to find a solution to use files for send/receive merge-replication info from/to server.

^_^,

Thank You.

View 4 Replies View Related

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

Mar 13, 2008

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

Any Suggestions?

View 3 Replies View Related

Merge Replication-Apply BCP Files

Jul 6, 2006

How can i apply a BCP files generate by Distributor in the Suscribers.

I don´t know wich parameters BCP.EXE need.

Thanks

View 6 Replies View Related

Merge Repl/new Bcp Files After 2005 Upgrade

May 27, 2008

I'll start off by saying these questions were submitted to Microsoft and no
one can give us an answer without them doing a source code review. Their
response was "these are internal BCP scripts that are used by SQL"....yes, I
know that....that doesn't help to explain why the system created them. At
this point, I don't want my compary to pay support hours for Microsoft
personnel to learn what their software does.
--------------------
We've had merge publication in place for several years.

Last year, we added some tables/articles to publications.

After the upgrade from SQL Server 2000 SP4 Standard to SQL Server 2005 SP2
Standard, when the snapshot was run, the system created some new files that
had never existed before. Also, and more importantly, these files were only
created for the articles added after the initial snapshot was created.
Articles existing in the intial snapshot did not have these type of files
created.

Examples of these files for a SA_MOVE table that was added to an existing
publication:

MSmerge_contents_SA_MOVE.bcp
MSmerge_contents_SA_MOVE_forall.bcp
MSmerge_rowtrack_SA_MOVE90.bcp
sysmergesubsetfilters_SA_MOVE.bcp
sysmergesubsetfilters_SA_MOVE90.bcp


Also some new bcps created were:

MSmerge_contents90_forall.bcp
MSmerge_genhistory90.bcp
MSmerge_rowtrack90.bcp
sysmergesubsetfilters90.bcp


The system wanted to apply these files before it would start synchronizing
data so they had to be delivered to the subscriber. It appears it was the
sysmergesubsetfilters_ files that it wanted to apply. These are all 0 in
size and we do not have filter on(at least not as far as I know...see the
addmergearticle code below).

New databases created this year that had all of the articles defined in the
publication before the initial snapshot was taken did not get these
additional files created, nor did the system want to try to send files to the
subscriber before syncrhonization could begin.

This is an example of how an article had been cretead under SQL Server 2000
when adding a new database, before an initial snapshot is run:

exec sp_addmergearticle @publication = N'Last', @article = N'SA_MOVE',
@source_owner = N'dbo', @source_object = N'SA_MOVE', @type = N'table',
@description = null, @column_tracking = N'true', @pre_creation_cmd = N'drop',
@creation_script = null, @schema_option = 0x000000003000EFF1,
@article_resolver = null, @subset_filterclause = null, @vertical_partition =
N'false', @destination_owner = N'dbo', @verify_resolver_signature = 0,
@allow_interactive_resolver = N'false', @fast_multicol_updateproc = N'true',
@check_permissions = 0

This is an example of how an article was added under SQL Server 2000 to an
existing publication that already had the initial snapshot run:

exec sp_addmergearticle @publication = N'Last', @article = N'SA_MOVE',
@source_owner = N'dbo', @source_object = N'SA_MOVE', @type = N'table',
@description = null, @column_tracking = N'true', @pre_creation_cmd = N'drop',
@creation_script = null, @schema_option = 0x000000000000EFF1,
@article_resolver = null, @subset_filterclause = null, @vertical_partition =
N'false', @destination_owner = N'dbo', @auto_identity_range = N'false',
@verify_resolver_signature = 0, @allow_interactive_resolver = N'false',
@fast_multicol_updateproc = N'true', @check_permissions = 0,
@force_invalidate_snapshot = 1


A few questions:

Does anyone have an idea why the system created these files are part of the
2005 upgrade?

What is the real purpose of the files with names such as _forall.bcp ?

Thanks for any help/info on this,

Doug

View 2 Replies View Related

DB Design :: Resizing LDF And MDF Files Of Server Databases

Jul 9, 2015

I want to control the size of ldf files and mdf files of several databases on SQL Server 2008 in my organization (manual increase), but i have a question:

What would be the best practices (best methods) for provisioning a ldf file and mdf file?  Exists any generic formula?

With this i want to avoid the shrink operation and the autogrow of sql server databases...

View 6 Replies View Related

Initialization Merge Subscription Without Copy Data In Bcp Files

Sep 27, 2007


Hi All!


Microsoft SQL Server 2005 - 9.00.3159.00 (Intel X86)
Mar 23 2007 16:15:11
Copyright (c) 1988-2005 Microsoft Corporation
Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)


40 subsribers.
Adding new article.
On any aubscribe need regenerate snapshot agent agent.
The tables are very big. With filters.
Regenerating process anew copy data in in ...ReplDataame.bcp, during 30-40 minutes for any subscriber!
Full work to small correct of replication flow during 2-3 days....


Is it possible to initialize subscription without copying bcp data?

View 5 Replies View Related

DB Design :: Database XYZ Has More Than 1000 Virtual Log Files Which Is Excessive

Jun 8, 2015

I am getting this massage in error log .

"Database XYZ has more than 1000 virtual log files which is excessive. Too many virtual log files can cause long startup and backup times. Consider shrinking the log and using a different growth increment to reduce the number of virtual log files."

I am using  sql server 2008r2.

View 5 Replies View Related

DB Design :: Clear Space On The Drive - Shrinking Log Files

May 26, 2015

I have a database which has log file size 300 GB. As the drive is filling up i need to clear the space on the drive, for that i have to shrink the log file. 

Unfortunately i dont have option to take backup of the database.And i am not able to shrink the file now. Is there any way to shrink the log file with out taking backup of it ?

View 5 Replies View Related

DB Design :: Can Use Another Server / Disk To Store Files Using FileTable Concept?

May 11, 2015

I tried samples of FileTable in SQL Server 2012 to store files in database. I have following questions.

1. When I right click on FileTable, and say Explore File Table Directory, I was taken to a directory. But if I search the same directory in my server/machine, the directory is not available.

2. Can I use some external server/disk as a directory for FileTable?

3. How easy is to use FileTables using .Net web applications?

View 2 Replies View Related

DB Engine :: Can't Use The MERGE Statement / How To Design WHERE Condition For Insert Statement

Nov 5, 2015

I've have a need with SQL Server 2005 (so I've no MERGE statement), I have to merge 2 tables, the target table has 10 fields, the first 4 are the clustered index and primary key, the source table has the same fields and index.Since I can't use the MERGE statement (I'm in SQL 2005) I have to make a double step operation, and INSERT and an UPDATE, I can't figure how to design the WHERE condition for the insert statement.

View 2 Replies View Related

Integration Services :: Move Multiple Files Based On File Names Listed In A Spreadsheet / File?

May 27, 2015

I need to move specific files from a server to another server on a monthly basis.  There are hundreds of files that are in the source directory and I need to move approximately 40 of those to the destination server.  I would like to easily add or delete the file list as needed.  I have seen where several variables were created for for each file name (and one for the path) and the ForEach Loop would go through them.  With 40 or more I was thinking that I could make a connection to an Excel spreadsheet or text file with a record for each file name and read in and and move to the next record and make that value become the content of a "FileName" variable.  Then if I wanted to add another file name I could just add another record to spreadsheet/text file or remove and the package would handle automatically....

View 10 Replies View Related

For Each File Enumrator Is Not Exceute Remaining Files If One File Fails

Oct 10, 2007



Hi All,


I my requirement I need to read all the files from folder (one by one) and insert data from those files into the database table . I am facing one issue here . If suppose while executing if any of the file fails its not executing the other files. Package stops execution.

I cannot use Redirect rows option beacuse as per requirment if file has some Data problem , I am suppose to ignore the file instead of Data Rows.

Is there is any property in for each file task .....kindly suggest

Regards
Shagun

View 1 Replies View Related

Split The Existing MDF File Into Mutliple Files As A File Group?

Jul 30, 2007

I have a huge MDF File - 120 GB File (Had setup as 1 MDF initially) -- Did not anticipate that the DB would grow to that size!!

Anyways.. I heard that the general performance woul grow if i had them as "File Groups"..

Is there anyway - to split the existing MDF file into Mutliple files as a File Group?

Where should i start? Can someone please direct me..

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

Merge Two Reports Into One Pdf File

Mar 31, 2008


I have 2 reports. It has different header, detail and footer respectively. I want to do one thing now. When I click the hyperlink in browser, it can download a PDF file that is merge 2 reports into one. Anyone has solution? (I think use the subreport is not a good idea because subreport must has the same header and footer.)

View 3 Replies View Related

DB Design :: Partition With Single File Group Or Multiple File Group?

May 19, 2015

partition with single file group or multiple file group which one best.

we have some report running from partition table, few reports don't have any partition Key and after creating 400  partition  with 400 file group it is slow.what is best practices to crate  400 file group or single file group.

View 9 Replies View Related

DB Design :: Convert A Bak File

Aug 27, 2015

Is there a redgate tool or any third party tool that would convert a .bak file to its appropriate .mdf and .ldf file? or create an .mdf and .ldf file from the .bak file?

View 13 Replies View Related

Merge Disparate Queries Into Raw File

Mar 3, 2006

I have a requirement to create a file containing security Index and Index Component data (think Dow Jones Industrial Average and the 30 securities that make up the index). The format of the file is for the first index to be listed first (with some pricing data) and then followed by each of its components on a separate line. After that comes the second index and then its components.

So, given:

index IN1 with COM1, COM2
index IN2 with COM3, COM4, COM5, COM6
index IN3 with COM7, COM8, COM9

I want:

IN1
IN1COM1
IN1COM2
IN2
IN2COM3
IN2COM4
IN2COM5
IN2COM6
IN3
etc.

Using DTS, my solution was to output each query to a temporary file and then use an ActiveX Script Task to loop through the rows and output the data in the correct order in a single file.

Is there a better solution using SSIS? I see that if I still need to use scripting, I can at the minimum send the queries to Recordset Destinations instead of the temporary files. (I am assuming that since Recordset is available as a destination, then it is accessible through code...)

View 6 Replies View Related

DB Design :: Bat File To Build A Database?

Dec 1, 2015

I have a SQL script folder on my HDD. The folder contains SQL Scripts and subfolders with Constraints and Extended properties. I need a BAT file that builds a database on my SQL Server instance.

I have the following structure:

 Tables (folder)
  dbo.Customers.sql
  dbo.OrderLines.sql
  dbo.Orders.sql
  dbo.Products.sql
  Constraints (folder)
           Foreign Keys(folder)
dbo.OrderLines.FK.sql
dbo.Orders.FK.sql
  Extended Properties(folder)
     dbo.Customers.EXTPRP.sql
     dbo.Products.EXTPRP.sql

The Server name for the SQL CMD is PCMSSQL2014? user: sa pass is empty.

View 3 Replies View Related

DB Design :: LDF File Keep Getting Corrupted From Last Two Days

Aug 6, 2015

I want to know is there any process alert me that my data or .ldf file get corrupted? 

I've been going through data corruption from last 2 days in row that .ldf getting corrupted and I've to fix it.

Is there anyway I can setup any alert? or any better procedure ?

View 31 Replies View Related

Transact SQL :: MERGE Function And OUTPUT To A File

Sep 14, 2015

I used the MERGE function for the first time. Now I have to create a pipe-delimited delta file for a 3rd party client of any deltas that may exist in our database.

What is the best way to do this? I have OUTPUT to a result set of the deltas...but I have to send over the entire table to the 3rd party via a pipe-delimited file.

View 5 Replies View Related

Merge A PDF File And SQL Reporting Services Output

Aug 6, 2006

Does anyone know how i can go about merging preexisting pdf files and SQL server reporting services output. Can this be done in reporting services? For example, I have 5 pages from a pdf files which is created from another 3rd party software provider. I then i have output from sql reporting services. How can i merge these two outputs and deliver it over .Net/ ASP framework?

thanks



View 4 Replies View Related

How To Merge Report Output Into Single File?

Mar 14, 2008

Hi

I have read a few other posts about how to merge multiple report output files into a single document e.g. a single pdf.
There are a few approaches:
1) Generate post script files and then merge and oprint via a post script driver.
2) Generate seperate pdf files and then merge them into single document using a custom library.

I have a third idea and would appreciate any input:

Dynamically generate a RDL file that contains sub-reports, one for each report required in the final document, publish and run this as the final report. This could happen way before actually running the report i.e. the user has a tool where they select reports for a pack, tool then generates new RDL file and publishes it to sql reporting services, gets run at some later point in time.

Some challenges:
-Generate a table of contents with page numbering?
-Layout of sub-reports, not sure how they would be rendered across multiple pages?
-Managing parametes across sub-reports at run time.

Any suggestions or ideas?

Thanks

T

View 1 Replies View Related

Design Advice...writing A Text File

Jul 23, 2004

I need to create a text file using information from SQL tables/views in the following format...Can anyone recommend a direction or procedure to look into, i.e, sql script, custom dts, etc. The items in parentheses identify specific portions of the text file.

(01)
101081,84423,customer ,072304,customer ,11310 Via Playa De Cortes , ,San Diego ,CA,92124,
(02) 6 ,1 , , , , ,22 ,1 ,0.00 ,160.46 ,160.46 ,0.00 , , , , , , , , ,1,1
(03)B130907540,5.41 ,1
(03)B130907550,5.41 ,1
(03)B130907560,5.41 ,1
(03)B130907570,6.04 ,1
(03)B065007550,1.72 ,2
(03)B065007560,1.72 ,6
(03)B519926530,4.66 ,13
(03)B519926550,4.66 ,12
(03)B560911200,2.14 ,1
(03)B560912500,2.14 ,1
(03)B095305750,3.65 ,1

View 5 Replies View Related

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

DB Design :: Control Growth Of Database File

Oct 7, 2015

 I currently have a DB that is growing at a rate of 10gb per month. It is set to 1mb unrestricted growth and the log file is set to 400mb restricted growth. I take regular transaction log backups so the log file is well under under without any issue. This DB's recovery model is set to FULL as it has to be mirrored to a backup site.  Any recommendations on how to control the growth. - Is it advisable to take create a new DB with data older than 2 years and transfer that file to an external drive and if i do this, can i "attach" it back to the main server if and when required ?

View 7 Replies View Related

SQL 2012 :: Relocating Log File Of Merge Subscription Database?

Mar 31, 2015

I need to move the log file of a disk and onto another disk. The log belongs to a merge subscription database.

I was going to stop/disable the merge jobs on the distributor, detach the database, move the log file to another drive, reattach, and enable the merge jobs on the distributor.

Does that sound ok, or should I employ some other method.

View 6 Replies View Related

Merge Data From Oledb Source And Flat File

Feb 26, 2008



Hi All,
In one of my SSIS Interface I have to Merge data from a Oledb source and a Flat file source.But after I read from the flat file I have do a basic validation of the file for the length of header,detail and trailer records and then process further.The above Validation I am doing within Script Component.If the validation fails the flow should pass out of the DataFlowTask without Initailsing the Oledb source.

But the problem is i am not able to connect anything to the Oledb source,i.e Oledb source is not taking any incoming Pointers.
Earlier I had done the same Validation in Control Flow Task,but then the interface was reading the same file twice,once in the Control Flow Task and then again in the DataFlowTask.Which i should avoid now.

I hope many of you could have come across such a problem.
Any help on this will be appreciated.

cheers
Srikanth Katte

View 5 Replies View Related







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