Database Restore Questions
Apr 19, 2007
Hello Gurus,
I wanted to restore a database to multiple data files from backup which has got only few data files. Is it possible do this?
Example : Backup has 4 data files and I need to restore it to 8 data files.
Thanks
Subbu
View 1 Replies
ADVERTISEMENT
Nov 15, 2004
Hi everybody,
I am trying to figure out SQL Backup and restore and I was wondering if you guys could enlighten me.
I figured out how to restore a DB on my local sql box but let's say my server catches on fire and my backup is on tape, how do I restore my DBs on a different box ?
I have a second machine I built for test but apparently it won't restore from the tape.
What is the best way to back up your data in case of major hardware problem ? And how to restore it to a completly different server. I am running tapeware w/ sql agent.
Thank you, any help will be greatly appreciated. -Seb
View 2 Replies
View Related
Feb 12, 2008
Hello,
1) We run full backup on SQL server 2005 on weekly basis (Sundays), diff - every night, and backup of tran logs every hour. Let me descrive the following scenario: if our server would crash on Wednesday at 5 pm, how can I restore it properly? Do I need to restore it from full Sunday backup + latest diff backup from Tuesday night + latest tran logs from 4 pm? We have full recovery mode on the databases.
2) If we change recovery mode from full to simple, is it possible we have data loss in case if the server crashes let's say at 1 pm, and we have full backup only from previous midnight only?
Thank you,
Julie
View 7 Replies
View Related
Apr 27, 2007
I have seen this before. A 2000 restore fails, leaving the database thinking it is being restored but the restore job failed and errors when it is restarted. EM is clueless. I believe there is a proc to reset some flag. Can you share it with me???
Thanks!
View 4 Replies
View Related
Nov 19, 1999
11/19
Trying to keep out sysadmins & sa during/between database RESTORE
Configuration:
WINNT Server Enterprise 4.0 w/SP5
SQL Server 7 Enterprise & SP1
2 SQL Servers:
Production Server
Standby server
I Backup (full backup) databases to disk on primary server (logical backup devices are physicaly located on a Standby server (dedicated gigabit NIC in each server for this process). Transaction logs are applied to the Standby server throughout the day.
Problem:
How to keep out "sa" and sysadmins from a database while I'm restoring (or between restores) to a standby server?
The database being restored cannot be in use during a restore.
If a DBA forgets that this process is happening, the statement fails (RESTORE)for the database they happen to be in at the time of the restore.
Example restore statement:
Standby Server -
RESTORE DATABASE databasename FROM database_dd WITH DBO_ONLY, REPLACE, STANDBY = 'g:Mssql7FromPrimaryDatabaseName_undo.ldf'
I could restrict Domain sysadmin access and change sa password. I could also put the database in "Single user" mode, however this could become problem if my process disconnects and then someone else connects - then my process is locked out. What I'm really looking for is to lock out all activity for a database that is in "standby mode" except for RESTORE processes.
Any ideas??
Wade
wadej@vailresorts.com
View 1 Replies
View Related
Jul 20, 2005
We are negotiating with a vendor and we have a few questions:1) From a licensing point of view, what is a database? Can we installmultiple copies of SQLServer on one box? In that case, would eachcopy be a different database?2) Within a single SQL Server installation, I can create multipledatabases, as listed in the Enterprise Manager. I can switch amongthem using "use ..." commands. Would these be treated as differentdatabases?3) We have copies of our transactional database in identicaldevelopment, QC, and production environments. Is this a singledatabase, or 3 databases?
View 3 Replies
View Related
May 17, 2008
Hey guys, this is my first post here. I just joined recently and I am loving the videos as they've really helped me step into ASP.NET and VB. Just some background, I used to be a CS major several years ago and programmed in Java and C, though I only went through 2 years before I moved majors. I didn't like the focus of my universities program, and decided to pursue other options. Ironically, I am now delving back into programming, but with a focus on web development, hence learning VB and ASP.NET. Anyways I am developing my first web application and I needed some help.Basically, what the program does is allow users to login to this web site and then store private information, which they can then access at a later time from any computer that is connected to the web. I have already setup user membership by following the video (lesson 8 of the ASP.NET series - Securing your Web site with Membership and Login Controls) from the Learnvisualstudio.net series. I can login to my site just fine, as well as creating a new user etc. The next step is designing the SQL database, and setting up the page that retrieves a users data, allowing them to view the private information they've stored, as well as to edit, create, and delete information.Unfortunately, while I can see the broad method of doing this, I am a bit lost in actually implementing it. The first stumbling block I am coming across is the SQL database itself. I have attached an image of how I have the database designed so far. Note that the aspnet_user table is the one that ASP.NET creates automatically when you enable membership controls and such.So basically, a user logs in, and they are greeted with a list of all of the "stickies" they have created. Each sticky has a title, as well as up to 4 fields, and you can enter the name of the field, as well as enter the actual data. It's foreign key ties back to the UserId that ASP.NET already created. The user can also organize their stickies into categories, hence that table. The Settings table will be where a users settings will be saved, such as which view mode they prefer etc. At this stage of development, that table is un-important and un-developed.So on to some of my questions. As it is designed now, there will be one table with every users stickies, as well as categories, and when a user logs in, the program will look at the category and stickies tables, and grab the ones that are associated to the users UserId. So one of my first questions is; is this a good design? I ask this from a security standpoint as well as a speed and efficiency standpoint. I want this site to be able to support at least 50,000 to 100,000 users, each with any number of "stickies" and "categories" With that size of a user base, would each user be looking at massive load times because the program would have to go through a very large table to grab only the ones that are linked with the users UserId? Say I have 50,000 users, and each user has 5 "stickies", that means that my user_stickies table would have 250,000 rows of data, and the program would be trying to find only 5 of those. Is this a really inefficient way of doing this? Should each user have their own category and stickies table? If so, how would I go about doing this? And in that case, instead of having a couple giant tables, my SQL DB would instead have a ton of tables, is this even any better?I have other questions, but I guess I'll start with this. What are your guys' thoughts? I am a newbie, so this may be a silly set of questions. I try to read up and research as much myself as I can, but sometimes you have so much information thrown at you at once its hard to grab out the specific answers you need.
View 4 Replies
View Related
Dec 6, 2004
I’m trying to design a database that allows the users to give each individual client/company unlimited addresses and salutations. I can build the design that accommodates this, but I cannot figure out how to handle them knowing which salutation to use with a mailing they might do to the clients.
I have put the Company Name and Position (title) in the address table so that when doing a mailing the company name and title are associated with the company address being mailed too. But again, I’m not sure how they would choose a salutation if they have many choices.
Looking for any of your thoughts or suggestions.
Thank you,
View 1 Replies
View Related
Jan 19, 2004
Hi,
I designed the database and there are two points I'm not sure that my design was correct:
1) In my search engine (in interface) i have an expression builder and user can save the expression he created. In this case don't chreate view in database, but I have a table named "Expressions" which saves expression name and expression. The reason I made it was: If I create view it doesn't make db to work faster because the select query in view runs every time when view was opened, but it makes my code more generic . But isn't it a design error?
2) I save 3 reserved fields in each table, and I don't know if I'll use them some day. The reason: adding a column to database is heavy operation. But isn't it a design error?
Thank you for advice
View 4 Replies
View Related
Apr 24, 2007
I have a few questions here about designing a database:
1. What is normalisation and de-norminalisation?
2. A quote:
normalisation has a series of steps (or rules) called forms the more steps you take, the more normalised your tables are......If you use the first 3 steps you would say that the tables are in their Third normal form
What is all that about - whats forms got to do with tables or what is he trying to say in the above quote?
3. When would you decide to create a new table in a database - i.e. what rules does everyone follow to say "ok i better capture this data in a new table and create a relationship to another table"
Thanks in advance
View 6 Replies
View Related
Oct 2, 2007
Hello,
I'm new to databases but not to programming in general. I've got a few applications which currently sit on a single PC and read/update a particular XML file on the box. The applications are C# apps and use FileSystemWatchers and a mutex to keep watch for changes and update the XML file as needed. It has worked reasonable well for me.
Now, I need to run these applications on separate machines, so it seemed a good point to consider moving toward a database solution.
I'm hoping that there is a straightforward solution using SQL Server that will ensure that my applications alway have the current view of the world. I had run into instances with my existing setup where once in a while an application thought its DataSet was up to date, but wasn't.
Can someone point me in the right direction to implement the solution? I suspect that this is a really common need for lots of programs that are distributed. I'm still quite a newbie with databases and SQL Server, so I'm not even sure I'm using the right terms to describe things.
Thanks,
Matt
View 1 Replies
View Related
Jan 31, 2006
Our company is looking to move to a more robust database platform/setup, and it looks like sql 2005 + database mirroring is what we are looking for. First I have some questions about it.
Can a server that is functioning as a mirror for one database be the primary server for a seperate database? Basically think of a triangle of three sql servers, each serving as a primary server for a specific database, and using the next server in the triangle as a mirror for that specific database. To be more specific:
Server 1, Primary Database A, Mirroring Database C
Server 2, Primary Database B, Mirroring Database A
Server 3, Primary Database C, Mirroring Database B
If that is possible, how many witness servers would be needed to accomplish the above topology? On that note, how robust hardware wise should the witness server be?
On a completely seperate note, what method is recommended for interconnecting these servers? Is gigabit ethernet fast enough, or does it require something like fibre channel or infiniband?
Thank You!
View 1 Replies
View Related
Jan 12, 2008
Hi Guys,
The ReorderList control has driven me to desperate ends tonight. I found that it will only work if my database has a field (OrderID in this case) of type int that it can use to keep track of the order. The problem is that I'm not using the ReorderList control for inserting into the database. This requires me to keep track of the OrderID myself and I have found that simply setting the OrderID field as the "Identity" will cause it not to work.
Common sense tells me that using the Identity is the best way to keep track of a ReorderList because it automatically numbers things as ther're inserted. If something is deleted, it shouldn't matter because it will still be in order even to there's a gap in the numbering.
The only solution I can think of is trying having TWO identity fields in the database, but since that's not possible, a field that mirrors the Identity. Can anyone advise me on how to do that? The below datasource does not insert anything into the OrderID field:
<asp:SqlDataSource ID="sdsItems" runat="server" ConnectionString='<%$ ConnectionStrings:testConnectionString %>'
SelectCommand="SELECT * FROM [Items]"
InsertCommand="INSERT INTO [Items] ([Name]) VALUES (@Name) SET @OrderID = SCOPE_IDENTITY()"
UpdateCommand="UPDATE [Items] SET [Name] = @Name, [OrderID] = @OrderID WHERE [ItemID] = @original_ItemID"
OldValuesParameterFormatString="original_{0}" DeleteCommand="DELETE FROM [Items] WHERE [ItemID] = @original_ItemID">
<InsertParameters>
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Direction="Output" Name="OrderID" Type="Int32" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="OrderID" Type="Int32" />
<asp:Parameter Name="original_ItemID" Type="Int32" />
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Name="original_ItemID" Type="Int32" />
</DeleteParameters>
</asp:SqlDataSource>
View 1 Replies
View Related
Aug 8, 2006
I have a db in SQL server 2000 developer edition. I am using Visual Studio 2005 standard, and also VWD Express. I would like to just access the database that is in SQL server 2000 so I can get on with developing the site, but VS2005 refuses to recognize the instance. It recognizes 2005 instances right away.The services are all running, the network protocols are enabled, uid's/pw all of that is correct. I am getting the "named pipes" error (the named pipes protocol is enabled).Any suggestions? I'd really rather just work with the db as-is in SQL 2000. But I can't get it to connect. I can connect to it if I export it to SQL 2005, (on the same development machine) but can't get the stored procs over to the 2005 db. So my web app is not finding the stored procs and won't run.Do I need to uninstall SQL 2005 from this box if I want to use SQL 2000?Thanks,--Donnie
View 13 Replies
View Related
Aug 22, 2005
I have an ODBC 3.0 Application on Windows NT Server maintaining aconnection to a SQL Server 2000 database on the same machine. When anerror occurs, I'd like to be able to determine whether the error isserious enough that the database connection has been lost, so I canhave the application try to reconnect automatically. My understandingis that any error of severity 20 or above includes a broken connection,but I'm having difficulty retrieving the error severity through ODBC.So my first question is, how do I retrieve the error severity throughODBC?Also, as a test, I stopped the database while my application is stillrunning, and the first error I received had a native error code of 55.There is no 55 error in the sysmessages table, so I'm confused as towhat the severity of the error is. Can anyone shed some light on why Iwould be receiving an error code that is not in the sysmessages table,and where I might be able to find more information about the error?Thanks in advance,Abram
View 2 Replies
View Related
Aug 28, 2007
All,
We have SQL 2005 db mirror configured with a witness server for high availability. Node 1 is the principal and Node 2 is the mirror. A nightly job creates a snapshot on Node 2. The snapshot is used for previous day reporting queries. We have now been asked to present another copy of the database for near-time reporting. I thought about possibly adding a peer-to-peer replication as part of my environment but was hoping to see what everyone else out there is doing.
Regards,
Ian
View 1 Replies
View Related
Nov 23, 2006
I have a SQL Server 2005 database (called BDHSE) in a PC which i call PC1. I have a second PC (PC2) and both are within a network (a WLAN).
What i want is to have access to BDHSE from an application in VB6 (APP1) running in PC2. All the INSERT, DELETE, UPDATE records process is done through APP1.
APP1 ia currently running in PC1 and is to be installed on PC2.
I have these questions:
1. What do i need to install in PC2 since all the INSERT, DELETE, and UPDATE is done using APP1? I guess i only have to install the Microsoft SQL Native Client (with all the prerequisites of course) but i am not sure.
2. In the APP1 made in VB6, do i have to change the connectionstring since i am accesing the database which physically is at PC1 and the APP1 will be used in PC2?
3. Any advice you can give me on doing this will be well received.
Thanks in advance,
BSc Fernando Martinez
View 4 Replies
View Related
May 9, 2012
I'm taking a database(read-only) backup from one server and restoring it on other server. As soon as restore is done it is bringing database into single-user read-only mode.
why it is bringing the database into single user mode ?
View 1 Replies
View Related
Nov 15, 2006
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 2 Replies
View Related
May 7, 1999
Anybody figure a way around this:
In a development server you take a backup and you want to move the entire database to a production server. The production server does not contain the database, users, or logins in master.
When you restore the backup to production in 7.0, the users get moved to DBO because the logins do not exist and then you cannot delete them.
We are having to drop the users from the database on development, back up the database and restore it to production, then recreate the users on production.
This is bogus and did not happen in 6.5 because of the aliases.
Anybody come up with a better way?
View 1 Replies
View Related
Jul 3, 2007
I am fairly new to VS 2005 and SQL Server CE. I have developed a Desktop Windows application using VB 2005 and the SQL Compact Edition Database. This application will sell to users via web download.
When they download a service patch, or updated version, I wish for them to retain the data in their present database. In other words, fill the new database with the old data. The new table structures will remain intact except for added columns at the end.
Question is how to save the old data and update the new database with it. Is there an easy way to do this, or do I need to write a module to save a database copy, and update the new database with content at install time?
View 6 Replies
View Related
Apr 9, 2008
I have a problem when i restore my .DAT_BAK file. I am getting error like "The backup set holds a backup of a database other than existing database. Restore Database is terminating abnormally".
I tried by using
RESTORE DATABASE <DATABASENAME>
FROM DISK = 'D:DATAMYTEST.DAT_BAK'
WITH MOVE 'VZAI_DATA' TO D:PROGRAM FILES..MSSQLTEST.MDF',
MOVE 'VZAI_LOG' TO D:PROGRAM FILES..MSSQLTEST.LDF',
REPLACE
And also i tried like
RESTORE DATABASE <DATABASENAME>
FROM DISK = 'D:DATAMYTEST.DAT_BAK'
WITH REPLACE
When i use like this,
RESTORE FILELISTONLY FROM DISK = 'D:DATAMYTEST.DAT_BAK'. I am able to get the output as LogicalName, PhysicalName, Type, FileGroupName, Size, etc.
Can i anyone please help me out?
Thanks in Advance,
Anand Rajagopal
View 8 Replies
View Related
Jul 29, 2014
Sometime during the night last night some user account permissions were "lost". Am I right to think that restoring the master database would be the way to go? We have a 2 node 2012 cluster and I stop the cluster resource and start the db in single user mode from the active node. Somehow the sharepoint farm is still trying to connect so I can't get logged in single user. What method could I use to stop users from connecting when I don't have access to the sharepoint farm.
View 8 Replies
View Related
Apr 26, 2007
i have a development database that has updates and changes to a production database. rather than go through individually and alter all relevant tables and stored procedures, id like to back up the database on the development side and restore it on the production side as the production database. is there a way to restore the database on the production server but preserve all the security settings (ie logins and such)? i noticed on our development server, that if i try to restore the database with my development database, it overwrites the users and/or if the user is the same on both, it removes the login name for that user.
View 3 Replies
View Related
Aug 10, 2007
Hi,
I was wondering how I could restore a bkp file into a database with a different name. For example, I made a backup of T1.mdf and i want to restore t1.bkp to T2.mdf.
I am using VB.Net to do the backup and restore.
Is there any way of doing it?
Thanks!
View 21 Replies
View Related
Aug 19, 2015
I have a client that has POS software called Restaurant Pro Express (RPE) from [URL] ...
Their old POS computer had a hardware failure, but I was able to attach the hard-drive to another computer and recover the data. RPE uses a MSSQL database system. However, my client doesn't seem to make backups very often
- the last one is dated January 5, 2015. I was able to copy the C:Program FilesMicrosoft SQL Server folder over which contained the instance as well as all the data files - and has up-to-date information. The instance in the recovered Microsoft SQL Server folder was called MSSQL.1. I installed the RPE software on their new computer, and it too now has an instance called MSSQL10_50.PCAMERICA. The new computer is using MSSQL 2008 R2, while I believe the old computer would have been using MSSQL 2005.
I am no DBA expert, especially when it comes to MSSQL. Is is possible to 'restore' the database from the 'raw' .mdf and .ldf files of the old computer to the new computer / database instance? If so, how should I proceed?
View 3 Replies
View Related
Jun 6, 2000
I had a major disk failure, and the only SQL Server files I was able to recover were master.dat, msdb.dat,msdblog.dat, two text files and two database devices. My question, is it possible in SQL 6.5 to restore a database from just the database device, and if so, how? Thank you.
MH
View 1 Replies
View Related
Sep 11, 2002
Hi,
I need to restore a database to different server.
Orignal .mdf is 16 G, Now on the new serever I have 16 G adn 12 G of drive space available.
Is there a way i can split the data of 1 mdf over to 2 or 3 data files on the new server ?
Thanks in advance.
:confused:
View 3 Replies
View Related
May 7, 2008
hi
how can restore database when user use this database.?
to posibility any error and how can solution
View 5 Replies
View Related
Jul 23, 2005
I'm a newbie so please be gentle.In attempting to run a restore I get the following error message:"Exclusive access could not be obtained because the database is inuse." However, it doesn't appear that there are any connections to thedatabase. At the suggestion of another thread, I ran sp_who2 and thereare no connections to the database in question. I've been running thesame restore for months and all has been well, until yesterday....I wrote an .asp page (below) to test connectivity to this database.The vb code ran successfully and soon thereafter, my nightly restorefailed. Task manager does no show that the asp page is active.Lastly, I did add a user ("jbtest") as well as change the option to useeither Windows authentication or SQL Server authentication inEnterprise Manager.Any ideas would be greatly appreciated.Thanks.<%@ Language=VBScript %><%companyName = "agemni"Set cnn = Server.CreateObject("ADODB.Connection")cnn.ConnectionString = "DRIVER=SQLServer;SERVER=SHEELA-NA-GIG;UID=jbtest;PWD=test1;APP=MicrosoftDevelopment Environment;WSID=SHEELA-NA-GIG;DATABASE=" & companyName &";Trusted_Connection=No"cnn.ConnectionTimeout = 300cnn.CommandTimeout = 300cnn.OpenSet RS = Server.CreateObject("ADODB.Recordset")strSQL = "SELECT * FROM Preferences"RS.Open strSQL, cnnResponse.Write "connection established with the <b>" & RS("CompanyName") & "</b> database. They are a <b>" & RS("street") & "</b>customer. "RS.CloseSet RS = Nothing%>
View 2 Replies
View Related
Jul 26, 2007
I have a backup of an SQL Server database named "UserData.bak" now i want Restore this backup to my SQL Server.pls tell me whole process.Can i also restore it to MS-Access, if possible pls do let me know. Thanks
View 5 Replies
View Related
Jan 12, 2008
I want to add a new table to a database on a server. I assume the best way to do this is to backup db on sever, restore to local computer, add table, backup local, and restore to server. (If there is a better way, I am open).
I can backup the database on the server and get the backup to my local computer. However, when I use SQL Server Management Studio Express to restore the .bak file to my computer, I get the following error:
TITLE: Microsoft SQL Server Management Studio Express------------------------------
Restore failed for Server '\.pipe282F14E7-8852-4B sqlquery'. (Microsoft.SqlServer.Express.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476
------------------------------ADDITIONAL INFORMATION:
System.Data.SqlClient.SqlError: RESTORE cannot process database 'C:USERSDEBORAHDOCUMENTSMY WEB SITESMHRRCSK3BETA1APP_DATAMHRRCDB.MDF' because it is in use by this session. It is recommended that the master database be used when performing this operation. (Microsoft.SqlServer.Express.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&LinkId=20476
------------------------------BUTTONS:
OK------------------------------
So, I am not sure what to do next ... I have followed the links above to see there is no information. Any ideas? Thanks for helping this newbie.
View 9 Replies
View Related
May 29, 2008
The data in one of the tables in my datables got deleted.
I want to restore my database to an earlier time, but don't know how.
I'm not sure if I have any backups, I wasn't making any myself.
All I have is the ldf file, but I don't know how to open it or what it contains.
View 1 Replies
View Related