Adding Datafile Breaks My Log Shipping Process

Sep 21, 2007

Hi All,

I am on sql server 2005. I have a production database that i log ship to another server and keep a standby copy of that database. Transaction logs are backed up every 15 minutes on the production database then copied to the standby server and then applied in order to the read-only standby database.

Every month we add a new partition and datafile to the production database. This causes the log shipping process to break because the read-only standby database doesn't have the new datafile present. I had hoped that the alter database command to create the datafile would be logshipped. It forces me to do a full db restore every month which is a major pain.

Has anyone encountered a similiar scenario? How can I 'log ship' the addition of a datafile every month and avoid doing a full restore of my standby db?

I should add that this is a home grown log ship process, we aren't using the sql server built-in log shipping. Here is a typical backup transaction log script that i'm using:

-- using sql litespeed
exec master..xp_backup_log @database='dbname,
@filename='d:dbbackupsdbname_txlog_<uniqueidentifier>.bak', @init=1

Any help would be greatly appreciated.

View 1 Replies


ADVERTISEMENT

SQL 2012 :: Adding Datafile To Database In Availability Group

May 15, 2015

one of my database is configured in availability group , I need to add another datafile to that database , how can I do this?

View 6 Replies View Related

Output To Fixed Width Flat File Not Adding Line Breaks

May 19, 2008

Hi All,

I have a simple SSIS package that runs a query on the db and outputs a fixed width flat file. I have all my column widths defined and in the connection manager i can preview the output. Everything looks great. All the fields fall where they should and each record is on it's own line.

When i run the SSIS program and then go open my text file with a text editor the ouput is all on the same line. I have tried changing my file format from fixed width to ragging right and adding a row delimiter but that doesn't work either. I feel like i'm missing something small here. It could even be an issue w/ my text editor (although i've tried to open the text file in multiple editors). In the flat file connection manager I have my file defined to be 187 characters long, So figure every 187 characters it should output a new line (it should add the carraige return right?).

Has anyone encountered an issue like this?


Any help would be much appreciated.

View 4 Replies View Related

Can I Configure A Separate Zip Job As A Part Of Log Shipping Process)??

Feb 6, 2008



Hi
We are planning to setup log shipping model being setup between two sqlserver 2005 enterprise edition.
Our transaction log backup sizes are not consistent through out the day.The following is the scenario.

T1 at 8.00 -- 315MB
T2 at 8.30 -- 152MB
T3 at 9.00 -- 2.5GB
T4 at 10.00 -- 500MB

The bandwidth available is 25MB/minute. We are taking the backups of Tlogs at 30mins interval.Now at 'T3' log transfer we want to zip the file on the primary server,copy the file over the WAN and unzip it standby server.
Now i wanted to know whether to perform this kind of action(Zip,copy,unzip), can i create a separate job on primary ?? which will put the unzipped file on standby and allow the log shipping job to restore the log file (T3)
Also i wish to carry my T3,T4 etc backup -- copy-- restores through my Log shipping activity.
I cannot take 15mins backup on primary server to reduce the transaction log backup size.Thts another constraint i have.
Also tell me how to zip and unzip thru command line if u hve any link.

Please advice me
thnks for the help in advance

Regards
Arvind L



View 1 Replies View Related

Log Shipping - Adding A New Server To Plan

Oct 13, 2003

I have had log shipping set up for a month at a remote site. Created another server to failover to here locally that utilizes 512K line. Microsoft has a tab on the maint plan to add another server to the log shipping plan. Shut down all log shipping, moved full backup back here locally and created new database. Used tab to add new server to log shipping server and setup plan using this database. When log shipping starts up for this new server it fails. Error shows it is looking for the first log file that was sent over a month ago. Am I correct in assuming that the only way you can really add another log server is to do it at the same time? If so it's kind of stupid to have the tab to add the server. My log files are pushed over every 5 minutes, and I remove them after 1 week.

View 3 Replies View Related

