How To Transfer Back Data To Production Database
Nov 19, 2015
I have question regarding SQL Transactional Replication methodology
1. Let's say successfully created SQL Transactional Replication and running / transferring data from publisher to subscriber
2. Now one day the source production / publisher SQL Server is down and the remaining DR SQL Server is up (subscriber)
3. Next day, we fixed and bring up the production / publisher SQL Transactional Replication server, then how can we sync back all existing data records from subscriber into publisher side ?
View 3 Replies
ADVERTISEMENT
Apr 24, 2007
I developed an asp.net application in visual web developer 2005 express edition and SQL sever 2005 express with Advanced services. The application has been deployed and iam wondering what tools are availabel to for backing up my data. Are there any tools i can use to back-up my database. Iam not talking of third party tools but tools a vailable in sql sever 2005 express with advanced services or visual web developer express.
OR can write a vb.net Sub procedure that i run and have my database backed up. If so where can i start or what other options may i explorer.
View 4 Replies
View Related
May 11, 2007
Can someone provide a step by step tutorial for this? I'd like to safely update a database that is used for a website without much or any downtime.
View 1 Replies
View Related
Jul 15, 2001
We need to perform some maintainence on our database server which may take quite some time. We have a standby server which we constantly apply logs to.
We are planning to recover the standby server and use it while the production server is being maintained.
My question is how to I get back to using the original production machine.
The only way I can think of is to do a full backup on the standby machine,
do some transaction log backup and then restore these on the original production machine.
Is there any way to use the full backup from the original production machine and well as logs from the standby machine. When I try this I get the message that the database has not been rolled forward far enough.
In summary:
1. Backup full database on Prod Server
2. Restore full database on Standby Server
3. Backup transaction log (1) from Prod Server
4. Restore transaction log (1) on Standby Server
5. Recover database on Standby Server
6. Make modifications on Standby Server
7. Backup transaction log (2) on Standby Server
8. Restore full database on Prod Server
9. Restore transaction log (1) on Prod Server
10. Attempt to restore transaction log (2) fails.
View 3 Replies
View Related
Oct 14, 1999
My applications group wants to do a table transfer from one server to another as a means of refreshing the information on the target on a scheduled basis. That means that reports could be running against the target table during the transfer. This has introduced erroneous reports because the object transfer initially truncates the table, then transfers the data. If reports are running during the transfer, they might retrieve no data or only part of a table. I wrote a procedure to make a copy of the table to be transferred, then transfer that new table to the target machine, then drop the target table, then rename the transferred table. Now, I have the slightly smaller problem of doing a DROP TABLE when users are accessing the table. I can't set the database to 'dbo use only' because there are other tables in the database that must be available. Is this really a replication application?
Cindy Rutherfurd
SQL Server DBA
ZC Sterling Corp.
View 1 Replies
View Related
Aug 8, 2002
I would like to know what procedures are required to transfer passwords from my Production server to my Test server.
View 1 Replies
View Related
Feb 22, 2005
Hello
I have a production database that i need to refresh to our test environment daily. The database size is 700 MB.
I do not need to transfer the stored procedures and triggers , users and logins.
Would a DTS package that runs every night be the best and the easiest solution to implement or should i look into log shipping and snapshot replication.
thanks
View 2 Replies
View Related
Jan 17, 2007
Hello,
I am trying to refresh a test database with data from a production database. Both database structures are identical, e.g. constraints, stored procs, PK, etc. I am trying to create a package in SSIS that accomplishes this task and I am having extensive problems. The import export wizard is out of the question because the constaints are not carried over, plus when I try to refresh the data using the import export wizard, it fails on 1 specific table because of a column in that table named "Error code". I think "Error code" is a micrsoft keyword, so it fails on this column. Does anyone know a workaround that I can do to accomplish this simple task, that could be completed in minutes using DTS. I understand that SSIS is not as straight forward as DTS, but this task is something that DBA's do on a regular basis and therefore should not be this difficult.
Any help would be appreciated,
David
View 1 Replies
View Related
Dec 22, 2014
(SQL 2012 Standard)
I have a database with one 320 .mdf file and one 200GB .ndf file.
I would like to reconfigure my database to have four 200GB .mdf files. How do I get from here to there?
View 5 Replies
View Related
Jun 11, 1999
i have a old database in foxpro and it has to be converted to sql server 6.5 database . the table in the foxpro has been broken into more than 1 tables in the sql server . so how can i transfer the data from 1 foxpro table to different tables in sql server 6.5.
vineet
View 1 Replies
View Related
Sep 7, 2006
I'm new at this so I apologize in advance for my ignorance.
I'm creating a website that collects dates in a calendar control (from Peter Blum). When the page containing the control loads it populates the calendar with dates from the database (that have previously been selected by the user). The user then can delete existing dates and/or add new dates.
I create a dataset when the page loads and use it to populate the calendar. When the user finishes adding and deleting dates in the calendar control I delete the original dates from the dataset and then write the new dates to the dataset. I then give execute the data adapter update command to load the contents of the dataset back into the database. This command involves using parameterized queries. For example the Insert command is:
Dim cmdInsert As SqlCommand = New SqlCommand("INSERT INTO Requests VALUES(@fkPlayerIDNumber, @RequestDate, @PostDate, @fkGroupID)", conn)
cmdInsert.Parameters.Add(New SqlParameter("@fkPlayerIDNumber", SqlDbType.Int))
cmdInsert.Parameters.Add(New SqlParameter("@RequestDate", SqlDbType.DateTime))
cmdInsert.Parameters.Add(New SqlParameter("@PostDate", SqlDbType.DateTime))
cmdInsert.Parameters.Add(New SqlParameter("@fkGroupID", SqlDbType.Int))
da.InsertCommand = cmdInsert
The update command is:
da.Update(ds, "Requests")
When I run the program I get the following error:
Parameterized Query '(@fkPlayerIDNumber int,@RequestDate datetime,@PostDate datetime,' expects parameter @fkPlayerIDNumber, which was not supplied.
I've used debug print to establish that the table in the dataset contains what it should.
I would be more than grateful for any suggestions.
View 3 Replies
View Related
Jun 6, 2007
Ok, so thank you first off to Arnie for helping with my auto-increment problem. I'm not in the office now, but I can't wait to try out what he showed me to get this thing running.
My bigger problem that I'm hoping you guys can help me with though is this:
I have two servers, and two databases, lets call them dev, and staging. These are exactly the same, except in different physical locations, and changes are made on dev, and then the info is updated to staging. I am writing a C# script to automate the process of updating the information from the dev database on the dev server, to staging. I am profficient with C#, but this is the first time i've ever touched SQL.
So by using the INSERT and SELECT method, I can get the info over properly, I am assuming (as I said I haven't been in the office to try it out yet) but for each table on the database there are different sets of column names, so I can't do a simple
Loop{
SqlCommand del = new SqlCommand("Truncate table " +MyTable", connectionstring)
del.ExecuteNonQuery();
SqlCommand com = new SqlCommand("INSERT INTO MyTable (MyColumn)
SELECT MyOtherColumn FROM MyOtherTable", connectionstring);
com.ExecuteNonQuery();
}While(...) and change the MyTable/MyOtherTable values for each loop.
Is there a quick and easy way of calling a list of columns for each table, so that I can change the table value, get the list of columns, and assign those as a variable? That way it can run through every table on the database, and no matter what the number or names of the columns in each table, it will grab all the necessary data and pass it over.
Thanks in advance,
Aaron L
View 4 Replies
View Related
May 5, 2015
I am having two dataBases in Sql Server 2008 both are live and both have same schema.
On Server 1, I have crores of data in a table.
I would like to move it to Second database .
What will be the fastest way to do.
View 5 Replies
View Related
Feb 27, 2008
Hi,I m using vwd2005 and sql express,c#.I have a question here.In my database i have a table named Table1(id,name,age,country,email,phone) The values for these fields are inserted from the webform.Id is auto generated.name and age is passed from the textbox within the webform.country is passed from dropdownlist within the webform.email and phone is passed from listbox(multiple email and phone) within the webform.Now my problem is i want to retrieve all these row values back into the textboxes,dropdownlist and listbox at the same timeon the click of the retrieve button within the web form . Further more i want to make few changes on it and update the database on the click of another button update within the form.I hope u are getting it.How would the query would be in this case.?can u demonstrate the concept in one simple running example along with code?thanks.jack.
View 3 Replies
View Related
Mar 25, 2008
Hello Everyone,I 've trying to retreive data back into webform from the database from past couple of weeks.But i m not able to retrieve it completely.Here is my scenario.I've tried to explain in detail but in simple language.I hope u will get my point.Ok here it is.plz run my code:-i have three tables in sql.they are:-grup(id,grp) (1,abc) (2,xyz) organization(id,oid,gid,organisation,orgphone) (1,1,1,ibm,1234567) (2,1,2,microsoft,6543210) (3,2,1,oracle,7654323) (4,2,2,apple,9876543) userform(id,title,name,address,email,organizationid) (1,mr,jack,usa,jack@jack.com,1) userform.aspx page<%@ Page Language="C#" AutoEventWireup="true" CodeFile="userform.aspx.cs" Inherits="userform" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <div style="text-align: center"> <table> <tr> <td style="width: 100px"> Title</td> <td style="width: 100px"> <asp:DropDownList ID="DropDownList1" runat="server"> <asp:ListItem>mr</asp:ListItem> <asp:ListItem>miss</asp:ListItem> <asp:ListItem>ms</asp:ListItem> </asp:DropDownList></td> </tr> <tr> <td style="width: 100px"> Name</td> <td style="width: 100px"> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></td> </tr> <tr> <td style="width: 100px"> Add</td> <td style="width: 100px"> <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox></td> </tr> <tr> <td style="width: 100px; height: 26px;"> Email</td> <td style="width: 100px; height: 26px;"> <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox></td> </tr> </table> </div> </div> <div style="text-align: center"> <div> <div> <asp:ScriptManager ID="ScripManager1" runat="server"> </asp:ScriptManager> <div> <table> <tr> <td style="width: 100px"> Group</td> <td style="width: 100px">
<asp:DropDownList ID="ddl1" runat="server" AutoPostBack="true"
OnSelectedIndexChanged="ddl1_SelectedIndexChanged"> </asp:DropDownList></td> </tr> </table> </div> <div> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <table> <tr> <td> Organisation </td> <td>
<asp:DropDownList ID="ddl2" runat="server" AutoPostBack="true"
OnSelectedIndexChanged="ddl2_SelectedIndexChanged"> </asp:DropDownList> </td> </tr> <tr> <td> org-phone </td> <td> <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox> </td> </tr> <tr> <td> </td> <td>
<asp:TextBox ID="TextBox5" runat="server"
Width="45px"></asp:TextBox></td> </tr> </table> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="ddl1" EventName="SelectedIndexChanged" /> </Triggers> </asp:UpdatePanel> <br /> <table> <tr> <td style="width: 100px"> <asp:Button ID="Button1" runat="server" Text="save" OnClick="Button1_Click" /> </td> <td style="width: 100px"> <asp:Button ID="Button3" runat="server" Text="update" /></td> <td style="width: 100px"> <asp:Button ID="Button2" runat="server" Text="cancel" /></td> </tr> </table> </div> </div> </div> </div> </form></body></html>userform.cs page public partial class userform : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { AssignDDLDataSource(); ddl1_SelectedIndexChanged(null, null); } } private void AssignDDLDataSource() { // SqlConnection string sqlQry = "SELECT GRP DISPMEM, ID VALMEM FROM GRUP"; SqlCommand cmd = new SqlCommand(sqlQry, con); ddl1.DataSource = cmd.ExecuteReader(); ddl1.DataTextField = "DISPMEM"; ddl1.DataValueField = "VALMEM"; ddl1.DataBind(); } protected void ddl1_SelectedIndexChanged(object sender, EventArgs e) { AssignSubjectDDL(ddl1.SelectedValue); } private void AssignSubjectDDL(string val) { // SqlConnection string sqlQry = "SELECT ORGANISATION DISPMEM, GID VALMEM FROM ORGANIZATION where OID = '" + val + "'"; SqlCommand cmd1 = new SqlCommand(sqlQry, con); ddl2.DataSource = cmd1.ExecuteReader(); ddl2.DataTextField = "DISPMEM"; ddl2.DataValueField = "VALMEM"; ddl2.DataBind(); ddl2_SelectedIndexChanged(null, null); } protected void ddl2_SelectedIndexChanged(object sender, EventArgs e) { AssignTextBoxValues(ddl1.SelectedValue, ddl2.SelectedValue); } private void AssignTextBoxValues(string teamval, string memval) { // SqlConnection
string sqlQry = "Select ID,ORGANISATION,ORGPHONE from ORGANIZATION
where OID = '" + teamval + "' AND GID = '" + memval + "'"; SqlCommand cmd = new SqlCommand(sqlQry, con); SqlDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { TextBox5.Text = rdr["ID"].ToString().Trim(); TextBox4.Text = rdr["ORGPHONE"].ToString().Trim(); } } protected void Button1_Click(object sender, EventArgs e) { // SqlConnection
string sqlQry = "INSERT into USERFORM (title, name, address, email,
organizationid) VALUES(@title,@name,@address,@email,@organizationid)"; SqlCommand cmd = new SqlCommand(sqlQry, con); cmd.CommandType = CommandType.Text; cmd.Parameters.AddWithValue("title", DropDownList1.SelectedValue.Trim()); cmd.Parameters.AddWithValue("name", TextBox1.Text); cmd.Parameters.AddWithValue("address", TextBox2.Text); cmd.Parameters.AddWithValue("email", TextBox3.Text); cmd.Parameters.AddWithValue("organizationid", TextBox5.Text); cmd.ExecuteNonQuery(); Response.Redirect("detailsview.aspx"); }} detailsview.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="detailsview.aspx.cs" Inherits="detailsview" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <div> <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" EnablePagingCallbacks="True" Height="50px" HorizontalAlign="Center" Width="125px"> </asp:DetailsView> </div> </form></body></html> detailsview.cspublic partial class detailsview : System.Web.UI.Page{ protected void Page_Load(object sender, EventArgs e) { //SqlConnection
string str = "select title,name,address,email,grp,organisation,orgphone
from userform as a inner join organization as b on
a.organizationid=b.id inner join grup as c on b.oid=c.id"; SqlDataAdapter oda = new SqlDataAdapter(str, conn); conn.Open(); DataSet ods = new DataSet(); oda.Fill(ods, "info"); DetailsView1.DataSource = ods.Tables["info"].DefaultView; DetailsView1.DataBind(); }}My problem :-Now when user fills up the userform and clicks the save button the details are shown in the details view.Now i want to add a Edit hyperlink next to the records in the detailsview so that when i click on it i would be redirected to userform.aspx form with all the textboxes,dropdownlist etc be populated from the related data from the database.(here table userform).Now i want to edit these data in the userform.aspx page and finally when i click the update button at end i want all the data be updated in the database aswell as in details view too.at the same time i want this form to redirect to detailsview.aspx .i hope ur getting it?i m able to do partial part only.Not completely. So can u now help me modify the code accordingly?Thanks in advance.Jack.
View 4 Replies
View Related
Jul 23, 2005
I have the following code but do not know the best way to return the updatedDataTable back to the database. I believe I can use the Update method of theData Adapter, BUT if true, I also believe I have to 'long-hand' write codefor each individual column data that's being added......this seems a bitdaft considering that the data is already in the disconnected data table.Have I lost the plot?? Based on the code below, what is the correctapproach?Note: sqlcnn is defined at module level.Public Sub AddRequest(ByVal Eng As String, ByVal Bran As String, ByVal ReqAs String) Implements IHelpSC.AddRequestDim dtNew As New DataTable("dtNew")Dim drNew As DataRowsqlda = New SqlDataAdapter("SELECT * FROM ActiveCalls", sqlcnn)sqlda.Fill(dtNew)'Add and populate the new datarow with'data passed into this subroutinedrNew = dtNew.NewRowdrNew("CallTime") = Format(Date.Now, "dd MMM yyyy").ToStringdrNew("Engineer") = EngdrNew("Branch") = BrandrNew("Request") = ReqdtNew.Rows.Add(drNew)End SubHope one of you wizards can help.Rgds.....and Merry Christmas.Phil
View 2 Replies
View Related
May 14, 2015
New to Database Mirroring and I have a question about the Principal database server. I have a Database Mirroring setup configured for High-safety with automatic fail over mode using a witness.
When a fail over occurs because of a lost of communication between the principal and mirror, the mirror server takes on the roll of Principal. When communication is returned to the Principal server, at some point does the database that was the previous Principal database automatically go back to being the Principal server?
View 2 Replies
View Related
May 22, 2000
What is the best approach when transferring all database objects & data from a SQL Server 6.5 database to SQL Server 7.0 database running on different servers.
Thanks in adavance for your tips
Cheers,
Phil
View 1 Replies
View Related
Oct 20, 1999
Hi,
I 'am working with SQL Server7.0, and I need to transfer bulk of data(in millions) from aremote database in Rdb to SQL Server. What is the best approach other than using a comma delimited flat file? Is there a way to create a database link and then use a copy script in SQL to copy the data directly? I would appreciate any help. Thank You.
Jothi
View 1 Replies
View Related
Apr 21, 2008
Guys
i have two database on my sql server,, and i m trying to create a report in whch both database need to share their data.. @ the moment what i did, i simply create a view on one database to access the table of other database.. but is anyone has a better idea how can i transfer data from one database to another database... i think if i do with creating temp table that might resolve this problem.. but when it comes on another server of another database , how can i will do this ...
please give me any idea if u got my point .
Thanks and looking forward.
View 5 Replies
View Related
Jul 20, 2005
I have a client who was installed improperly on a Case InsensitiveCollation SQL system and have been working with this system for over ayear. For them to move forward in application software versions, theywill need to be reinstalled on a Case Sensitive SQL system. I waswondering if anyone has tried this and was willing to provideinformation that may be of assistance? I have tried various someoptions within DTS but without success.
View 1 Replies
View Related
Feb 12, 2007
Hello guys
My server crashed but luckily I was not able to get back my files with help of recovery software.
Now, all I have from the database are just sql server database primary data .mdf and sql server databaseTransaction Log Files .ldf. I need to restore these data back to sql server.
Please could someone tell me how to restore these two file types back to my sql sever 2007 database?
Thanks
netboy
View 3 Replies
View Related
Sep 20, 2006
Hi,
I'm new to SQL server, and I would like to achieve below tasks. Kindly
provide brief guildline on how to achieve these:
1.) I have managed to schedule job in SQL server to download the access database from remote server.
2.) Second, I would like to transfer all the data from my acccess database to my SQL tables.
May I know how do I achieve my task no 2???? I believe I need to write some script (procedure) in order to achieve this.
pls advise....
View 2 Replies
View Related
Jul 4, 2015
Transfer tables with Data from one database to another one on a same server?
View 10 Replies
View Related
Feb 25, 2006
Hi,
Is there any tool available to migrate the data from the SQL Server test database to SQL Server production database. Data Migration should be based on a condition which can be given as an input for a table by the user. The dependant tables also should be migrated based on the given condition. i.e data subsetting based on the matching conditions.
Ex : Salary > 2000
The rows of the table which matches the condition alone need to be migrated for the corresponding table. Also its dependant table's rows should be migrated based on the given condition. Please help me with a tool which can automate this.
Thanks,
MiraJ
View 4 Replies
View Related
Sep 3, 2015
I cannot open now my database after changing it name from the folder where it is save and also changed back to its original name.Message recovery pending now is appearing as shown below.Any chance that I could recover my database back?
View 17 Replies
View Related
Mar 20, 2008
Hi All,
i have mutiple text file. let us say,a1.txtb1.txtc1.txt
i have to port this text file data into the table (SqlServer Database) which have the same file structure.(i.e)x1 (SqlServer table)y2 (SqlServer table)z3 (SqlServer table)
now i have to transfer a1.txt file data ----to--- x1b1.txt file data ----to--- y2c1.txt file data ----to--- z3
using SSIS. like that, i have to transfer more than 250 files at a time.manually binding 250 files into the package is very cumbersome and time consuming process.
so, can any one give ur valuable sugession to solve this issue.
View 2 Replies
View Related
Dec 10, 2005
4 Layered Web Application for Inserting data into a database using sql server as the back end and a web form as the front end using C# .
Can someone provide with code as I am new to this architecture and framework.
Better send email.
Thanks In Advance,
A New Bie
View 1 Replies
View Related
May 2, 2008
Hi,
I want to transfer some tables and their data from a database to another database so what is the best way of doing..
In the source Database i right click on that table and then gave Script table and then selected Create To and then copied that create table query and pasted it in the destination table..
So is there is way i can get the rows from all of that table.. There are around... 1000 rows or something like that and that database consits of 5 - 6 tables.
any help will be appreciated..
Regards,
Karen
View 4 Replies
View Related
May 30, 2008
Is it possible/advisable when transfering very large amounts of data from server to server to:
trasnfer the data to a new table first
second alter new table adding indexes, defaults, ets based on original table
if it is what flow item would be used to transfer/alter the indexes and defaults?
I'm very new to ssis so the more detail you can give the better.
Thanks
View 5 Replies
View Related
Mar 29, 2006
Is there a way to transfer data from a SqlServer db to a SqlServer Express db. I tried to use the backup file of SqlServer, but this file is not valid for SqlServer Express. Or there any alternatives?
thanks,
Henk
View 7 Replies
View Related
Aug 24, 2006
hi!
I am able to run the package successfuly in test database. but not in production database. It throughs up error saying
Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted.
Description: Failed to open package file "D:\TAHOE\APPS\SSISPackages\Integration Services Packages\ArchiveMain.dtsx" due to error 0x80070015 "The device is not ready.". This happens when loading a package and the file cannot be opened or loaded c
orrectly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
End Error
Could not load package "D:\TAHOE\APPS\SSISPackages\Integration Services Packages\ArchiveMain.dtsx" because of error 0xC0011002.
Description: Failed to open package file "D:\TAHOE\APPS\SSISPackages\Integration Services Packages\ArchiveMain.dtsx" due to error 0x80070015 "The device is not ready.". This happens when loading a package and the file cannot be opened or loaded corr
ectly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format.
what is the problem here....
JAs
View 3 Replies
View Related
Mar 19, 2014
In the full recovery model, if i run a transaction that inserts 10MB of data into a table, then 10 MB of data is moved in the data file. Does this mean then that the log file will grow by exactly 10MB as well?
I understand that all transactions are logged to the log file to enable rollback and point in time recovery, but what is actually physically stored in the log file for this transactions record? Is it the text of the command from the transaction or the actual physical data from that transaction?
I ask because say if I have two drives, one with 5MB/s write speed for the log file and one with 10MB/s write speed for the data file, if I start trying to insert 10 MB of data per second into the table, am I going to be limited to 5MB/s by the log file drive, or is SQL server not going to try and log all 10 MB each second to the log file?
View 6 Replies
View Related