Database Copy to another

I have a SQL database on Server1 called DB1. I need that entire database copied over to a different
server (call it Server2) each night. I'd like to schedule a SQL Agent job to do this.
I'd prefer not to setup a linked server on Server2 so that's why I'm asking this question.
What is the best practices method of accomplishing this? Is the best route to schedule a native backup of DB1 on Server1 and then schedule a restore of that .bak onto Server2? I worry about the job failing if people are connected to DB1 on Server2 at the time
of the scheduled restore.

Method 1:
Sept 1 : Backup database from source to local drive,  ( What is the database size ), if size is small then you can directly place the backup the file to destination server, and if the backup size is large then you have to backup to local then you have
to copy to destination...
Sept 2 : copy the backup file to destination and restore that data base with NORECOVERY
Robocopy syntax :
::Copy all files from sourcepath to destinationpath using Robocopy
::Last updated on 23/02/2012 by Adam Rush
::Switches:
::(E)mpty folders included in copy
::(R)etry each copy up to 15 times
::(W)ait 5 seconds between attempts
::(LOG) creates log file
::(NP) do not include progress txt in logfile; this keeps filesize down
::Source path
set sourcepath=\\SourceServer\Share
::Destination path
set destinationpath=E:\Destination\Folder
::Log path
set logpath=E:\Logs\Robocopy\
::Include format yyyy-mm-dd#hh-mm-ss.ms in log filename
set filename=Robocopy_%date:~-4,4%-%date:~-7,2%-%date:~-10,2%#%time::=-%.txt
::Run command
robocopy %sourcepath% %destinationpath% /E /R:15 /W:5 /LOG:%logpath%%filename% /NP
Robocopy & CMDSHELL Link :
http://saurabhsinhainblogs.blogspot.in/2014/02/copy-all-files-from-one-drive-to-other.html
http://saurabhsinhainblogs.blogspot.in/2014/02/copy-all-files-from-one-drive-to-other_6.html
Method 2 :
If this is just for a DR then you can do the below..
You can configure database mirroring or Log shipping to implement the same.
If there is any other purpose , for example generating any nightly reports or anything then you have to restore the database with RECOVERY and etc...
Raju Rasagounder Sr MSSQL DBA