Page Breaks In PDF Don't Match Page Breaks In HTML

Mar 7, 2007

I have several nested sub-total groups that are all coded to "page break at end". I don't know how to tell RS to suppress the page break if one sub-total immediately follows another. The initial HTML output seems to be smart enough to do this suppression on its own, but when I export to PDF, all the page breaks appear. This causes several pages at the end of the report with one line per page. Perhaps, if I could explicitly suppress these page breaks, the PDF would render properly. How can I do this?

View 1 Replies View Related

Log Shipping - Switching Recovery Model In Log Shipping

May 13, 2007

Hi





I could not able to find Forums in regards to 'Log Shipping' thats why posting this question in here. Appriciate if someone can provide me answers depends on their experience.

Can we switch database recovery model when log shipping is turned on ?

We want to switch from Full Recovery to Bulk Logged Recovery to make sure Bulk Insert operations during the after hours load process will have some performance gain.

Is there any possibility of loosing data ?



Thanks

View 1 Replies View Related

Log Shipping: How To Failback After A Failover Log Shipping?

Jun 8, 2006

Hi,

I 'm sure I am missing something obvious, hopefully someone could point it out. After a failover log shipping, I want to fail back to my inital Primary server database; however, my database is marked as loading. How can I mark it as normal?

I did the failover as follow:

I did a failover log shipping from the 2 server Sv1 (Primary) and Sv2 (Secondary) by doing the following

1) Stop the primary database by using sp_change_primary_role (Sv1)

2) Change the 2nd server to primary server by running sp_change_secondary_role (Sv2)

3) Change the monitor role by running sp-change_monitor_role (Sv2)

4) Resolve the log ins - (Sv2)

5) Now I want to fail back - I copy the TRN files to Sv1 - use SQL Ent to restore the database at point in time. The task is done; however, the database is still mark as loading. I could not use sp_dboption.

I appreciate any suggestion.

Thanks in advance

View 5 Replies View Related

Datafile Lost

Nov 7, 2007

