Restoring To A New DB - The Basics

Sep 13, 2006

Hiya,

I've recently gotten into the administration side of SQL and am muddling my way through it as best I can. We have a DB server with three or four databases on it. Maintenance routines do a full backup of each one nightly and weekly and put all sets into one backup (.bak) file.

I've never had to restore them, but I thought I'd put myself through a test run since this is unexplored territory for me and I would prefer not to have to learn in an emergency.

A scenario I can foresee is where I'd have to restore just one table, perhaps to a new location (i.e. not overwrite the live db, just bring up a copy of part of it elsewhere so I can do a data dump from some old data). But when I go to 'restore database' or 'restore file/filegroups' and select the file, it seems to really want to restore the full backup directly over top of the existing database. If I try to restore it to a new, non-existent database, I get an error about how 'logical file master is not a part of database 'new-backup'), and if I try to restore it to a new db that I've created, I get an error about how the databases don't match.

It seems to me that my problem is a philosophical one - perhaps I don't understand the nature of backups, but I feel like what I'm trying to do is pretty simple. I want to take the full backup of database A and restore it, in part (or in full if I have to) to new database B. What do I need to do to accomplish this?

Thanks for indulging me - this must be brain-dead stuff for most of you!

View 8 Replies


ADVERTISEMENT

Basics Of SQL

Oct 24, 2005

Hi, I am used to using Access but I need to learn SQL for larger web sites. I normally build the database in Access visually, but how do you do this with SQL? I just installed SQL developer and I can't find the area that builds the database.

View 3 Replies View Related

Basics

Jun 11, 2007

Hi, I m new to sql server...
I want to know the difference b/w unicode class and character class.. Pls help... That is difference b/w varchar and nvarchar

anup

View 2 Replies View Related

SQL DB Basics...maybe

Jun 28, 2007

I've a number of SQL DBs that are managed by a php browser front end. These were developed in php/html to a SQL 2000 DB.



The DB and tables have been recreated in SQL 2005, permissions are that of the owner (SA) and the php code has been adjusted accordingly. Although the reading of the data is okay, I cannot update nor insert data from the php script through to the SQL 2005 DB whereas it works perfectly fine through the same php script and SQL 2000.



Obviously, there's something I'm not seeing??? There are no noticable messages and the last transaction does show up in the php display.... closing the portal then reopening, the record is "gone" and the SQL 2005 DB remains untouched.

View 5 Replies View Related

Basics

Jan 21, 2007

Hi there,

I've recently bought Visual Studio 2005, and I got SQL server 2005. I have no idea how to work it. I can't even find where you make a table.

Any basic help about SQL server 2005 is needed.

Thanks,
AliQ

View 3 Replies View Related

SQL Server Basics

Jan 9, 2007

Hi,
I am a DB2 DBA and plan to learn SQL Server for professional reasons. But I am not able to find the material to begin with. So I would be greatful if you guys can send me links to start with the architecture and other basics of SQL server. I just want to accquire additional skills so that it can help me in the future.

View 1 Replies View Related

Sybase Basics

May 19, 2008

Hi Gurus,

I am not sure is this the right forum to get solution to my question.

From where i can get sysbase basics.
I am posting this query in this forum coz this forum and gurus in this forum had helped me in lot critical situtions.

Hope this happens now also..

Thanks,
ServerTeam

View 2 Replies View Related

Clustering Basics

Mar 20, 2008

hi all,

can you help me with some informations...

in a case of clustering, is instance of sqlserver installed on each of the nodes, or there is only one instance shat is "shared" between node servers?

or it depends on the type if clustering?

tnx in adv!

View 2 Replies View Related

Distribution Agent Basics?

Nov 6, 2006

Hey everyone,
 sorry for the lame questions, but:
1) I have a transactional replication service set up. However, whenever we select a new table or column within a table to replication to the subscribers, the changes never seem to get picked up unless we make an actual change within some of the other data. Any idea why this is? Even after I've reinitialized snapshots, the new changes don't want to proprogate to teh subscribers until data is actually changed.
2) where do I need to go to manually stop and restart a a distribution agent to force these changes to be proprogated without having to change any data within the tables?
Thanks
 

View 1 Replies View Related

Basics With Stored Procedures.....please

Jan 2, 2004

Hi there, I'm still fairly new to asp.net / c#

I've setup my stored procedure, but now what?
I want to display the information (only one record it will return) on the page / NOT using a datagrid or list, just simple.....I guess using an asp:label?????
Could someone tell me what I need to do!!!

