How to write a stored procedure to copy the data from one database to another database

 I want to copy the data from one database to another database every 12 hrs.(This is variable). Say for example I have 3 applications and I want to copy the data from

Parentdatabase1 and insert into CopyofParentdatabase1 for every 6 hrs

Parentdatabase2 and insert into CopyofParentdatabase2 for every 8 hrs

Parentdatabase3 and insert into CopyofParentdatabase3 for every 12 hrs

I have heard that we can do this by using SQL Server Integration Services but as of now we cannot use SSIS. So I want to do this using Stored procedures. Is there a way to schedule the batch job for to run all these stored procedures at the specified time. The above mentioned times may change. So this should pull up these duration hrs from some place.

If there is a way to copy all these data using stored procedures and can schedule these batch jobs using Sql Server management studio, then any one help me or guide to write  storeprocedure and creating that batch job

 

Thanks

0
winned
12/2/2008 5:35:36 AM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

2 Replies
1054 Views

Similar Articles

[PageSpeed] 14

You should Creat A DTS or SSIs Packages to do this its faster


A fine is a tax for doing wrong. A tax is a fine for doing well.
__________________________________________________
Please remember to click “Mark as Answer” on the post that helps you.
0
etariq
12/2/2008 10:24:44 AM

 HI,

   You can create a DTS package for copy the database to another db. You can also schedule these DTS package for regular intervals.

Both steps you can do it using Enterprise Manager itself.
 


-Sri
-------------------------------------------------
If this post was useful to you, please mark it as answer. Thank you!
0
ksridharbabuus
12/2/2008 11:42:25 AM
Reply:

Similar Artilces:

how to copy tables and its data with procedures etc to another database in MS sql 2005
i want  to copy some tables from 1 database to another with its data & procedures etc to another database in Microsoft SQL 2005. can any one help plz reply tnx alot If you need the data then there is no way to use SQL: Scripting but you can backup the database and restore it in the other place. Another solution is to use the copy database (copy between instances) or the DTS. Let me know if you need further info.   RegardsASP.NET Hosting (HostingFest) Thanx brother for Repy ! DTS services are in Sqlserver2000 enterprise manager for using them it is nec...

Move a Table from one SQL 2005 Database to Another SQL 2005 Database
I created a table in an SQL 2005 database, however, I want to move that table and the data to another SQL 2005 database (within the same server). I am new to SQL 2005 and detailed instructions would be greatly appreciated. Thanks Bill You have two options the first is clean but the second is easier.  Try the links below for details.  Hope this helps. http://msdn2.microsoft.com/en-us/library/ms174335.aspx http://msdn2.microsoft.com/en-us/library/ms188029.aspx  Kind regards,Gift Peddie Thanks, but the documentations is somewhat overwhelming and was hoping of a ba...

copy database one database to onther database
hii want to copy one database table to onther database table using script?my database is ms-sql server 2000 Nothing is really over,untill the moment stop trying for it...Amitsp(MCTS,MCP)sqlreporting.blogspot.com You can use import/export task and DTS package created automatically by Enterprise manager or just try  select * INTO [newdatabase].dbo.[newTable] from [sourceDatabase].dbo.[sourcetable]  good luckThanksJPazgier no dear i want to this programatticallyiusing c #,source is my database in local machine and target is other computer means server Nothing is really...

How to copy a table from one database to another database ?
Hello to you, I'm newbie using pb8.02 I'm uisng ms-access 2000 I'd database abc & xyz that contains customer table I want to copy some record on abc.customer to xyz.customer How ? What is the easy way ? should I using datawindow ? (i meant should I always had dw to got this purpose ? ) please advice steven DataWindow purists will flinch, but I think an embedded SQL INSERT INTO xyz.customer (SELECT ... FROM abc.customer) is the clearest way to do that. Two datawindows/datastores, retrieve the first, RowsCopy, Update on the second will also work. Pi...

how to copy one database entries to another database
hi i have a windows based application and a web based application. the database of windows based application and web based application are same but located on different machiene. like windows based application is located on local machiene and web based databased is located on another machiene. Now my prob is that after inserting all the entries in local database i want to copy these entries to web database using my windows application on single click of the button. but i have no idea about it. how could i do this. Thanks in adwance. well you have to create a DTS id ur using sql 2000 or SSI...

