Updating A Remote Database Copy

I have a SqlExpress DB on my server.  I have a remote copy for security/backup reasons.  Because the DB file(and .bak file) is about 2 Gb, it take a while to copy the whole thing to the remote machine.  I believe there is a way to use the log file to simply update my remote copy ratherr than copying whole files, but I don't know what this process is called to research it.  I have Brust's book on Sql Programming, but I have not found what I am looking for in there.  Can anyone tell me where I should be looking and what this process is called?
thanks,
Steve

You have several options.  You can create your full backup of your target database and restore the backup to the instance of sql express.  If you are restoring an instance of sql 2005 to sql express you can specify WITH STANDBY.  This leaves the database in read only mode, which means it is a viable option for a reporting source.  If you are running different versions than WITH STANDBY is not an option for you and you must restore WITH RECOVERY or WITH NO RECOVERY. 
Code Snippet
RESTORE DATABASE databasename
FROM DISK = 'c:\path.bak'
WITH STANDBY = 'c:\standby.txt'
Now you can schedule the restoration of the log backups and/or differential backups.  Since sql express does not ship with sql server agent you can either do this using the version of sql that you are restoring by using a linked server and distributed query or you can create a batch file and schedule this with Task Scheduler using sqlcmd. 
Code Snippet
RESTORE LOG databasename
FROM DISK = 'c:\path.trn
WITH STANDBY = 'c:\standby.txt'
This creates a "warm" stand by for you along with a reporting solution.  I utilize this method with our regular backup routine that provides the ability to remove load on our production servers by utilizing the backup as a reporting solution along with populating our data warehouse.  The regularly scheduled backups sit on separate physical drives outside of the production server so the disk I/O of the restoration is is also transparent to the production environment.
The same process can be implemented using log shipping for sql editions of workgroup or greater.  Log shipping provides a very similar process, but it is configured through a wizard, and in sql 2005 is actually an ssis package.
I utilize a clr function that returns the most recent t-log file and path to restore  each hour.  If this code interests you let me know and I will post it.

