SQL Database And Trans Log Back Up

I backed up the database, then I backed up the transaction log...The transaction log was ammended to the database back up. Was this a correct way of doing it? Or should the transaction log have it's own backup file apart from the database backup file? Books online does not advise on this.


View Replies


SQL Errors In SMS 2.0: 3902 Commit Trans And Begin Trans.

All of a sudden, our the central SMS server has been getting this error:

Microsoft SQL Server reported SQL message 3902, severity 16: The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION.

Please refer to your SMS documentation, SQL documentation, or the Microsoft Knowledge Base for further troubleshooting information.

This has caused the SQL server to run out of locks, thus exhausting all the available connections.

Is there anyone who knows what this error is, and what process may be causing it?

Is there a kill command that can end the specific SQL query?

Any comments or suggestions are more than welcome!


View Replies View Related

Backup Of Database And Trans Log.

Is there anyway in SQL to backup the Database and Transaction log without truncte the Transaction log? :o. I would like to keep all or as much of the Transaction log info as possable. I know the Trans log will get large but HD space is not a problem. I use the transaction log to report field changes usung Log Explorer.


View Replies View Related

The Log File For Database 'Home_alone' Is Full. Back Up The Transaction Log For The Database To Free Up Some Log Space.

Hi all

Iam working in Prodcution ENV,Please help how make space

The log file for database 'Home_alone' is full. Back up the transaction log for the database to free up some log space.

View Replies View Related

I Want To Revert Back To Original State Of Database Before I Performed Restore Database

Hello,i am in great trouble. I want to revert back to original state ofdatabase before i performed restore database on my sql server 2KDatabase. Accidently i didn't take backup of my Database and i didrestore, so is there any way to get the original state back of myDatabase?Any suggestion will be highly appriciated.Regards,S. Domadia.

View Replies View Related

Updating A Production Database With Back Up Of Development Database

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 Replies View Related

Regarding Sql Database Back

hi can any one guide me how to take database back up from sql server 2005 using visual studio frame work 2008

View Replies View Related

Database Back Up

Can any body help with sample code to backup (sql server 2005 express)database using VB.net on click of a button?

View Replies View Related

Back Up Database

Hi everyone,
I am working in a company where data is changed daily (IT department of a shopping center) where item prices change everyday, the quantity available in stock vary daily,...What is the scenarios available for the back up on SQL Server 2000 (I am a developer not a database administrator, but I have a task to do which is to make a back up for the critical data) .
could u help me with some links or idea.I was thinking of doing a full back up one time everyweek and daily I will do a differential backup?is that the best solution?Thanks.

View Replies View Related

Having Difficulty Setting Back Up To Back Up File Wihout Datetime Stamp SQL 2K

Hello,I'm trying to create a simple back up in the SQL Maintenance Plan that willmake a single back up copy of all database every night at 10 pm. I'd likethe previous nights file to be overwritten, so there will be only a singleback up file for each database (tape back up runs every night, so each daysback up will be saved on tape).Every night the maintenance plan makes a back up of all the databases to anew file with a datetime stamp, meaning the previous nights file stillexists. Even when I check "Remove files older than 22 hours" the previousnights file still exists. Is there any way to create a back up file withoutthe date time stamp so it overwrites the previous nights file?Thanks!Rick

View Replies View Related

Problem In Back-up Database

Hi, i have one database question here. Let me describe my situation first:

i have two different hard disk drives, here i call it HDD1 and HDD2. i want to format my HDD1, but all my database tables are stored in HDD1. i want to know is there any way for me to backup my database table to HDD2, and restore it back later to HDD1.

thanks to you all.

View Replies View Related

How To Back Up The Transaction Log For The Database?

Hi all,
I'm getting the following error message in NT event view:

Error: 9002, Severity: 17, State: 2
The log file for database 'db_sys' is full. Back up the transaction log for the database to free up some log space.

But I don't know how to back up the transaction log for the database.
Do I need TRUNCTE LOG (in E.M) to free up some log space?
I only know back up all the database using ALL TASKS -> BACKUP DATABASE in E.M. Please help me. Thanks in advance.

View Replies View Related

Back Up Database To A Different Server

I am trying to back up database to a different server. I am able to map the serve to my current ones, however, when I go to Enterprise Manager - back up DB, I can not see the mapped drive from back up file location, I wasn't able to see any other disk location but the local drives.

Can somebody tell me how can I back up database to a different server from Enterprise Manager or any syntax?


View Replies View Related

How To Get The RDL Back From The ReportServer Database?


I have a report deployed and working. Now I need to change it but I lost the source (RDL).