How to copy table from one database to another database ?
Hello to you, I'm uisng pb8 How to copy some rows from customer table in (ABC database) to customer table in (XYZ databases) the selection row is : select * from customer where startdate = 2002-06-15 Please show me the code, step by step steven On Sun, 16 Jun 2002 22:30:37 -0400, steven wrote: >Hello to you, >I'm uisng pb8 > >How to copy some rows from customer table in (ABC database) to customer >table in (XYZ databases) > >the selection row is : >select * from customer where startdate = 2002-06-15 > >Please show me the code...

copying tables from one database to another database
i am using visual web developer 2005 and SQL Express 2005 with VB  as the code behindi have two databases . i want to copy all the tables with all the contents from one database to another database programaticallyhow to achieve this ?please help me  easiest way is to use the detach - attach method or backup and restoreKH...

how can I copy the entire database from one sql server to another sql server?
How can I copy the entire database (all the objects from one database to another database)? thanks in advance. Use DTS (right click on a database in Enterprise Manager, select All Tasks, and then Import or Export, as appropriate). You can also back up the database and then restore on the other server.Starting with ASP.NET 2.0? Look at:Programming Microsoft Web Forms My Blog hi Douglas, Thanks for your post. I was looking at the Database Copy Wizard. But it says my local system does not have the permission to copy files over the network. I looked over some tuturials and changed ...

How to Import the data form One database to another database ?
Hi All i populate 2 datawindows in diffrent databases(one is pardox another is delphi database) we r going to merge the 2 database table fields which r equal at that time i need this database to be stored to Third database when button click i want to import the data in third database(any other like oracle or access sybase) ThanQ vasu Vasu; Yes, this is possible, but first - How are you populating the first 2 DW's? Also, Is their structure (columns) the same? What release of PB are you using? regards ... Chris "venu" <pkkrao1@rediffmail.com> wrote in message news:1DNCjZqoCHA.155@forums.sybase.com... > Hi All > > > i populate 2 datawindows in diffrent databases(one is pardox another is > delphi database) > we r going to merge the 2 database table fields which r equal at that time > i need this database to be stored to Third database > > when button click i want to import the data in third database(any other like > oracle or access sybase) > ThanQ > vasu > > Mannually(Via script...) populate 3rd(DS) connected to 3rd Database and issue an Update() statement that will actually do an Inserts into the 3rd DB table? hth Have you tried using a Pipeline? It works really well. Adrian "venu" <pkkrao1@rediffmail.com> wrote in message news:1DNCjZqoCHA.155@forums.sybase.com... > Hi All > > > i populate 2 datawindows in...

Copying data from one database to another
Hi! I'm looking for the way to copy data from one database to another. Both databases are SQL Anywhere. Destination database = source database + new tables + new columns. Destination database has different structure then the source one. It can have new tables, new columns. For copying data I must use RTDSK50.EXE (SQL Anywhere). Mechanism of copying data must be integrated with our program. When user upgrades our program (he does it by Internet) he also must upgrade database. We must copy his data to a new upgraded database. Joanna Have you looked at using a pipeline obj...

How to copy data from one database to another
I am using Interbase XE. I am trying to copy the data from the tables from Database1 to Database2. In IBConssole, the «Copy Data» option is not working certainly because the character set in Database1 is «NONE» and the one in Database2 is «UTF8». I tried to backup and restore but I realized that there' no option in IBConsole to backup and restore only the data (without the Metadata). Is it possible to use for example a SQL SELECT by specifying the origin and final Database? Which option can I use to copy the data from the tables from Database1 to ...

How to copy data from one database to another
Hi, I want to update the data from one sqlanywhere database to another sql anywhere database. I know we can do this in other databases like Oracle and Sybase. How I can do this in SQLANYWHERE version 5.5.04 build 1867. Any help would highly appreciated. Thanks You can use the OUTPUT and INPUT statements that are part of ISQL. For better raw performance you can use UNLOAD TABLE and LOAD TABLE which are server commands (sent to the server 'via' isql but there server does all the reading and writing). &q...