I lost my datafile , that's corrupted and I don't have database backup. Any idea ?:(

View 1 Replies View Related

Datafile Usage

Nov 3, 2004

If a database consists of more than one datafile, how does SQL Server use the space in these datafiles ?, does it fill up the first one then move to the next and so forth, or does it use up pages across all the files evenly ?.

View 3 Replies View Related

How To Get Datafile Online Again?

May 23, 2007

Hi need to something like this:

"alter database modify file (name=<name>, ONLINE)",

but it isn't possible.



Here what I did:

alter database bdj add file (name ='bdjfg1', filename='d:db
djfg1.ndf' )
to filegroup bdjfg;


alter database bdj modify file (name='bdjfg1', OFFLINE);


alter database bdj modify file (name ='bdjfg1', filename='d:db
ewdestdjfg1.ndf' );
--Msg 5056, Level 16, State 4, Line 1
--Cannot add, remove, or modify a file in filegroup 'bdjfg' because
the filegroup is offline.


alter database bdj modify filegroup bdjfg READWRITE;
--Msg 5056, Level 16, State 3, Line 1
--Cannot add, remove, or modify a file in filegroup 'bdjfg' because
the filegroup is offline.



Yes, yes and should have read the cautions section saying:

"Use this option only when the file is corrupted and can be restored. A file set to OFFLINE can only
be set online by restoring the file from backup. For more information about restoring a single file,
see RESTORE (Transact-SQL)."



But I have not an backup of the datafile, but I have the datafile itself!

What can I do to get it online again, the old location could be fine, but it would be better on an new location (thats is the reason for all the trouble, the original drive has not much space left, so I wanted to move the datafile)



What can I do, HELP

/Bjorn



View 1 Replies View Related

Cannot Open The Datafile

Mar 12, 2008

Hi,

If I run the package from BIDS, it works fine. If I run the package inside Management Studio it works when I run it as a package.

It does NOT run when I schedule the job.

Error: 2008-03-12 10:51:56.16
Code: 0xC020200E
Source: Data Flow Task Flat File Destination [194]
Description: Cannot open the datafile "D:old_timesheet_reposTimeSheetfilesdate.txt". End Error
Error: 2008-03-12 10:51:56.16
Code: 0xC004701A
Source: Data Flow Task DTS.Pipeline
Description: component "Flat File Destination" (194) failed the pre-execute phase and returned error code 0xC020200E. End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 10:51:55 AM Finished: 10:51:56 AM Elapsed: 0.344 seconds.
The package execution failed. The step failed.,00:00:01,0,0,,,,0

Any idea?

Thanks in advance.
Eric.

View 6 Replies View Related

Transaction (Process ID 135) Was Deadlocked On Lock Resources With Another Process And Has Been Chosen As The Deadlock Victim.

Nov 14, 2007



Hi,

I was trying to extract data from the source server using OLEDB Source and SQL Server Destination when i encountered this error:

"Transaction (Process ID 135) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.".

What must be done so that even if the table being queried is locked, i wouldn't experience any deadlock?

cherriesh

View 4 Replies View Related

FCB::Open: Operating System Error 32(The Process Cannot Access The File Because It Is Being Used By Another Process.) Occurred W

Dec 3, 2007

Hello all,
I am running into an interesting scenario on my desktop. I'm running developer edition on Windows XP Professional (9.00.3042.00 SP2 Developer Edition). OS is autopatched via corporate policy and I saw some patches go in last week. This machine is also a hand-me-down so I don't have a clean install of the databases on the machine but I am local admin.

So, starting last week after a forced remote reboot (also a policy) I noticed a few of the databases didn't start back up. I chalked it up to the hard shutdown and went along my merry way. Friday however I know I shut my machine down nicely and this morning when I booted up, I was in the same state I was last Wenesday. 7 of the 18 databases on my machine came up with

FCB:pen: Operating system error 32(The process cannot access the file because it is being used by another process.) occurred while creating or opening file 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataTest.mdf'. Diagnose and correct the operating system error, and retry the operation.
and it also logs
FCB:pen failed: Could not open file C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataTest.mdf for file number 1. OS error: 32(The process cannot access the file because it is being used by another process.).

I've caught references to the auto close feature being a possible culprit, no dice as the databases in question are set to False. Recovery mode varies on the databases from Simple to Full. If I cycle the SQL Server service, whatever transient issue it was having with those files is gone.
As much as I'd love to disable the virus scanner, network security would not be amused. The data and log files appear to have the same permissions as unaffected database files. Nothing's set to read only or archive as I've caught on other forums as possible gremlins. I have sufficient disk space and the databases are set for unrestricted growth.

Any thoughts on what I could look at? If it was everything coming up in RECOVERY_PENDING it's make more sense to me than a hit or miss type of thing I'm experiencing now.

View 13 Replies View Related

[Execute Process Task] Error:The Process Exit Code Was -1 While The Expected Was 0.

Mar 11, 2008

Dear list
Im designing a package that uses Microsofts preplog.exe to prepare web log files to be imported into SQL Server

What Im trying to do is convert this cmd that works into an execute process task
D:SSIS ProcessPrepweblogProcessLoad>preplog ex.log > out.log
the above dos cmd works 100%



However when I use the Execute Process Task I get this error
[Execute Process Task] Error: In Executing "D:SSIS ProcessPrepweblogProcessLoadpreplog.exe" "" at "D:SSIS ProcessPrepweblogProcessLoad", The process exit code was "-1" while the expected was "0".

There are two package varaibles
User::gsPreplogInput = ex.log
User::gsPreplogOutput = out.log

Here are the task properties
RequireFullFileName = True
Executable = D:SSIS ProcessPrepweblogProcessLoadpreplog.exe
Arguments =
WorkingDirectory = D:SSIS ProcessPrepweblogProcessLoad
StandardInputVariable = User::gsPreplogInput
StandardOutputVariable = User::gsPreplogOutput
StandardErrorVariable =
FailTaskIfReturnCodeIsNotSuccessValue = True
SuccessValue = 0
TimeOut = 0

thanks in advance
Dave

View 1 Replies View Related

Execute Process Task Error - The Process Exit Code Was 1 While The Expected Was 0.

Jan 30, 2007

How do I use the execute process task? I am trying to unzip the file using the freeware PZUnzip.exe and I tried to place the entire command in a batch file and specified the working directory as the location of the batch file, but the task fails with the error:

SSIS package "IngramWeeklyPOS.dtsx" starting.

Error: 0xC0029151 at Unzip download file, Execute Process Task: In Executing "C:ETLPOSDataIngramWeeklyUnzip.bat" "" at "C:ETLPOSDataIngramWeekly", The process exit code was "1" while the expected was "0".

Task failed: Unzip download file

SSIS package "IngramWeeklyPOS.dtsx" finished: Success.

Then I tried to specify the exe directly in the Executable property and the agruments as the location of the zip file and the directory to unzip the files in, but this time it fails with the following message:

SSIS package "IngramWeeklyPOS.dtsx" starting.

Error: 0xC002F304 at Unzip download file, Execute Process Task: An error occurred with the following error message: "%1 is not a valid Win32 application".

Task failed: Unzip download file

SSIS package "IngramWeeklyPOS.dtsx" finished: Success.

The command in the batch file when run from the command line works perfectly and unzips the file, so there is absolutely no problem with the command, I believe it is just the set up of the variables on the execute process task editor under Process. Any input on resolving this will be much appreciated.

Thanks,

Monisha

View 1 Replies View Related

Execute Process Task - Error :The Process Exit Code Was 2 While The Expected Was 0.

Mar 20, 2008



I am designing a utility which will keep two similar databases in sync. In other words, copying the new data from db1 to db2 and updating the old data from db1 to db2.

For this I am making use of the 'Tablediff' utility which when provided with server name, database, table info will generate .sql file which can be used to keep the target table in sync with the source table.

I am using the Execute Process Task and the process parameters I am providing are:



WorkingDirectory : C:Program Files (x86)Microsoft SQL Server90COM
Executable : C:SQL_bat_FilesSQL5TC_CTIcustomer.bat

The customer.bat file will have the following code:
tablediff -sourceserver "LV-SQL5" -sourcedatabase "TC_CTI" -sourcetable "CUSTOMER_1" -destinationserver "LV-SQL2" -destinationdatabase "TC_CTI" -destinationtable "CUSTOMER" -f "c:SQL_bat_Filessql5TC_CTIsql_filescustomer1"

the .sql file will be generated at: C:SQL_bat_Filessql5TC_CTIsql_filescustomer1.

The Problem:
The Execute Process Task is working fine, ie., the tables are being compared correctly and the .SQL file is being generated as desired. But the task as such is reporting faliure with the following error :

[Execute Process Task] Error: In Executing "C:SQL_bat_FilesSQL5TC_CTIpackage_occurrence.bat" "" at "C:Program Files (x86)Microsoft SQL Server90COM", The process exit code was "2" while the expected was "0". ]

Some of you may suggest to just set the ForceExecutionResult = Success (infact this is what I am doing now just to get the program working), but, this is not what I desire.

Can anyone help ?




View 9 Replies View Related

Integration Services :: Dataload Process - Error Capturing Process

Aug 20, 2014

I'm pulling data from Oracle db and load into MS-SQL 2008.For my data type checks during the data load process, what are options to ensure that the data being processed wouldn't fail. such that I can verify first in-hand with the target type of data and then if its valid format load it into destination table else mark it with error flag and push into errors table... All this at the row level.One way I can think of is to load into a staging table then get the source & destination table -column data types, compare them and proceed.

should I just try loading the data directly and if it fails try trouble shooting(which could be a difficult task as I wouldn't know what caused error...)

View 3 Replies View Related

Sql Server - Datafile Location

Aug 3, 2001

Hi,
Is there any way to change the location for the datafile. I need to change the drive from say c to d because it is filling up. Is there anyway to do this or do I have to recreate the database from scracth. I have a whole lot of data in the database already.

Thank you all.

View 1 Replies View Related

Moving Datafile On SQL Server 7.0

Dec 14, 2004

Hi All,

I have a database -- MDB -- with datafile for data and transaction log under the folder d:mssqldata . Now i want to move the data file from d: to e:, say e:mssqldata . Can someone let me know if this is possible under SQL server v7.0 and if so, how

View 2 Replies View Related

Shrink + Remove Datafile

Nov 2, 2005

Hi,
i try to shrink and remove one datafile. But i always get following error:

Server: Msg 5042, Level 16, State 1, Line 1
The file 'M1Pdata15' cannot be removed because it is not empty.

***********************************************
use M1K
go
dbcc shrinkfile (M1Pdata15,emptyfile)
go
use master
go
Alter database M1K
remove file M1Pdata15
go
***********************************************

Microsoft SQL Server 2000 - 8.00.760 (Intel X86)

After Shrinking the file has 1.94 MB.

please help.

thx

DocHolliday1108

View 5 Replies View Related

Moving Datafile To Different Filegroup

Nov 10, 2005

Hi,
In SQL Server 2000 how to move a secondary data file to different filegroup without removing and re-creating the secondary data file.

Thanks in advance.
-S

View 1 Replies View Related

Best Way To Move Datafile From C Drive To D

Aug 17, 2006

I obviously did not search the archives on the right terms so what isthe easiest and fastest way to move a 3G database from a nearly full Cdrive to the nearly empty D drive that should have been used.I could back it up, drop it, recreate it using the D drive, and restoreit but it seems like there should be a way to just move the datafileand use if from the new location.I am thinking that detatch/attach is the best method, but I would likeconfirmation or suggestions on how to proceed or things to be aware ofwhen using this method.-- Mark D Powell --

View 8 Replies View Related

Datafile SSIS Transform XML - Help

May 19, 2007

Hi,



I want to insert the contents of a data file into a SQL Server table with XML datatype column using SSIS. I am fairly new to SSIS and script tasks.

Example:

Salary Data file:

EmpID, Name, Salary



100, John, 100000

200, Scott, 200000



Database Table:

create table xmlTable (id int identity(1,1), xmlColumn XML)



The contents of the file needs to be written to xmlTable. For each row in the Salary Data file there will be a corresponding row in the xmlTable.



xmlTable (Result):



1, <EmpID 100...>

2,<EmpID 200...>



Any help with details is greatly appreciated.



Thanks,

Rob















View 4 Replies View Related

Error - Cannot Open The Datafile

Jan 4, 2007

Hi there,

I have written a program that loads a package (SomePackage.dtsx) from the physical drive and executes that. The package does nothing but imports data from a csv file to the Sql server 2005. But I can see that the package is failing continuously. I meant the package.Execute() method is returning a DTSExecResult.Failure. I investigated the Package.Errors property that contains the error collection and found that there are two DTSError objects into the collection.

The first one€™s description says that

Cannot open the datafile "D:SOME.csv".

And the later one€™s is

component "SOURCE FLAT FILE COMPONENT" (1) failed the pre-execute phase and returned error code 0xC020200E.

But the most interesting thing is if I execute the package through the Execute package Utility (double clicking onto the SomePackage.dtsx file) ships with Sql server 2005 then it executes fine and works as expected. I have checked the permission of the csv file and it has everyone€™s full access.

Can anyone help me on this?
I will appreciate all kind of suggestions.

Thanks
Moim

View 14 Replies View Related

Transaction (Process ID 66) Was Deadlocked On Lock Resources With Another Process.

Feb 14, 2007

Hi Folks,

I am having this table locking issue that I need to start paying attention to as its getting more frequent.

The problem is that the data in the tables is live finance data that needs to be changed and viewed almost real time so what I have picked up so far is that using 'table Hints' may not be a good idea.

I have a guy at work telling me that introducing a data access layer is the only way to solve this, I am not convinced but havnt enough knowledge to back my own feeling up. (asp system not .net).

Thanks in advance

View 1 Replies View Related

Transaction (Process ID 65) Was Deadlocked On Lock Resources With Another Process

Jan 6, 2012

We are facing deadlock issue in our web application. The below message is coming:

> Session ID: pwdagc55bdps0q45q0j4ux55
> Location: xxx.xxx.xxx.xxx
> Error in: http://xxx.xxx.xxx.xxx:xxxx/Manhatta...Bar=&Mode=Edit
> Notes:
> Parameters:
> __EVENTTARGET:
> __EVENTARGUMENT:

[code].....

View 2 Replies View Related

Convert A SQL2K Datafile To SQL2K5

Nov 28, 2005

Is it possible to convert a SQL2K datafile to SQL2K5? I have a 2K database that I need to easily convert to 2K5, I apprecaite any insight on this issue. 

View 1 Replies View Related

Issue A .txt Datafile From A SQL Database Automaticly

Dec 22, 1999

In order to perform an automatic way
to link a software using .txt database
to our SQL Database, I need some tips.....

I think about the following solution
- maybe using a "data-base extractor" (Access)
and convert the result into a .txt file,
Which can be automaticly refresh using a
.bat file which will open the .txt file created
3 times a day to refesh the data.

If you have some solution less complicated,
Please send it to

atoarlindo@yahoo.com.hk

Arlindo

View 1 Replies View Related

Moving Tempdb Datafile & Logfile

Jul 16, 2001

Is it possible to move (detach and attach) the physical data and log file (.mdf &.ldf) to another location?

View 1 Replies View Related

Calc Free Space In Datafile

Apr 6, 2005

hi,

I'm trying to calculate how much unused space i have on one datafile. My main goal is to determine the max space i can save by doing a dbcc shrink.
Any help is greatly appreciated.

ThanKs in advance.

Al

View 1 Replies View Related

Maximum Datafile/log File Size

Dec 8, 2004

Is there any limit to the maximum size of a datafile or transaction log you can have with SQL Server 2000 on Windows 2000. Also is there a maximum size that should be adhered to for performance and admin reasons ?.

View 4 Replies View Related

Dtsrun: Datafile Mapping Error

Jan 30, 2004

Hi need lots of help here.

I have a dts package scheduled to run hourly as job since recent November. (Win2000 server, MSSQL2000 standard)
Its been running fine, except last few days, SQL Agent shows it attempted to run it but fails
Checking the history for the job i got this error message each time:
================================================== ======
DTSRun: Executing... DTSRun OnStart: DTSStep_DTSDataPumpTask_2
DTSRun OnError: DTSStep_DTSDataPumpTask_2,
Error = -2147467259 (80004005) Error string: Error creating datafile
mapping: The volume for a file has been externally altered so that the
opened file is no longer valid.
Error source: Microsoft Data Transformation Services Flat File Rowset
Provider Help file: DTSFFile.hlp Help context: 0 Error
Detail Records:
Error: 1006 (3EE); Provider Error: 1006 (3EE) Error string: Error
creating datafile mapping: The volume for a file has been externally altered
so that the opened file is no longer valid.
Error source: Microsoft Data Transformation Services Flat File Rowset
Provider Help file: DTSFFile.hlp Help context: 0 DTSRun
OnFinish: DTSStep_DTSDataPumpTask_2 DTSRun: Package execution complete.
Process Exit Code 1. The step failed.
=================================================

The key information i think would be these few lines:
Error creating datafile mapping: The volume for a file has been externally altered so that the opened file is no longer valid.

I don't think its SQL Agent as its scheduling is running other jobs fine(backup)
The DTS package runs fine manually.
Such i suspect dtsrun.exe itself. But where do i go from here?

Thks.

View 1 Replies View Related







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