Similar Messages

  • JDEV 11G TP4 [BUG]: Offline Database / Copying from another workspace

    see JDEV 11G TP4 [BUG]: Offline Database / Copying project from workspace
    Message was edited by:
    micwic

    I completely reinstall JDev and set it to use subversion ... that resolve the problem and i'm no more in a position to reproduce it.

  • Moving the mailbox database copy from one exchange server to another exchange server 2010 DAG

    Hello Team
    is it possible to the move the passive copy of database and logs from one server to another exchange server in the same DAG with out removing  and deleting the mailbox database copies in exchange 2010
    normaly procedure is
    Remove the mailbox database copies and manually delete the .edb files and logs from the physical location and re-add the mailbox database copy to the new server in the DAG.
    is that any way to achieve to move the passive database copy to another exchange 2010 server in the same DAG ?

    From your note, you appear to have a two-member DAG (with a server hosting your active database, and a second hosting the passive copy), and you want to move your passive database copy from the current passive server to another.  Your note
    about what "the normal procedure is" isn't 100% correct - there are many ways to handle this task, and all can be considered "normal". Why not just add the third server to the DAG and
    add a database copy on that third server?  Once it is fully seeded, you can remove the current passive copy.  This way, you never lose your redundancy.
    Yes i can add the third and fourth  serve in DAG , but i cannot add the mailbox database copies to the 3rd and 4th mailbox server in DAG as am using RTM version of exchange 2010 which is allowing to have only 5 database inclding mailbox datbase copies
    and also currently my lab setup is  two member dag (with a server hosting your active database,
    and a second hosting the passive copy) in the same site named SITE A
    and recently i have created new SITE B and included the 3rd and 4th DAG members in the same DAG
    i want the  mailbox database copies from the mailbox server  database  in SITE A  to
    Mailbox server database in  SITE B as  passive copy
    That is why i want to move the mailbox database without deleting / removing it manually
    Hope you understand my situation!

  • I need to copy data from a table in one database (db1) to another table in

    Hi
    I need to copy data from a table in one database (db1) to another table in another database (db2).
    I am not sure if the table exists in db2,,,if it doesnot it needs to be created as well data also needs to be inserted...
    How am I supposed to this using sql statements..?
    I shall be happy if it is explained SQL also...
    Thanking in advance

    How many rows does the table contains? There are manyway you can achieve this.
    1. export and import.
    2. create a dblink between two databases and use create table as select, if structure doesnot exists in other database, if structure exists, use, insert into table select command.
    example:
    create a dblink in db2 database for db1 database.
    create table table1 as select * from table1@db1 -- when there is no structure present
    -- you need to add constraints manually, if any exists.
    insert into table1 select * from table1@db1 -- when there is structure present.
    If the table contains large volume of data, I would suggest you to use export and import.
    Jaffar

  • Copy few test assignment with User from one database instance to another

    Hi,
    I have OTL ,Payroll and HRMS system. I want to Copy few test assignment with User(Few FND Users) from one database instance to another .
    Source: DEV Instance
    OTL users to enter their Time sheet
    OTL is intergated with HRMS to pickup Employee information
    Existing business users are integrated with Employee assignment etc tables to pickup person_id
    Target: Want to copy few test OTL users from ONE instance to another. Bringing FND_User is easy but EMPLOYEE_ID, PERSON_PART_ID will not come during FNDLOADER .
    How to bring all information from one instance to another instance? Please advice.
    thanks .

    Dear,
       Try using HRMS configuration workbench. For this you might require support from your DBA for configuring the same. Once configured, you can move the items you want.
    Regards,
    Kathan

  • Not able to connect linux database instance in another machine

    Hi,
    I have installed oracle 10g database server in Linux, and i created one database instance. and i have added tns entry and listener entry.
    I am to connect the database on that machine. but not in different machine. i am able to access/ping linux machine in another machine also.
    while creating tns entry for linux database instance in another machine using "netca" i am getting this error.
    Connecting...ORA-12560: TNS:protocol adapter error
    The test did not succeed.
    Some of the information you provided may be incorrect.
    Click Back to review the information provided for net service name, or Change Login to change username.
    I verified listener and tns entry ( i think for this listener configuration is enough) also. and database is up.
    If anybody knows why i am not able to connect linux database in another machine. is there any network configurations other than listener configuration.
    Thanks in advance.

    yes i tried to connect with ORACLE_SID, its successful. and using tnsname like you said.
    Instead of using netca to create the tnsnames.ora entry on the second server, copy the tnsnames.ora entry from the DB server. Then use tnsping to test connection :-i done above but not able to ping the tns name, i am getting this error.
    TNS-12560: TNS:protocol adapter error
    ------------------------------------------------

  • Javascript error in BEx after system database copy

    Hello,
    we made a database copy of our BW 3.1 system on another hardware. After having done everything described in the How-To-Guide "Enable SAP BW Web functionality", we called the BEx via URL. The login screen displays and also the Report menu, but there occur JavaScript errors on the page, that didn't occur in the copy master. E.g.
    "SAPBWSSgdo is null or not an object" or
    "SAPBWItemCatalog undefined".
    These errors prevent the choice menu for BW report value options to be displayed, which is quite annoying. Does anybody know where the error might come from? Are there any components required by BEx which weren't copied with the database copy?
    Thanks for your help in advance,
    Volker Hofmann

    Hi Beat,
    thanks you're helping me! The MIME-Repository objects like JS-Files, stylesheets and images can be read. The strange thing is:
    The J2EE engine is hosted by a provider. When they're calling the BEx web reports, they're displayed correctly. But when we call them (via proxy!), the error occurs. Even the application management doesn't know where the error comes from, after having checked if the proxy caches old data. The error is still not resolved...
    Do you have another idea?
    Regards,
    Volker

  • SQL Developer Database Copy truncates DATE columns

    Hope someone can help me. I want to copy all object from one schema to another schema in my Database. I have used the "tools - Database Copy" utility and it copies all of the objects and data however when I query the DATE columns in the destination schema the time element has been truncated? Why has this happened?
    tab_h contains a column h_date of type DATE
    Query
    SELECT TO_CHAR(H_DATE, 'MM-DD-YYYY HH24:MI:SS') from tab_h;
    returns
    02-07-2012 09:54:14
    from the source table
    yet returns
    02-07-2012 00:00:00
    from destination schema? This is the case for all DATE columns in the tables.
    I noticed this was happening in 3.0.04.34 and I upgraded to 3.1.07.42 and it still happens.
    Thank you

    Maybe there's a problem getting the OS settings right; try to add this to \sqldeveloper\bin\sqldeveloper.conf:
    AddVMOption -Duser.region=USIf that works, you can try others closer to you.
    Hope that helps,
    K.

  • Cannot add mailbox database copy to DR site - .edb file not getting created

    I have a DR site setup that I want copies of 4 of my mailbox databases.  3 of the mailbox databases copied over successfully but the last and largest one which is really not that large 69Gbs keeps failing when i Update the database copy.  Seems
    to not be creating the .edb file.  Is there another way to get the .edb file over to the server, possibly manually copying it then doing and update database copy?  I have my backups turned off on all the servers that have the mailbox role on it now
    thinking that was causing some issues with the database copy?  Any suggestions is appreciated, thanks.
    Michael Duhon

    Yes manually copy the edb file and paste them in the DR server . Then try to update with for the incremental of database copy. Verify the database is clean shutdown that you are moving to the DR site.
    What error message it throws when you performing update the database copy
    Exchange Queries

  • Database copy dropped objects in source schema

    I was seeking out a quick way to copy an entire schema from one db to another and I was happy when I found the "database copy" feature. I checked the documentation and found that all I needed to do was select the source connection, the target connection, and choose either create, truncate, or drop objects. Well I had some objects in the source db from a previous failed attempt at copying all the objects via script. To remedy that the drop objects option, according to the documentation " Drops any existing table with the same name, and then creates and loads it from the source." Ok, great. The summary shows up with a bunch of entries which I didn't pay too much attention too. Fine, continue...running....progress...so far so good..and the log shows up. I see drops, I see moving data, and I see a whole bunch of errors with no useful information with them. Check the target schema...nothings there, all objects are dropped. Ok, lets have a look at the source and see whats going on. Refresh tables...nothing...refresh...refresh...nothing. The source schema has all its objects GONE too! One lonely type is saved in the source schema, that's it. Am I a total moron and misinterpreting how database copy works? Can anyone shed some light on this? Anyway to recover my source objects? As the source db is not production I am out of luck as there is no recent backup.
    Source: 9i
    Target: 11g
    sql developer v 2.1.1.64.45
    -j

    OK the problem was that my target connection was inadvertently pointing to the source. It was set properly before but stuff went bad and i switched the connection from TNS to basic, then back to TNS. Apparently when switching back to TNS the wrong entry was selected. Not sure if I chose it or it was selected from a different connection. In any case, very stupid of me.
    thanks K.
    Edited by: [email protected] on Jun 17, 2010 6:45 AM

  • Microsoft Exchange Server/Exchange 2010/Mailbox/Database Copy Mounted

    Good Morning everyone!!!
    I Have SCOM 2007 R2 CU5 Envoirnment and i am monitoring Microsoft Exchange 2010 SP1 Messaging infrastracture,
    I have Microsoft Exchange  2010 SP1 Monitoring MP, MP version is 14.2.71.0.
    Case:-
    When exchange is having issue with DAG, SCOM monitoring rule:- KHI: The database copy is not mounted on the local server. Another database copy may be mounted on a different server.
    is generating the alert but alert Description is only "    _ef4a8515_1cc0_48a9_aa12_92ba059a6eae_ " and rest of the things are blank
    and because of this ticketing team is unable to process these alerts,
    Impact:-
    Whenever DAG is unavailable, messaging team is not getting notification and because of this. Exchange services are failing down,
    Does anyone having this kind of issues on their exchange environment?
    I am looking solution for this issue, please let me know if anyone is aware about this.
    Regards, Ganesh M <!> Microsoft MPN - Member =========================================================== Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer
    your question. This can be beneficial to other community members reading the thread.

    Does anyone has updated information regarding Exchange 2010 DAG monitoring fix, <o:p></o:p>
    As i see there was exchange MP release on 31st Aug 2012
    ID
    Name
    Targets
    _ef4a8515_1cc0_48a9_aa12_92ba059a6eae_
    KHI: The   database copy is not mounted on the local server. Another database copy may   be mounted on a different server.
    Root   Management Server
    _EF51D339_22C5_49b3_8B6B_25002BE31D4A_
    KHI: Retry   Mailbox Delivery Queue Length - sustained for 90 minutes - Red(>1) - Hub   Transport.
    Root   Management Server
    _93558cf0_e063_45b1_b57a_0d4b53e0d615_
    KHI: The   Microsoft Exchange Information Store service (MSExchangeIS) isn't running.
    Root   Management Server
    My monitoring is affected for these rules which i mentioned below, here alerts
    information is shown as rule ID instead of Rule name. and we don’t get alert description
    for above rules when the generate alerts.<o:p></o:p>
    Response would be appreciated <o:p></o:p>
    Regards, Ganesh M <!> Microsoft MPN - Member =========================================================== Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer
    your question. This can be beneficial to other community members reading the thread.

  • How to mount database copy without specific datafiles

    Hello all,
    I need to make a database copy without specific datafiles. This is due to, in the copy, I just need some, not all, datafiles.
    I tried the following command:
    startup mount
    alter tablespace mydata offlineBut it appears that the database must be open.
    Anybody have performed some similar?
    There is a document where I can read about it?
    What else I need to know in order to start up this, reduced database copy?
    Thank you in advance.

    Hello All,
    Thanks for your answers.
    Yes I have already copied some filesystems to another server. All the data I need are on that filesystems. I haven´t tried to open the database. So, in order to put it online, and taking in consideration all your suggestions I will perform on this sequence:
    startup mount
    alter database datafile mydatafile1 offline
    alter database datafile mydatafile2 offline
    alter database datafile myindexdatafile1 offline
    alter database datafile myindexdatafile2 offline
    alter database openWith this steps, the database should bring online. Correct?
    There is another step, that Im missing?
    What about the listener?
    Will be enough to change the port and server name?
    Thanks again.

  • Database copy in iseries servers

    Hi,
    I have a query.
    On I Series AS/400 system, we need to refresh production system (P04) to exsting  quality system (Q04).
    database size of P04 is around 250 GB. Remote CLient copy is not feasible as it will take days to complete.
    In case of database copy, save P04data library to tape in production system. Then restore P04data from tape to Quality system. Replace existing Q04data library with P04data library. is it possible?
    If not then what is the procedure to delete existing Q04 system in order to perform Homogenous copy.

    Hi Sailesh,
    There is another forum called "SAP on DB2/UDB on i5/OS" - i5/OS is the new name of AS/400 and iSeries.
    CL program to refresh SAP instance
    have a CL program to refresh WAS ABAP.
    Good luck,
    Victor

  • Database Copy Wizard

    I was looking at the Database Copy Wizard that makes it easy to copy an entire database from 1 place to another, but is there a similar feature to copy specific tables from 1 database to another? Thank you.

    Hi,
    With SQLDeveloper 3.1 release, you can copy entire Database with using DataPump feature. You have different option to choose for Datapump, i.e. Tables, Schemas, Tablespaces and Database. With 'Database, Option in DataPump you can use (exclude/include) filters to copy required Tables.
    Here is UI navigation path, View ->DBA (Add DBA connection with additional DataPump privileges)
    Under the DBA Connection Node ->DataPump -> Export Jobs -> DataPump Export Wizard
    Regards,
    Ramesh Uppala
    SQL Developer Team

  • Bug: 1.5.1 database copy dies silently

    When using the tool 'Database copy' with a source schema with a lot of data, the tool dies silently with the following error :
    Exception in thread "RunnerThread" java.lang.OutOfMemoryError: Java heap space
    The same exception also happens when using the tool 'Database Export', even during dumping the data, it dies with the same error.
    Could this be fixed? that way sqldeveloper can be used to put data from one database to another database.
    Thanks,
    Jan

    SQL Developer gives the error in the console when it is started in debug mode, the ide itself doesn't give any notion.
    Giving SQL Developer JVM more memory is indeed a workaround but with the amount of data I try to unload or copy, SQL Developer will fail before the end I fear.
    It would be nice if this behavior is recognized as a bug and will be fixed in a future release.
    Thanks,
    Jan