How to transfer the table & its data from one database to another database
Hi I need to transfer the records & strcuture of the table from Database1 to Database2. It is like export/import functionality SQL server. Is there any way to do like this in ASA 8.0.2 B'cos most of the time i need to transfer some of the objects with data from one database to another. Please help me in this regard Thanks in advance Shankar Hi, I am doing this through a few ISQL statements e.g. (connected to db1) SELECT * FROM CUSTOMERS; OUTPUT TO "c:\\tmp\\customers.txt" FORMAT ASCII DELIMITED BY '\x09'; SELECT * FROM SUPPLIERS; OUTPUT...

How can i copy database customize store procedure out and restore it to other database??
Hi, all: How can i copy database customize store procedure out and restore it to other database? 1.copy db1's customize store procedure out 2.restore the store procedure to other new database thks. saul The "defncopy" utility program found in $SYBASE/bin or $SYBASE/ASE-*/bin will extract a script to create the procedure from the source database providing sp_hidetext has not been run on it. (if sp_hidetext has been run, there is no way to extract the script, you would have to contact the author of the procedure). Defncopy will...

Connecting to Sql database and retrieving one row of data from database
Hi Guys.I am trying to connect to a Sql Database in my application through an object of SqlConnection class,then trying to read data one row at a time through DataRow class and then displaying each column(there are total 3 columns in a row) in three textboxes.Can anyone tell me the code to do so? Hi, Reffer this link for connecting with sql server and also with Insert update Delete and select statements http://www.aspsnippets.com/post/2009/02/09/Parameterized-Queries-ADONet.aspx   Best Regardslife is name of learning!Mark as an answer if it helps...

Coping Database objects from one database to another blank database.
I want to create a duplicate database   in sql 2000 using asp.net from a webform I created a database using CREATE DATABASE ....... But how to copy tables, views, stored procedures to newly created database from old using asp.net from webform Is there any another method to create a duplicate database with another name from existing database on same server ? yes you can do have another DB with different name and that has everything the same .....!!!Fadil Alnassar www.fadilalnassar.com | FREE Nodil Tab Controlhttp://www.mefranchising.com One way it can be done is with...

Copying one SQL Server Database into another
Hi, I'm trying to copy one SQL Server Database into another SQL Server DB within the same server. I learnt a bit about this copying, that it copies only the Database structure, the Tabels, constraints view stored procedures etc etc. Is there a tutorial where I can get clear instructions to do this. I just need the table structure without any data to be copied into this. Have even tried exploring creating and executing DTS packages but cudn't get much help with this. Any help wud be really appreciated. ThanksShravan Addaypally MCP You can use Enterprise Manager to create the script. Once...

Help copy data from one Database to another
I am creating a webpage that I want to copy data from one database and tablespace to another database and tablespace. The table names may be different, but the structure should be the same. The reason I need to do this is for getting live data into my testing environment. I was thinking there might be a way to read the data from the source into a variable, then write from the variable into the destination table, but I think this might not be the most efficient way to accomplish it. Both databases are installed on Windows2003 Server running Oracle 10g. Any help will be much appreciated. U...

pulling data from one sql database into another
hi guys  i have two databases, one called the main database, another called the ratings database.... they both have a similar field called ratings, however i want the main database to be an average of the ratings in the user database. any ideas on the basics to do this, i have tried reading the net, but am quite clueless cheers chuChu = Noob, please help Take a look at http://www.w3schools.com/Sql/sql_select_into.asp should help you to get started. Good luckRegardsJeremyIf this has helped Please: Don't forget to click "Mark as Answer" on the post that helped y...

Out of a stored procedure, can I write to another database?
I would like to (in a store procedure) make a connection to a database I will call consolidated (which has a seperate DSN from the local DB) and run some SQL statements within a stored procedure. Is this possible? If so, how? Many thanks! -- Chance Lead Software Engineer Research & Development Computerworks/Booklog chance@booklog.com Blog: http://chance.PBDJMagazine.com Chance, You can try to use proxy tables for doing that. Please read help for CREATE EXISTING TABLE statement in your ASA documentation for additional info Vlad "Chance" <chan...

