Shrink Log file in log shipping and change the database state from Standby to No recovery mode

Hello all,
I have configured sql server 2008 R2 log shipping for some databases and I have two issues:
can I shrink the log file for these databases: If I change the primary database from full to simple and shrink the log file then change it back to full recovery mode the log shipping will fail, I've seen some answers talked about using "No
Truncate" option, but as I know this option will not affect the log file and it will shrink the data file only.
      I also can't create maintenance to reconfigure the log shipping every time I want to shrink the log file because the database size is huge and it will take time to restore in the DR site, so the reconfiguration
is not an option :( 
how can I change the secondary database state from Standby to No recovery mode? I tried to change it from the wizard and wait until the next restore for the transaction log backup, but the job failed and the error was: "the step failed". I need
to do this to change the mdf and ldf file location for the secondary databases.
can any one help?
Thanks in advance,
Faris ALMasri
Database Administrator

1. can I shrink the log file for these databases: If I change the primary database from full to simple and shrink the log file then change it back to full recovery mode the log shipping will fail, I've seen some answers talked about using "No Truncate"
option, but as I know this option will not affect the log file and it will shrink the data file only.
      I also can't create maintenance to reconfigure the log shipping every time I want to shrink the log file because the database size is huge
and it will take time to restore in the DR site, so the reconfiguration is not an option :( 
2. how can I change the secondary database state from Standby to No recovery mode? I tried to change it from the wizard and wait until the next restore for the transaction log backup, but the job failed and the error was: "the step failed". I need to do
this to change the mdf and ldf file location for the secondary databases.
can any one help?
Thanks in advance,
Faris ALMasri
Database Administrator
1. If you change recovery model of database in logshipping to simple and back to full Logshipping will break and logs wont be resored on Secondary server as log chain will be broken.You can shrink log file of primary database but why would you need that
what is schedule of log backup. Frequent log backup is already taking care of log files why to shrink it and create performance load on system when log file will ultimately grow and since because instant file initilaization is not for Log files it takes time
to grow and thus slows performace.
You said you want to shrink as Database size is huge is it huge or does it have lots of free space. dont worry about data file free space it will eventually be utilized by SQL server when more data comes
2. You are following wrong method changing state to no recovery would not even allow you to run select queries which you can run in Standby mode. Please refer below link to move Secondary data and log files
http://www.mssqltips.com/sqlservertip/2836/steps-to-move-sql-server-log-shipping-secondary-database-files/
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
My TechNet Wiki Articles

Similar Messages

  • I have firefox 7.0 and i go to about:config and change the URL default from bing to google but when i close firefox an open it back up it changes back to bing why is this?

    I have firefox 7.0 and i go to about:config and change the URL default from bing to google but when i close firefox an open it back up it changes back to bing why is this? I stand by google 100% and if ur gonna make it where i can't use google as the URL's seach engine then i will uninstall it.

    The default of the pref network.http.max-connections has been increased from 30 to 256 in Firefox 6+ versions.
    Try to decrease the value of the pref <b>network.http.max-connections</b> from 256 to 30 as used in Firefox 3 versions.
    *https://support.mozilla.com/kb/Firefox+never+finishes+loading+certain+websites
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Redo log files are deleted, how to recover the database

    Hi All,
    I removed the redo01.log, redo02.log and redo03.log files of our Oracle database. And it caused the db to fail. Is there any way I can recover the database and startup database in normal mode? I do not need it to have all the latest data restored, I will be happy to just start the db and get going.
    database is in arcive log mode.
    Thanks

    Hello,
    You may try this if the database is mounted:
    recover database until cancel;
    cancel
    alter database open resetlogs;Hope it can help.
    Best regards,
    Jean-Valentin

  • How Do I Duplicate a NOARCHIVELOG to another server and change the database

    I have two servers each with a different copy of the same database.. we'll call the database POPEYE
    server A has a STAGE version of POPEYE that is in NOARCHIVELOG mode
    server B has the PRODUCTION version of POPEYE
    I need to get the database on server A and copy it to run next to the existing database on server B.
    since they have the same name, i need to change the name to POPEYESTAGE when I move it over.
    both running Windows Server 2008. both running Oracle 10g.
    I tried shutting down the database on server A, copying over the files with a new PFile and ran the CREATE CONTROLFILE script into the trace and took out all the junk, but I cannot connect to execute it.
    I copied all the files over and when I try to commect as sysdba using sqlplus i get TNS:could not resolve the connect identifier specified.
    i tried adding it to the listener and TNS names files, but it didnt work.
    I'm trying RMAN now with some difficulty.
    I am brand new to Oracle administration, this is my first administrative assignment. Please advise

    sb92075 wrote:
    876137 wrote:
    I have two servers each with a different copy of the same database.. we'll call the database POPEYE
    server A has a STAGE version of POPEYE that is in NOARCHIVELOG mode
    server B has the PRODUCTION version of POPEYE
    I need to get the database on server A and copy it to run next to the existing database on server B.
    since they have the same name, i need to change the name to POPEYESTAGE when I move it over.Will the directory names change?Yes.
    >>
    >>
    both running Windows Server 2008. both running Oracle 10g.
    I tried shutting down the database on server A, copying over the files with a new PFile and ran the CREATE CONTROLFILE script into the trace and took out all the junk, but I cannot connect to execute itWhile above is likely true, it is 100% devoid of any useful information or details.
    In the future, ALWAYS use COPY & PASTE so we can see what you do & how Oracle actually responds.There's nothing to copy paste, I clicked with my mouse and dragged to copy the files.
    I obtained a CREATE CONTROLFILE script the standard way -- ALTER DATABASE BACKUP CONTROLFILE TO TRACE.
    so here I stand with the script in hand. BUT, I cannot connect to the database to execute it, because I get the error I stated "TNS:could not resolve the connect identifier specified."
    I copied all the files over and when I try to commect as sysdba using sqlplus i get TNS:could not resolve the connect identifier specified.CURIOUS, since connecting to local DB does not require SQL*Net.I do not know what SQL*Net is. I did not use SQL*Net. I am in the DOS style commandline prompt using sqlplus.exe
    i tried adding it to the listener and TNS names files, but it didnt work.My car didn't work.
    Tell me how to make my car go .
    Is COPY & PASTE broken for you?I used it above, but here it is again.. actually got a different error message this time:
    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    I'm trying RMAN now with some difficulty.I bet you did not bother to Read The Fine Manual.I took a course a week ago. I am reading the manual and following the instructions. Duplicating databases is not very clearly documented.
    Plus it's a test database that the users turned into a production database, so it is in noarchivelog mode, so earlier I was not able to shutdown the database so RMAN could not back it up.
    The situation I am dealing with with fairly obscure.
    >>
    I am brand new to Oracle administration, this is my first administrative assignment. Please advisepush back from the keyboard & RTFM the URL below
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/toc.htm
    already in-process, what I need at the moment is assistance with a specific task.
    Now if you have already memorized that manual, how about being somewhat useful and explaining to me how to duplicate a noarchivelog database into a production server that already has a database with the same name running.

  • Log file size is huge and cannot shrink.

    I have a live database that is published with merge replication and a couple of push subscriptions. I just noticed that the log file has grown to 500GB. The database is in full recovery. We do weekly full backups, daily log backups. I cannot shrink the log
    file back down to normal proportions. It should only be about 5GB. The file properties show an initial size equal to the current size, I cannot change that number and I don't know why it is so big now? How do I go about shrinking the log file. the normal DBCC
    shrink and the SSMS GUI to shrink are not doing anything and say there is 0MB space free!!

    As per your first posing log_reuse_wait_desc was LOG_BACKUP
    and in 2nd REPLICATION . i am consfused
    if
    log_reuse_wait_desc  column
    shows LOG_BACKUP then table log backup of your db, if it is REPLICATION 
    and you are sure that your replications are in sync then reset the status of replicated transactions
    You can reset this by first turning the Reader agent off ( turn the whole SQL Server Agent off), and then run that query on the database for which you want to fix the replication issue:
    EXEC sp_repldone @xactid = NULL, @xact_segno = NULL, @numtrans = 0, @time= 0, @reset = 1
    vt
    Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker

  • Change base view state from a custom component

    I'm pretty new to flex and I'm having a small issue in change the view state from a component.
    My Application have 2 custom components called userlogin and main menu. In the main application page I have userlogin component in one state and the main menu component in another. I'm trying to change the state if the login in successful from user login to main menu. I have the following function written inside the login component.
    private function IsUserLoggedIn(evt:ResultEvent):void
                    if (evt.result.islogin.toString() == "true")
                        currentState = "MainMenu";
                    else
                        Alert.show("Login failed, please try again.", "Login Failed");
    This code worked when I had all the controls in the main page. But then I created components and included them in to components and now when the login is success, its giving the following error.
    ArgumentError: Undefined state 'MainMenu'.
        at mx.core::UIComponent/getState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UI Component.as:9908]
        at mx.core::UIComponent/findCommonBaseState()[E:\dev\4.0.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9928]
        at mx.core::UIComponent/commitCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\ mx\core\UIComponent.as:9750]
        at mx.core::UIComponent/setCurrentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\ core\UIComponent.as:9701]
        at mx.core::UIComponent/set currentState()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:6087 ]
        at components::UserLoginForm/__btnSubmit_click()[C:\Projects\WarrantyAutomation\src\componen ts\UserLoginForm.mxml:60]
    I'm sure this has something to do with accessing the states from a custom component, but I do not know how to change the state to the main menu. Please help me with this. Any help is greatly appriciated.

    Hi dasun1981,
    private function IsUserLoggedIn(evt:ResultEvent):void
                    if (evt.result.islogin.toString() == "true")
                        currentState = "MainMenu";
                    else
                        Alert.show("Login failed, please try again.", "Login Failed");
    If I am right the above function is in your userlogin component and the two components "userlogincomponent" and "maincomponent" are in main application file and the states were also defined in main application file.
    But in the function above the currentState refers to the state of the userlogin component and not the main application ...but the states are defined in main application file...that's the reason why the exception was thrown...
    Instead you replace the line in the above function with the below line:
    Application.application.currentState = "MainMenu";
    Please mark it as answer if it helped you.
    Thanks,
    Bhasker Chari

  • Changing the Database characterset

    Hi,
    My oracle 9i database characterset is AL32UTF8.
    I wanted to change this to UTF8 for some testing purpose...
    After few days i need to reset this characterset back to AL32UTF8.
    how should i proceed on this?
    Plz adivice.....
    Regards,
    Ashok Kumar.G

    Thanks Pierre Forstmann,
    In metalink i found out the following
    In 9i you can't simply use "ALTER DATABASE CHARACTERSET" to go from
    AL32UTF8 to UTF8 because UTF8 is a SUB-set of AL32UTF8
    (some codepoints which are correct in AL32UTF8 are not known in UTF8)
    So you will run into ORA-12712 if you try alter database ....
    I hope this makes sense when the database contains data.
    suppose if i drop my schema(now the database has no user data) and try to change the database characterset from AL32UTF8 to UTF8 will it impact any other?
    and after changing to UTF8 can i import the user data again (say from export file which was taken from a UTF8 database) ?
    Regards,
    Ashok Kumar.G

  • I have bought an used Iphone 5. I dont have the password for the existing login id of the old owner. How do i use the phone and change the log in id?

    I have bought an used Iphone 5. I dont have the password for the existing login id of the old owner. How do i use the phone and change the log in id?

    Unfortunatly the only way that you can get it off is to get the old user to input the password.  You may need to contact that old user and see if he can put the old password in.  hope this helps.

  • Delete Log File: Correspondence in Training and Event Management ( t77vp)

    Is there a standard way of deleting the Log File: Correspondence in Training and Event Management ( T77VP ) from the system.
    Thanks for your help.
    Andi

    Hi Niladri,
    Please open a new discussion for this as it's a different question. Not only is this stated in the guidelines and makes it easier for other members to search for the right things, but it also increases your chances of getting the right answers, because users know you are looking at LSO rather than TEM and because many users, sadly, are driven by points primarily for giving answers and know you could not mark their answer as correct, because it's not your post.
    Please also give context info: which correspondence solution are you using (Smartforms, Adobe forms, SAPscript) and which version of LSO. 

  • Database Log File becomes very big, What's the best practice to handle it?

    The log of my production Database is getting very big, and the harddisk is almost full, I am pretty new to SAP, but familiar with SQL Server, if anybody can give me advice on what's the best practice to handle this issue.
    Should I Shrink the Database?
    I know increase hard disk is need for long term .
    Thanks in advance.

    Hi Finke,
    Usually the log file fills up and grow huge, due to not having regular transaction log backups. If you database is in FULL recovery mode, every transaction is logged in Transaction file, and it gets cleared when you take a log backup. If it is a production system and if you don't have regular transaction log backups, the problem is just sitting there to explode, when you need a point in time restore. Please check you backup/restore strategy.
    Follow these steps to get transactional file back in normal shape:
    1.) Take a transactional backup.
    2.) shrink log file. ( DBCC shrinkfile('logfilename',10240)
          The above command will shrink the file to 10 GB.(recommended size for high transactional systems)
    >
    Finke Xie wrote:
    > Should I Shrink the Database? .
    "NEVER SHRINK DATA FILES", shrink only log file
    3.) Schedule log backups every 15 minutes.
    Thanks
    Mush

  • Change the database log on parameters in the run time with CR10 Delphi2007?

    Hi,
    I'm using crystal report 10 and Crystal VCL for Delphi. How can I change the database log on parameters in the run time?

    You have to use the ConnectBuffer. See [this|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] note for details.
    Also, consider searching the notes database:
    https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true
    The search; VCL database crystal, returns a number of notes that may be of use.
    Ludek

  • Log file (access.log) of the internal ITS

    Hello,
    anybody know how to access the logfiles of the internal ITS. In particularly im looking for the log file access.log which you had for the external ITS accessable over the ITS admin page http://<servername>/scripts/wgate/admin/!
    The log file loged all users and the transaction they accessed over the time in the format
    2006/10/21 18:39:16.093, 0 #197349: IP ???.???.???.???, -its_ping
    Thanks in advance,
    Kai Mattern

    hi
    good
    go through these links, i hope these ll help you to solve your problem.
    http://www.hp.com/hpbooks/prentice/chapters/0130280844.pdf
    http://help.sap.com/saphelp_46c/helpdata/en/5d/ca5237943a1e64e10000009b38f8cf/content.htm
    thanks
    mrutyun^

  • How can one edit a .gif file graphics background and change the fonts in Photoshop Elements 13?

    I am trying to change the color and fonts of some of my web sites .gif files. Can I change the color to another hexadecimal color and change the fonts of the letters in Photoshop 13? I am using Windows 7 and heard that you could save the .gif file to another format, edit it, then change the file back to a .gif file. Is this true? If so, how do you do it? The file just has a solid color with the letters "Firm " on it. No animation.

    You can edit a gif without changing the format, but once you save the file as a gif the text becomes part of the image, not text anymore, so you would need to clone or heal away the existing text and then create a new text layer and use save for web to create a new gif.
    For access to the most editing tools, while the file is open in the editor go to image>mode and change it from index color to RGB. Saving as a gif will change it back to index mode.

  • In Photoshop Elements 12, is there a way to batch process all photos in a file with 'Auto Tone' and save the changes?

    In Photoshop Elements 12, is there a way to batch process all photos in a file with 'Auto Tone' and save the changes?

    Thank you, that was perfect!
    Yoni

  • Errors in a log file /var/log/system.log

    I'm getting these errors in a log file /var/log/system.log
    Shutdown:
    Sep 21 12:41:38 Mac-mini.local WindowServer[86]: CGXGetConnectionProperty: Invalid connection 42243
    Sep 21 12:41:38 Mac-mini.local coreservicesd[58]: SendFlattenedData, got error #268435459 (ipc/send) invalid destination port from ::mach_msg(), sending notification kLSNotifyApplicationDeath to notificationID=145
    Sep 21 12:41:38 Mac-mini.local WindowServer[86]: CGXGetConnectionProperty: Invalid connection 42243
    Sep 21 12:41:38 Mac-mini.local coreservicesd[58]: SendFlattenedData, got error #268435460 (ipc/send) timed out from ::mach_msg(), sending notification kLSNotifyApplicationDeath to Sep 21 12:41:38 Mac-mini.local loginwindow[41]: DEAD_PROCESS: 41 console
    Sep 21 12:41:38 Mac-mini.local WindowServer[86]: CGXGetConnectionProperty: Invalid connection 42243
    Sep 21 12:41:38 Mac-mini.local coreservicesd[58]: SendFlattenedData, got error #268435459 (ipc/send) invalid destination port from ::mach_msg(), sending notification kLSNotifyApplicationDeath to notificationID=142
    Sep 21 12:41:38 Mac-mini.local shutdown[300]: halt by andrei:
    Boot & Working:
    Sep 21 12:42:11 localhost com.apple.launchd[1] (com.apple.automountd): Unknown key for boolean: NSSupportsSuddenTermination
    Sep 21 12:42:22 Mac-mini.local apsd[56]: CGSLookupServerRootPort: Failed to look up the port for "com.apple.windowserver.active" (1102)
    Sep 21 12:42:26 Mac-mini.local authorizationhost[121]: in od_principal_for_user(): failed: 7
    Sep 21 12:42:26 Mac-mini.local authorizationhost[121]: in pam_sm_authenticate(): Failed to determine Kerberos principal name.
    Sep 21 12:42:27 Mac-mini.local loginwindow[41]: ERROR | ScreensharingLoginNotification | Failed sending message to screen sharing GetScreensharingPort, err: 1102
    Sep 21 12:42:31 Mac-mini.local XProtectUpdater[24]: Ignoring new signature plist: Not an increase in version
    Sep 21 12:42:32 Mac-mini com.apple.launchd[1] (com.apple.xprotectupdater[24]): Exited with code: 252
    Sep 21 12:43:04 Mac-mini.local com.apple.security.pboxd[290]: Bug: 12C54: liblaunch.dylib + 23849 [2F71CAF8-6524-329E-AC56-C506658B4C0C]: 0x25
    Sep 21 12:53:49 Mac-mini.local CVMServer[98]: Check-in to the service com.apple.cvmsCompAgent_x86_64 failed. This is likely because you have either unloaded the job or the MachService has the ResetAtClose attribute specified in the launchd.plist. If present, this attribute should be removed.
    Sep 21 12:59:48 Mac-mini.local com.apple.security.pboxd[290]: kCGErrorFailure: CGSSetHideOnDeact: error getting window tags
    Sep 21 13:00:07 Mac-mini.local com.apple.security.pboxd[290]: _NXTermWindow: error releasing window (1000)
    Sep 21 13:00:07 Mac-mini.local com.apple.security.pboxd[290]: __block_global_2: connection failed unexpectedly; terminating process; delegate was (
    system.log - https://docs.google.com/open?id=0Bz5zKwys0GTcSzI5UFJRUzFxZjQ

    File a bug report with Apple.

Maybe you are looking for

  • BP Automatic creation of customer

    Hi Franz Iam having a problem in creating a master tenant with customer account. Iam using version ecc6.04. I have applied SAP Note 956054 and ran reports CVI_ANALYZE_CUST_TAX_NUMBERS,CVI_SYNC_CUST_TAX_NUMBERS,CVI_ANALYZE_VEND_TAX_NUMBERSand CVI_SYNC

  • Specs of memory mac mini 2011 on a 2012?

    I have a mini 2011 w. 8gb ram. Planning to buy a mini 2012 i7. I look at the different specs of both versions for memory. Could i use the 8 gb of the 2011 in the 2012 ? (And either the 2012 4gb in the 2011 or i simply put back its original 4gb which

  • Inventory return to vendor impact on finance

    Can anyone tell me that how does activating OMBZ (GR returns despite invoice) impact finance. Is it recommended to flag it or not. If we have to activate it, what steps need to taken in order to keep the finance in good shape. Please give detailed ex

  • SRM 7 - Contract replication from ERP to SRM

    Hi all, We have SRM 7 and ECC 6.0 and we have a requirement to have contract handling for invoices functionality, in SRM, in order to create invoices with reference to a contract directly. We want to have ERP system as the central repository for all

  • Dump with ORA-01438: value larger than specified prec

    Hello All, I am getting a dump in production with the above said error and the ST22 gives me further analysis that "If the error occurred in Open SQL, there is probably an inconsistency between the NAMETAB and the ABAP/4 Dictionary.