Maybe you are looking for

  • Not getting past Free iPhone Finder page in itunes

    I've plugged my iphone 4 to my computer to sync with itunes, however I get a page offering free iphone finder and none of the links on it are working "Not Now" I cant get into my normal menu to sync the iphone? Any suggestions?

  • Updating tables based on Dates

    In my application I use some tables with a date field. table: employee period date (e.g. 01-01-2004, 01-02-204, 01-03-2004) target money result money table: project date date (e.g. 15-01-2004, 20-01-2004, 03-02-2004) revenue money If I book a new pro

  • Could not disconnect from a FaceTime call on 5S running iOS8.0.2

    Received a FaceTime call this morning. Caller was using an iPhone 5S running iOS7. I have a 5S running iOS8.0.2 Once complete neither of us could disconnect from the call. The usual "red button" was not operating. I finally powered off my phone and t

  • User credential not maintained in weblogic7.0 sp2

    Hi, I am using JAAS framework for authenticating user in my application. I have client-side as well as server side authentication that need to be done. For both these things i am using the same authentication class. My application is working fine in

  • VMI laid at customer consignment

    Hi Friends, I have an  interesing scenario to be solved. Our client holds a vendor whos complete products are maitained as a vendor managed inventory in the vendors own storage location. This storage location is a part of our clients Org structure. A