Copy items from one SQL Database to another...
...such as stored procedures, tables etc. Initially this started as a case of "doh, I should just be using one database here, not two", and I was simply wanting to copy database tables. In VS2K5 I tried as there is a right click menu option of copy when a table is selected but this doesn't work for me with any database object of any kind. So fast forward to the present...I now am attempting to deploy an app to a hosting service, 1&1.com. I am allowed only one database in my current package, which should be fine for now. So I had to combine the ASPNETDB along with 2 other database...

import one table from one database to another database
if i have one table from database A, and i want to copy the table to database B, then how to do it in SQL server management studio express? is it i have to make sql query?Taj FreewarezNo limitations...It is not a shareware...It is simply free :)http://tajfreeware.blogspot.com try      select * into databaseB.dbo.TableA            from databaseA.dbo.TableA or go to database B and run   select * into TableA              from databaseA.dbo.TableA...

Copy data to another database but maintain permissions, passwords, etc on receiving database
Hi, I'm new to Sybase(ASE 11.0.3) and will need to copy the data in all the tables in one database to a different database. But I don't want to destroy any passwords, etc. that are already in place in the receiving database. Could anyone tell me the best way to do this? Will I need to recreate any indexes? Thanks very much. Sue > I'm new to Sybase(ASE 11.0.3) and will need to copy the data in all the > tables in one database to a different database. But I don't want to destroy > any passwords, etc. that are already in place in the receiving da...

Question on copying over overlapping data from one database to another...
.... and preserving the relationships.(Note, this is more of a SQL question than a SQL-related ASP.NET question...)Say I have two databases, D1 and D2, with the same three tables:CompaniesDepartmentsEmployeesWith the standard one-to-many relationships down the line, with eachtable having a PK, IDENTITY field like CompanyID, DepartmentID, andEmployeeID.I have a smattering of data in each of D1 and D2 for these tables withoverlaps in the ID field values. What I want to be able to do is copyover D1's data to D2, preserving the relationships in D1 even thoughthere are ID overlaps in D2. So the t...

Web resources about - How to write a stored procedure to copy the data from one database to another database - asp.net.sql-datasource

Parliamentary procedure - Wikipedia, the free encyclopedia
... of the House of Commons of the Parliament of the United Kingdom , from which it derives its name. In the United States, parliamentary procedure ...

Rushed cosmetic procedures a 'recipe for disaster'
&#8203;When Chanelle O'Hare went searching online for a deal on potential cosmetic procedures, she could not have imagined that what she ended ...

Jetstar procedures under investigation after planes took off too heavy
Jetstar's procedures for calculating the weight of its aircraft are under review by the Australian Transport Safety Bureau after two of its planes ...

Doctors Perform Medical Procedure On Wrong Newborn
The procedure was meant for another child.

Old Lady Lawyer: Uncivil Procedure
What is some of the worst behavior you've witnesses by attorneys?

NFL Announces Changes to Officiating Procedures for Playoffs - Bleacher Report
The NFL formally approved changes to its postseason officiating procedures to allow referees the opportunity to consult Vice President of Officiating ...

We need to reform the culture of law enforcement, not just the procedures
We need to reform the culture of law enforcement, not just the procedures by digby I have a new piece up at Salon this morning about police ...

Rescued tiger cub "Himmel" dies during medical procedure - CBS News 8 - San Diego, CA News Station ...
Alpine animal rescue sanctuary Lions, Tigers & Bears is sadly reporting Himmel, the tiger cub found roaming the streets of Hemet and rescued ...

Catholic hospital allowed to deny sterilization procedure, judge says
Hospital in California argued that the procedure known as ​tubal ligation would violate its religious freedom

TSA Updates Screening Procedure, Will Mandate Some Passengers Use Full-Body Scanners
... Imaging Technologies, or AIT, in favor of full-body pat-downs by TSA agents. Under the new mandate, not everyone can opt for the pat-down procedure. ...

Resources last updated: 2/16/2016 6:51:56 PM