Also, are there any proper resources out there that just show you right out of the box howto insert / update / delete with sp's?, show / view, just proper simple source code?

THANKS!

my code:
// Creating the database connection
SqlConnection objConn = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn_main"]);

// Creating the stored procedure 4 the webpage
// Instantiate a Sql Command
SqlCommand webpage_view = new SqlCommand("stpr_webpage_view", objConn);
// Declare that the T-SQL statement that will be executed is a stored procedure
// Use a CommandType.Text to execute a T-SQL Query
webpage_view.CommandType = CommandType.StoredProcedure;
SqlParameter webpage_id_parm = webpage_view.Parameters.Add("@webpage_id", SqlDbType.Int);
webpage_id_parm.Value = "1";
// Create a SqlDataAdapter to manage the connection and retrieve the data
SqlDataAdapter da_1 = new SqlDataAdapter();
// Instantiate a Dataset that will hold the data retrieved from the database using the select command
DataSet ds_webpage = new DataSet();
da_1.SelectCommand = webpage_view;
// Retrieve the data into the dataset using the SqlDataAdapter.Fill command
da_1.Fill( ds_webpage, "webpage_title" );
DataView dv2 = ds_webpage.Tables[0].DefaultView;
if ( !this.IsPostBack ) {
this.DataBind ( );
}

View 1 Replies View Related

2005 Database Basics

Apr 24, 2007

Hi,

Im trying to justify to people in a meeting why we have to break down some large financial instrument tables in a new database design we are implementing.

They have currently broken the tables down into instruments1 & instruments2, containing approx 300 & 150 columns respectively (further columns will be added!). then they have a view that joins virtually all of these columns. I've asked for the tables to be broken down into more logical groups. they are saying that this will cost more overhead as their views will span more tables. i also complained about the width of the rows, but they claimed that sql 2005
will not have a problem as only 1/3 of the row will have any data at one point so will not cause an overhead. can someone give me some definate points on this relating to 2005 as I am fairly new to it.

can someone help me with the basic points why they should be split into more logical groups.

they are also intending on adding millions of records a year to this table and partioning it will different filegroups. Should you place the indexes for tables on different filegroups as well?

View 1 Replies View Related

SSIS Basics Working With The IDE

Apr 1, 2008

Is the intent of Microsoft to enforce a vertical presentation of the SSIS Control Flow, Data Flow etc? I like to work down and to the right and I am having problems with the connectors (precedent) or in DTS 2000 world Success or On Success implied. Is there away to connect from the lower center anchor point to the side of the next object in the flow? For some reason, I can't get a similiar look to DTS 2000 environment (going from the bottom middle of the object to the side anchor pint (small box) symbol to the left. It wants to anchor on the bottom right, left, or middle, if going horizontally. I must be missing something, here??

Thanks again!

Skyseek


View 2 Replies View Related

Failure Audit - The Basics

Aug 19, 2006

Hi,

I'm a bit new to administering a SQL Server and this seems like a pretty basic question, but I'm not sure how to phrase it for the searches. So I apologize for seeking an indulgence...

I have SQL Server 2005 Standard edition running on a server exposed to the Internet. A handful of clients have to connect to it via TCP/IP using SQL Server Studio and ODBC links. But my windows logs are chok-full of failure audits of what I presume to be your garden variety crackers trying default passwords -- several times a minute.

What's the best solution to this, and how would I go about implementing it? Restrict TCP/IP access to certain IP ranges? Is there a 'max login attempts' somewhere? The server uses SQL authentication (not windows) if that makes a difference.

Thanks for the help!

View 1 Replies View Related

Transactions - Back To Basics

Oct 30, 2006

Hi all,

I am having no end of trouble with transactions in the package which i am building. I now just want to go back to basics and see if someone can tell me where i should set specific transaction options.

Firstly, my package runs a for each loop which loops through a directory of directories. In each of the sub directories there are 2 files. The first steps in the loop are to check if a folder has been processed previously, if so then it moves it to a specified directory. The reason that this is done first is that i cannot move the directory whilst it is being read in the foreach loop, so i pass the path to the next iteration of the loop. There is another file system move directory task outwith the foreach loop to deal with the last directory.

Once this has been done, i parse the file name of the xls file within the directory to get a serial number which is assigned to a variable.

The next step is where i envisage that the transactions should be implemented:
I have a sequence container which contains 2 data flow tasks to be run in parallel. each of these reads data from a seperate work sheet in the xls file. and writes it to a database table. Each dataflow task consists of an excel source task, derived column task, look up task (used to derive an ID from the serial number stored in the variable), and an oledb destination.