Can I get the RDL back from the reportServer database? How?

Help is really appreciated

Tks in advance,

P.S: I'm Using SQL Server 2000

View Replies View Related

HELP!!! Can Not Restore Database From Only Back Up I Have

I had to transfer my database from one server to another. Both are running SQL 2000. I backed the database up and moved it to the new server however when I try to do a restore I get the following message:

The media set for database "xxx' has 2 family members but only 1 are provided. RESTORE DATABASE is terminating abnormally.

I did some searching and found a couple of posts that mentioned something about the back up including 2 files.

My problem is that the machine I backed this up from crashed when it was shut down and would not reboot so all of the data and the original database do not exist. Is there any hope of restoring this database. It is pretty critical.


Melissa :-)

View Replies View Related

Need To Back Up A Database And Then Restore It On Another Server

I need to back up a production database on one server and then copy it to a test server wherel it will be restored. The problem is that I don't know where to move the  file to on the production server before I restore it. Is there a special folder I need to copy the file to? I see a folder named ProgramFilesMicrosoft SQL Server but beyond that I have no idea where to copy the file so that it can be restored?
Can someone help me out please?

View Replies View Related

How Can I Back-up My Database In Production Environment.

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 Replies View Related

Is It Possible To Just Restore Particular Tables From A Back Up Of A Database

  I backed my sql server database on Fri at 3:15pm and then tried importing some tables individually from a different database and but that didnt work out too good, so is there a way i can just restore particular tables from the backup.
any help will be appreciated.

View Replies View Related

Database Back End - SQL Server Or Access

Hi. I am writing a web app for a small company with 50 employees fortheir payroll and sales. Should I use SQL Server or Access as thedatabase?Kevin

View Replies View Related

Weird Database Back Up Sizes

I've got a 9gig DB which when backed up using the gui comes to 5gigs.When backed using the SQL "backup database" command it comes to 20gigs.Can someone suggest a good reason for the difference?

View Replies View Related

Manual Back Of Database Error

HiI am attempting to take a manual backup of an SQL 2005 database, viaRight Click on MyDatabase --Tasks --Backup[Specify the filename path and type of backup]However, when I try to specify the filename or, in fact, do anything, Ireceive the following errorProperty BackupDirectory is not available for Settings'Microsoft.SqlServer.Management.Smo.Settings'. This property may notexist for this object, or may not be retrievable due to insufficientaccess rights. (Microsoft.SqlServer.Smo)The user I'm logged into the database with, however, has full rightswithin SQL.Does anyone have any ideas?Thanks!

View Replies View Related

Getiing The Database Back From MDF Files

Hello All!
Here is an intresting and challenging question to you all.
One of our idiot admin happens to reinstall the SQL Server with out realizing that other are have databases on that server.
I have the MDF files on the server. Is there any way I can create the databases and point to that MDF files so that they can have the data and the table structures back. Itired to create the database that way the databse gets created but its having trouble actibvating those files. Some please help.

View Replies View Related

Passing A Date Name To A Database Back Up

I am trying to pass a datename in to a database backup. The date is to be retrieved from the 'monthname' column which is stored in the 'tblbill' table. I have included my ridiculous bit of code below (which funnily enough does not work!!) just so that you can see what I am trying to do. Can anyone help?

DECLARE @name varchar(10)
backup database Bill to Disk ='c:@name.dat' with init

@name =select distinct monthname from tblbill where monthname is not null


View Replies View Related

Reason To Back Up Database Master Key?

I can backup this key using something like:

BACKUP MASTER KEY TO FILE = 'c:TestEncryptionMasterKey.key'


but why would I need to do it as the DBMK is stored in the databases itself ( in sys.symmetric_keys) and we dump all databases nightly. Just "in case"?



View Replies View Related

Getting Data From Dataset Back Into Database

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 Replies View Related

**I M Not Able To RETRIEVE Data Back Into Webform From The Database?

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>                        &nbsp;</div>                    <div>                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">                            <ContentTemplate>                                <table>                                    <tr>                                        <td>                        Organisation&nbsp;</td>                                        <td>                                           
<asp:DropDownList ID="ddl2" runat="server" AutoPostBack="true"
OnSelectedIndexChanged="ddl2_SelectedIndexChanged">                                            </asp:DropDownList>&nbsp;                                        </td>                                    </tr>                                    <tr>                                        <td>                        org-phone&nbsp;</td>                                        <td>                        <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>&nbsp;</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       
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 Replies View Related

How Can I Retrieve The Data Back Into The Webform From The Database?

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 Replies View Related

Copyrights 2005-15 www.BigResource.com, All rights reserved