Similar Messages

  • To update my remote oracle server through e mail

    hai,
    i want to update my remote oracle server through e mail which should run automatically for every 3 hours(for example)
    both(remote and local) are oracle 8.1.7 running in windows 2000 server
    Please let me know how to go about....
    help me in this context...
    urs
    srini

    Sri
    you can do with some SMTP programming like that one available in VisuaBasic. you can read the mail from an inbox
    from a mail account of an SMTP SERVER. Then you may try to update the remote database.
    Well i have mentioned VB as i heard it long back from my GURUJI that it is possible thru SMTP programming in VB
    using the socket controls etc,.
    Please check it out in some visuabasic forum sites and ask some VB Gurus.
    Thanks
    Prakash
    [email protected]

  • How do we connect to a remote database from a Java Stored Procedure?

    We have a situation where we are not able to use a PSP (PL/SQL server page) to update a remote database using database link in an Oracle8i database. This is a known bug on 8i and is fixed in 9i. Can this be done using PSP calling a Java stored procedure, which in turn connects to the remote database and performs the update. If so, how we do remote connectivity to another database from the current java stored procedure.

    We have a situation where we are not able to use a PSP (PL/SQL server page) to update a remote database using database link in an Oracle8i database. This is a known bug on 8i and is fixed in 9i. Can this be done using PSP calling a Java stored procedure, which in turn connects to the remote database and performs the update. If so, how we do remote connectivity to another database from the current java stored procedure.

  • Copying CLOB data from remote database to local database

    How can i copy a CLOB data from a remote datbase table to a local database table ?
    i have a database link created from my local database to remote database, but looks like i cannot select a clob locator or clob data residing on a remote database through this link ?
    is there any way to do this ? anyone has a readily available code for doing this ? i need this very urgently, your help is greatly appreciated!
    thanks,
    SC.

    Is there a local to your pc database ???? Which is the db version of your pc(if there is)....and your server's database?????
    Simon

  • Dw cs5 with existing wordpress site hosted on yahoo need help connecting to existing remote database

    I am having trouble establishing a database connection.  I can  connect with test databases but am having trouble using dreamweaver wtih  my existing wordpress website.  Am I able to use dreamweaver to edit  and live view my changes before uploading the changed files to my live  site?  Am I able to access my existing wordpress database with  dreaweaver?  I have imported it to my testing server/database but still  seem to be having trouble establishing a connection with it (think maybe  my folder hierarchy might be off).
    macintosh HD/Applications/MAMP/htdocs/nwm/wp/index.php
    "nwm" is the name of the folder that I have copied all of my site  files to and the folder I have dreamweaver pointing to.  "wp" is what I  have all of the wordpress files in (the ones I copied from my yahoo  server - including all my current theme files etc.)
    I am trying to put the info into the mysql connection dialog box:
    Connection Name: Testing (i am assuming this name is for my benefit only and doesn't actually matter)
    MySQL Server: mysql
    User Name: *****
    Password: *****
    Database: wp
    and am getting this message
    MySQL Error#: 2013
    Lost connection to MySQL server at 'reading initial communication packet', system error 61
    did some google seaches of the error.  Tried turning off the  firewall, and the advance tab allow mysql incoming  (there were 2 one  was allow one was not allow.  I changed both to allow)
    Cant really find anything on yahoo to help me out.  Looked in  phpmyadmin database named wp: wp_users to get the username and password  (which due to previous look for help - I think the password was  encrypted cuz it looked like a bunch of mumbo jumbo and am fairly  certain I know the correct password).
    Any help would be greatly appreciated!! I spent $50 on live chat  last night trying to resolve the issue only to find out at the end that  the guy really didn't understand my problem and doesn't have  dreamweaver.  I have also watched countless videos on Lynda.com and have  been thru forum after forum.  While this problem is only a couple weeks  old since I just got CS5.  I have been having trouble making any  headway learning php since I cant seem to make it past the set up  parts.  I have done the php / mysql essential training on lynda.com with  relative success except that I really dont want to work with any more  exercise files so I didn't go on to the beyond the basics. I recently  went thru most of the Dreamweaver CS5 and Wordpress 3. Also did the  first 4 chapters of Dreamweaver CS5 with PHP and MySQL. I need to start  integrating things into my live sites.  I am also trying to work my way  thru the learning php, mysql, javascript book by o'reily media by robin  nixon (as fun as reading a math text book) can't get thru it since I  can't relate any of it to my current sites/needs
    I am on MacBookPro OSX 10.6.6
    Installed MAMP to specification on all 20 tutorials I have tried including lynda.com
    Tested the testing server and is working
    Just installed dreamweaver cs5
    have been using wordpress online to create and edit posts (recently  upgraded to 3.? whatever the latest update was online which I believe  update the files on my yahoo server?)
    Have also installed wordpress on my computer (several times thru each tutorial trying to get this right.)
    Am I expecting the impossible?

    If wordpress controls it's own connection why am I unable to use the live view. I have synced the remote site to my local computer so all the files should be just as they are online with the exception of the DB which contains most of the content.
    I have done all of those steps.  I have even exported the database from inside internet phpmyadmin and imported into computer phpmyadmin.  When I hit live view I get one of couple of errors.
    1.  "One is that the dynamic related files could not be displayed due to an internal server error"
    At some point I was able to view some sample files inside dreamweaver.  But I would like to be able to view my real site files.  I was able to "connect" to the local databases (not the copy of my real one - I think that maybe that was because it is somehow nested inside another db an am going try to reimport to new location).  And then I changed the host/username/password trying to deal with the internal server error. Now instead I get the cannot connect to the database Error 2016 or whatever from the origianl post. Also, I am using yahoo if that matters and all I can find about what their server name is: mysql - is that correct?
    I have been thru this so many times with so many different tutorials I am losing track of what is what.
    2.  Can I access my remote database within dreamweaver? I do not want to create dummy files (seems to be a waste of time).  And while if it had worked exporting/importing a duplicate on to my computer would have satisfied me for a little while it also seems some what counter productive.  Since every post and page is different if I were doing a daily updates etc how would I be able to change the formating or design of them if I can't access the remote files.  Would I re- import everytime I want to work on it to get current database?
    I am trying to be clear.  I listed all the specs I could think as listed  in your "how to get help fast post" (yes I read that at least twice  too) of all of the steps and possible reasons for my problems.  I also  thought that the forum was on a seperate site so I didn't think it would  count as a duplicate.  I am frustrated to tears and am feeling  incredibly stupid that after all this time and all these tutorials yes  you are right I obviously am not understanding what is going on which is  why I am on this forum.

  • Remote Client Copy - Ended in Erros

    Hi Friends,
    We recently performed a Remote client copy. What we normally do is we restore an latest offline backup of the Prod into an instance built exclusively for performing client copies into our QA system.
    So if our actual PROD is ABC ( production ), the replica system is ADC. We restore latest backup onto ADC. Then from ADC we do a client copy onto AQC ( Quality ). We have n number of clients in AQC. When copying into a particular client we are facing this problem of 3 tables not being able to get copied. They are BKPF,LTAK and SOST. It happened twice that the Remote client ended with errors.
    It says "Read or conversion error". The detailed error looks like below ;
    TAB_COPY_R_CONTINUE LTAK WITH KEY:
    I01 0000066362
    Read or conversion error system: ADCT500 table: LTAK
    ERROR: Internal error when inserting in table: LTAK
    Internal error:      1,262,713         65,536 VERIFY_CNT
    Process 00001 has copied data 25.02.2010 18:04:16
    Read or conversion error system: ADC500 table: BKPF
    Process 00002 has copied data 25.02.2010 19:09:00
    Start: Recopy errors 25.02.2010 19:09:02
    TAB_COPY_R_CONTINUE BKPF WITH KEY:
    2100 5100019665 2008
    Read or conversion error system: ADC500 table: BKPF
    ERROR: Internal error when inserting in table: BKPF
    Internal error:      6,948,636      1,777,664 VERIFY_CNT
    Read or conversion error system: ADC500 table: LTAK
    TAB_COPY_R_CONTINUE SOST WITH KEY:
    OTF 34 000000019247
    Read or conversion error system: ADC500 table: SOST
    ERROR: Internal error when inserting in table: SOST
    Internal error:      2,594,254        180,224 VERIFY_CNT
    We approached SAP and they asked to do a DB reorg, run update statistics on both source and target and then re run the client copy.
    Well DB reorg is a big activity so we just updated the statistics and ran again the "recopying errors" but still it is the same problem.
    Can anybody please suggest something. Thank you.
    regards
    Vinod K

    Hi Friends,
    My apologies for coming back to you guys so late. I kind of was lost to find a solution for this.
    Hi Sanujit,
    The database logs dont indicate anything at all about this error or i am not able to locate them.
    Rajesh,
    There was a table comparison done for these tables properties in both source and target and everything looked ok and confirmed by the application.
    At this moment we have anyway decided to go a fresh client copy again as lot of time has already passed and there would be differences in source and target tables.
    But anyway could you please tell me the procedure to transport tables between source and target systems?
    Hi Anil,
    SAP iS ECC 6.0 and Oracle is 10.2.0.4.0
    Thanks again for your time and pateince.
    Regards
    Vinod K

  • Remote client Copy

    Dear All,
    I am trying to do Remote client copy from Production to Dev system (two system landscape).Below is my hardware configuration of DEV and PRD system :
    SAP - R/3 4.7(NU) , O/S - AIX , DB - ORACLE 9
    PRD SYSTEM :
    DATABASE Server
    CPU - 2 (375 MHZ)
    RAM  - 3 GB
    APPLICATION server
    CPU  - 2 (375 MHZ)
    RAM  - 2 GB
    Database size of the Prd system is around 95 GB
    DEV SYSTEM
    CPU  -  2 (375 MHZ)
    RAM  - 2 GB
    I am doing test run first so that i can see if any errors come and also to estimate downtime of the PRD Server(as SAP recommends that no user should be login in target and source client while doing client copy).
    From the last 24 hrs. it has just completed 2500 tables only. total tables are 27500 something(Non - Unicode system).Its running very slow.... 
    Is there any way to improve the speed of Remote client copy ?
    Else I am planing to do Export - Import of client.
    Is there any way to estimate downtime of PRD Server while taking Export of client like In how much time Export of Source client will be completed....
    Thanks & Regards,
    Rohit

    Hi Rajesh,
    >
    . Make sure that it has the same permissions as /usr/sap/trans directory.
    >
    Do I need to share that directory too
    > by default it will be "/usr/sap/trans".
    >
    > After Export you should revert it to default...
    >
    I want to go for the process you suggested.
    I have a question for this;
    1.  My DEV server is the domain controller and when I login to my PRD server and run the command df -k (it shows /usr/sap/trans directory mounted to DEV server).
    So if I change the location trans directory through STMS (system overview DEV-->Transport tool) will it get updated for PRD or I need to restart the machine DEV or PRD. do I need to do anything else like mounting etc so that PRD server can access the same to save the export file when I will be taking the export of PRD client.
    Regards
    Rohit

  • Oracle VPD on Remote database using DBLINk

    Hi All,
    How can i apply row level security on a table that is available in another database using DBlink
    we have two databases PDSSM and EVTA, and i would like to apply row level security on a table in EVTA from a schema in PDSSM using dblink. MXODSADM IS A SCHEMA IN EVTA AND MXEMBARGO IS A SCHEMA IN PDSSM. there is a dblink(EVTA.GMM.COM) between mxembargo and mxodsadm.
    begin
    dbms_rls.add_policy (
    object_schema => 'MXODSADM',
    object_name => 'vehicle_retail_sale',
    policy_name => ' MXEMBARGO_EVTA_POLICY',
    function_schema =>'MXEMBARGO',
    policy_type => dbms_rls.SHARED_CONTEXT_SENSITIVE,
    --policy_type => dbms_rls.STATIC,
    policy_function => ' MXEMBARGO_EVTA_POLICY.MXEMBARGO_EVTA_PREDICATE',
    statement_types => 'select, insert,update,delete',
    update_check => TRUE,
    enable => TRUE,
    static_policy => TRUE
    end;
    I am a complete Database person and i need to do this in my application, can anyone provide me how can i do this using dblink.

    wojpik wrote:
    hello
    I have one short question to you.
    Is that possible to create view at remote database using dblink? Following syntax returns error
    create view ViewName@DbLinkDame (ColumnName) as
    (select 1 from dual )
    "ORA-00905:missing keyword"
    Is that possible at all?
    And particulary - is that possible when remote database is MSSQL and I am using heterogeneous services?
    I really appreciate your help
    best regards
    Wojtek
    Edited by: wojpik on Oct 21, 2009 3:59 AMI doubt you would be able to fire any ddl through database link. You have to connect to remote database to run any ddl even if it is Oracle or some other database.
    Regards
    Anurag

  • Remote Client Copy Errors

    Dears,
    Today I am going to do remote client copy from PRD to QAS.
    For it yesterday i scheduled Test run in simulation mode.As i am having two CPU for both Dev and PRD so I scheduled it with 6 Parallel Processes.
    But my Test run failed with errors:
    Copy Type                   Remote copy
                                      Test Run
    Profile                          SAP_ALL
    Status                          Ended with Errors
    User                             SAP*
    Start on                        14.08.2008 / 01:30:54
    Last Entry on                14.08.2008 / 05:57:54
    Statistics for this Run
    - No. of Tables                 30,806  of       30,808
    - Deleted Lines                     15
    - Copied Lines               72748,776
    Warnings and Errors
    Table/Object       Component                Error
    BKPF                 FI                       Read or Conversion Error
    BSIS                   FI                       Read or Conversion Error
    Thus showing read or Conversion Error in these two tables.
    In System log of source system I also see these error:
    ORA-01652 unable to extend temp segment by 2560 in PSAPTEMP
    Database Error 1652 at SEL access to table BKPF.
    Database Error 1652 at SEL access to table BSIS.
    Please suggest how to resolve the issue.
    Shivam
    Edited by: Shivam Mittal on Aug 14, 2008 6:08 AM

    Hello Shivam
    How is your remote copy going on?
    Did you increase the size of psap temp in order to carryon with the copy?
    Your Source system is PRD system.Are you doing this copy while  users are using the PRD system.
    If not then  this may not  be  result of client copy? or
    if no user is logged in in your PRD system,You have to decide if this is due to client copy.
    Let me know what  corrective measure taken by you to completed the remote client copy?
    normally we dont get this dump in the source system but I have  psaptemp around 30 GB or more in al my systems so may be this might have not surfaced in my environment.
    Thanks
    Amit

  • Remote client copy performance

    Hello experts,
    I need an opinion on following possibilities that could speed up remote client copy:
    Increasing maximum number of processes for parallel processing in dialog mode?
    Increasing the update processes?
    Decreasing the undo retention from default 900 seconds to 600 seconds (Oracle) ?
    Increase the number of redo log files?
    An opinion or any other insights would be highly appreciated.
    Thank you,
    Rohit

    Well, the answer is maybe.
    You did not supply any information about your run and your system, how can we give you good advice? Any of your proposals might speed up the copy process, but we cannot tell (well decreasing the undo retention and changing the update work processes will not change much). If your hardware (cpu/disk/network) is not exhausted, then increase the number of parallel processes.
    Besides that these notes contain good hints regarding copy speedup:
    [489690 - CC INFO: Copying large production clients|https://service.sap.com/sap/support/notes/489690]
    [446485 - CC-ADMIN: Special copying options|https://service.sap.com/sap/support/notes/446485]
    Cheers Michael

  • Getting error while calling procedure from remote database

    When I am trying to call child procedure from remote database I am getting below error:
    ORA-02064: distributed operation not supported
    ORA-06512: at "NMUSER.NEW_CUST_UPLOAD", line 740
    (P.S. on line no 740 I issued "commit;" )
    I checked rights,synonym on all the objects they are fine.

    Oracle Error: ORA-02064
    Error Description:
    Distributed operation
    not supported
    Error Cause:
    One of the following
    unsupported operations was attempted:
    1. array execute of a remote update with a subquery that references a dblink,
    or
    2. an update of a long column with bind variable and an update of a second
    column with a subquery that both references a dblink and a bind variable, or
    3. a commit is issued in a coordinated session from an RPC procedure call
    with OUT parameters or function call.
    Cheers,
    Manik.

  • Replicate some tables from local database server to Remote database sever

    how can i replicate some tables from local database server(Oracle 8.1.7 on windows 2000 server) to a remote database server(Oracle 8.1.7 on Sun Solaris)
    whenever there is some insertion or updation on the table of base(main) database it should get updated to the remote database server
    or
    on time base for example: every 2 hours
    please help me!!!!

    It all depends on waht you are going to do with the data on the remote.
    if tehre are no updates there, creating a simple materialized view on the remote to pull it's data from the local should suffice.
    If there are updates on the remote, you will more than likely want to look into either Multi-master replication, or updatable materialized views.

  • Remote database problem with Geometry data type

    Hello!
    I'm trying to insert and update a spatial table in a remote database. The syntax looks like:
    insert into tableA@remotedb (col1, col2)
    select col1, col2 from tableA
    where col3='abc';
    This works fine with regular tables. But when I try it on spatial tables, I get this error:
    'remote operations not permitted on object tables or user-defined type columns'.
    My table contains geometry datatype and user-defined datatype. Does anyone know how to solve this problem?
    Thanks!

    I created 2 temp tables in the remote db. One contains MDSYS.SDO_Geometry column without user-defined column; the other one has user-defined column without MDSYS.SDO_Geometry. Both got the same error, ORA-22804: remote operations not permitted on object tables or user-defined type columns.
    But strangly, I tried to insert into a local table from a remote table with MDSYS.SDO_Geometry column, and it worked! And I tried the same thing with user-defined column, but it didn't work.
    I wonder why insert sdo_geometry column from local db to remote db didn't work, but it worked the other way round. And inserting user-defined column between db didn't work at all!

  • Display BLOB from remote database

    Context: We are offloading documents (pdf) from our OLTP database to a dedicated 'output database.' These documents must be displayed from the application on our OLTP database using a database link. Various posts show that querying a BLOB from a remote database can best be implemented using a query on the remote table and an insert on a local (temporary) table. So far, so good. The idea is to display this BLOB using wpg_docload.download_file.
    BUT:
    When trying to display the pdf from this global temporary table an error occurs:
    ORA-14453: attempt to use a LOB of a temporary table, whose data has already been purged
    When trying to display from a normal table and issuing a rollback after wpg_docload.download_file results in another error:
    ORA-22922: nonexistent LOB value
    When trying to display from a normal table and not removing the record in any way, its works fine. Only I now have a garbage collection issue, because the remote date remain in my local (preferably temporary) table.
    It seems to me that mod_plsql needs an active session to display my pdf.
    Does anyone have an explanation for this behaviour and maybe a solution for my problem?
    Environment:
    local: 10.2.0.4.0
    remote: 11.1.0.7.0
    pdf size: ca. 150kB
    code used:
    PROCEDURE show_doc (p_nta_id IN NUMBER
    ,p_sessie IN NUMBER
    IS
    t_lob BLOB;
    t_lob2 BLOB := empty_blob();
    t_mime VARCHAR2(100);
    BEGIN
    -- copy BLOB into local global temp table
    INSERT INTO mvs_tmp_notaprint_bestanden
    npv_nta_id
    , npv_npe_sessie
    , mime_type
    , bestand
    ) -- from remote table
    SELECT npd.npv_nta_id
    ,npd.npv_npe_sessie
    ,npd.mime_type
    ,npd.bestand
    FROM mvs_notaprint_bestanden@marc npd
    WHERE npd.npv_nta_id ; = p_nta_id
    AND npd.npv_npe_sessie = p_sessie
    -- show BLOB from local global temp table
    SELECT t.bestand
    , t.mime_type
    INTO t_lob
    , t_mime
    FROM mvs_tmp_notaprint_bestanden t
    WHERE t.npv_nta_id ; = p_nta_id
    AND t.npv_npe_sessie ; = p_sessie
    t_lob2 := t_lob; -- buffer BLOB
    owa_util.mime_header(t_mime , FALSE );
    owa_util.http_header_close;
    wpg_docload.download_file(t_lob2);
    END show_doc;

    Andrew,
    thank you, the 'preserve rows' did the trick.
    Every query from a browser (even in the same browser session) is a new Oracle session, so the copied records in the global temporary table are gone after the page is displayed.
    Am I correct in assuming that each call from the browser results in a new Oracle session? I did a few tests and found for each call a different sessionid.
    Sincerly,
    Arne Suverein
    Edited by: Arne Suverein on Aug 18, 2009 3:35 PM

  • Mailbox Database Copy Status Failed

    We have 2 Exchange 2010 servers.  We run a DAG.  Recently I have noticed that database copy DB2 which is located on Exch-1 is showing "Failed".  Database copy DB1 which is located on Exch-2 is showing Healthy.  I searched online
    for information regarding the issue with the failed database copy.  I found information that led me to run these commands.
    Suspend-MailboxDatabaseCopy -Identity “Mailbox Database XXXXX\Server Name”
    Update-MailboxDatabaseCopy -Identity “Mailbox Database XXXXX\Server Name” -DeleteExistingFiles
    It went thru the seeding process and completed but the database copy still shows "Failed".  Copy Q Length is 19.  I have refreshed the console.  What else do I need to do to correct this?  I did recently shut down Exch-2 server
    for maintenance.  thanks

    Hi,
    It's glade to hear the good news. Thanks for your updating.
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

Maybe you are looking for

  • IDVD Hanging On Disk Image AND Burning

    I've been having this problem since upgrading to 10.4.7 (I have iDVD 6.02). I can't burn a DVD and I can't save a disk image. iDVD just hangs up and quits or it just hangs and becomes non-responding. I restarted and repaired permissions over six time

  • How do I get past the license agreement screen on Reader 9.4?

    I've just installed Reader 9.4 on my Dell Inspiron 1501 laptop, o/s WinVista HP.  I have the same thing on my desktop and have never had a problem.   On the laptop, when I click on the Reader icon, I get the License Agreement and the instruction to "

  • Activations Issues

    Does anyone know How To fix E_ACT_TOO_MANY_ACTIVATIONS on iPhone 3M Application?

  • Upgrade sql error for 11.2 databse on Windows 7 system

    Hi , We downloaded the database release 11.2.0 from oracle e-delivery website for windows 64 bit. I installed it on the Windows7. The version 11.1 database already is installed on that. When i opened the Database upgrade assistant tool and begin the

  • Planning issue

    Hi Gurus,   I've an issue . Materials are planned on the Weekend days even factory calender is working only five days./week And in MRP screens  We assigned the Planning calender with weekly lot size.   With Reagrds,   Laxman