Upon completion, if the sequence container fails i want to set the destination folder path to the qurantine location. If it succeeds i want to copy the csv file contained in the same directory to a seperate location and then set the out put folder to the archive location.

What i need to know is where do i set the transaction option if i want to roll back the data that has been inserted into the database if either data flow task fails?

Please somebody help, as this is not working at all.

Many thanks,

Grant

View 18 Replies View Related

Connection Pooling Basics.

Feb 15, 2008



We have an large SQL database being accessed by a C# application. Each hit on the database opens a connection then closes it when done. We are currently experiencing errors when more than 20 users access the database at one time. One of the things I am wondering is if we are using connection pooling. From BOL I am lead to believe connection pooling is off by default. Can I turn on connection pooling as a default in SQL Server or do I pass 'pooling=true' as a parameter on each connection string?

Thanks.

View 5 Replies View Related

MS SQL Basics: Insert Into Multiple Tables At Once.

Aug 15, 2006

I'm trying to do something very basic here but I'm totally new to MS SQL Server Manager and MS SQL in general.
I'm using the Database Designer in MS SQL Server Manager. I created two tables with the following properties:
Schedule (ScheduleID as UniqueIdentifier PK, Time as dateTime)
Course (CourseID as UniqueIdentifier PK, Name as VarChar(50))
I create a relationship by dragging the PK from the first table over to the second and I link on ScheduleID to CourseID columns (I'm not certain what type of relationship is created here N:N?). It appears to work, I can do a Select * and join the two tables to get a joined query.
The problem starts when I try to populate the tables: a course will have a schedule. I can't seem to get the rows to populate across both tables. I try to select the pk from the first table and insert it into the second but it complians about it not being a uniqueidentifier. I know this is very basic but I can't seem to find this very basic tutorial anywhere.
I come from the Oracle world of doing DB's so if you have some examples that relate across that would be great or better yet if you can point me to a good reference for doing M$ DB stuff that would be great.
Thanks.

View 9 Replies View Related

SSIS Layout/Design Basics

Nov 29, 2007



I have 3 'separate' but related processes that I am developing in SSIS. Each process shares a few global variables and connection objects. None of the processes depend on inputs or outputs from the other processes. However, there is a sequence order in which they are exectuted.

Should I develop these three process in the same package or 3 separate packages in the same solution?

From the point of view of sharing the same variables and connection objects, maybe just one package? If so, would it be advise to use the toolkit's 'Sequence Container' to ensure the order in which the 3 processes are run? I noticed that 'global variables' are limited to the scope of individual packages so it would appear that a variable can't be shared between packages in the same solution? I was also thinking that in terms of configuration settings, there might be an advantage of keeping everything in the same package. The only disadvantage I can think of in relation to keeping everything in the same package is that the design layout might look a bit cluttered.

I'm tending to think one package here but would welcome comments and suggestions from those that have experience of similar design scenerios.

Thanks,
Clive

View 4 Replies View Related

VB2008 SQL Database Programming Basics Question

Feb 25, 2008

I am writing a program where I will be calculating some values that need to be sent to an SQL Database row by row. I am new to SQL Database programming and I was wondering what I need to include in my program as far as declarations, and data adapter connections in order to accomplish this. Or is it enough to already be connected to my database via a manual data connection? I also need to know some of the basic commands for inserting a new row, and adding data under existing columns, prior to moving on to the next row and repeating the process. If you can point me to a basic example that demonstrates this, including how to properly close out my database, I would appreciate it. If you know of a good VB2008 SQL Database book that covers all the basic & some advanced SQL Database programming, I would be interested in that as well.
For Example:
Row# Name CalcA CalcB CalcC CalcD
1 ? ? ? ? ?
2 ? ? ? ? ?
Etc€¦
Thanks.
Techno
Visual Studio Express 2008 user

View 5 Replies View Related

Restoring Database Leaves Me With (Restoring...) Message

Jan 9, 2007

I did a full backup of a db from one server(Express2005) and trying to restore it to a different instance of SQL2005 on the same development machine. (Also had some fulltext columns if that means anything)

Many failures but finally got it to report all was successful except the icon in Object Explorer shows (Restoring...) with no indication of any real activity going on. It's a tiny database with hardly any data in it.

Just not sure what the heck is going on there. It also won't let me into the database until this the (Restoring...) goes away.



Any advice on how to get this thing finished out?

View 3 Replies View Related

Restoring DB

Oct 18, 2000

Hi, I am restoring a database as a complete step. The database icon, under the Sql server Group in the Sql server enterprise manager, turned into gray and got a word (loading) infront of the database name, what does that means?

Ali

View 2 Replies View Related

Restoring A DB

Nov 1, 1999

I am just curious to know whether it's possible to restore a SQL 6.5 DB from a DB device file. For e.g. i have a device file abc.dat which contains a db. Now thru this device file can i restore the data on xyz database.

View 3 Replies View Related

Restoring

Jun 2, 2003

Hi All,

I'm trying to restore a database to a completely new database from an exsiting full backup.

On the backup device there are two full backups from different dates.

How can I specify which one of the two backups I want use for my restore (The only difference is the date ??

Thanks,

View 4 Replies View Related

Restoring A DB

Feb 27, 2002

I had SQL win2k running on a machine and had 2 dbs. unfortunately the hard drive failed (ntldr crashed). i was able to copy the contents of from the old drive (so i have the DB files) but no backups.

Is there any way to import this data into a new DB?

View 1 Replies View Related

Restoring

Aug 18, 2005

Can you restore a backup (bak) file to a different server? E.g. client gets server nicked, they have bak files, can I run a restore to my sql server?
I can see the with MOVE option, but I can't see how to attach (to the new server) if the database wasn't detached (from the nicked server).

View 1 Replies View Related

Restoring Db

Sep 24, 2007

i am getting the following error when i try and restore a datbase

The log in this backup set begins at LSN 110000000011300001, which is too late to apply to the database. An earlier log backup that includes LSN 102000000188100001 can be restored..

View 1 Replies View Related

Restoring

Feb 4, 2008

while iam restoring my back up i got this error message

Msg 3117, Level 16, State 1, Procedure res, Line 26
The log or differential backup cannot be restored because no files are ready to rollforward.
Msg 3013, Level 16, State 1, Procedure res, Line 26
RESTORE DATABASE is terminating abnormally.

View 13 Replies View Related

Restoring A DB

Jul 23, 2005

Hey all.Can anyone point me in the general direction of documentation whichwould tell me how to restore a DB via the command line instead of usingenterprise manager?ThanksMatt

View 2 Replies View Related

Restoring DB

Jul 20, 2005

Hi all,I have a very old MSSQL data backup file.I do not even remember that it was created in SQL7 or 2000.Anyway, I'm trying to recreate DB from this backup.Is it possible to create DB from backup file?I tried restore from that file and SQL server complaining."The file on device '***' is not valid Microsoft tape format backup set."Thanks-Jay

View 2 Replies View Related

Restoring From .MDF/.LDF

Jan 15, 2007

Hi there,

I've got a .mdf/.ldf database/log. I'm trying to bring it into SQL Server Management studio, but can't figure out how. I've gotten as far as "Attaching" it, but can't figure out where to go from there. Can anyone help me out. I know this is very basic.

Thanks.

View 5 Replies View Related

Restoring DB

Jun 1, 2006

Hi,

I have created a DB on my local machine.

Now I would like to copy this on to another machine.
I stopped the service and then copied both the MDF file and the
log files into the same folder as in Data folder of the second machine.

When I run theStudio express I cannot find the MDF file.It does not show up in the
the DB folder or window.
When I try to create one it says that the DB exists.

What am I missing?

I tried doing a backup and restore but then the DB is not created on the second machine and
hence wont work.

Tnx

View 4 Replies View Related

Restoring From .bak

May 11, 2007

i have sql server 2005 dev installed on a laptop. i have 2 .bak's from production sql server 2005 database. i went through the gui restore procedure and both backup files completed successfully. now both databases are in the (Restoring...) status and have been for quite some time. i have sp2 applied. when will these become available? each .bak was around 400 mb. it has been a few hours.

View 8 Replies View Related

Restoring Problem

Oct 24, 2007

When i try to restore my back up i got this error: Solution? 

View 2 Replies View Related

Restoring A Db From A .bak File?

Apr 10, 2006

Hi,I'm new to sql but have a website running it on a hosted site.  I want to have a local copy of the site running here for testing.  I have everything set on my local machine to run it including MSDE and Enterprise Mgr.I've created a blank db with the same name,username and password on my local machine.  From my host I received a dbname.bak file which they said I should just restore to my local machine.  This sounded simple but I have no idea how to do this.  When I right click on the db file within Ent.Mgr I see the Restore option but I can figure out how to designate the dbname.bak file as the source.  I also see an option to import but that isn't any better.Does anyone have some simple directions which will show me the proper steps and where I should be to do this?  I'd really appreciate it.  I assume it's simple but not having ever done it it has me stumped.Thanks!

View 11 Replies View Related







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