RESTORE DB Into Different Size Files

Aug 11, 1999

I have a 24gig DB that has 1 data file.
Is it possible to RESTORE the backup to a DB that has 2 files
(1 = 10gig 2 = 14gig).
Does one of the files on the the DB have to be at least 24gig to RESTORE?

View 1 Replies


ADVERTISEMENT

Data Files Size And Log Files Size

Sep 22, 2004

Hi!
I'm using SQL Server 2000!
How to know then Data files size and Log files size by Store Procedures or Sql query?
Thanks!

View 1 Replies View Related

Restore To A Smaller Size

Aug 28, 2000

I have a database in 2 GB .mdf and a 1 GB ldf. The backup is much
smaller. I need to copy this database to another server which does
not have that much free space. Can this be restored to a smaller
.mdf and .ldf? How?

Thanks.

Ranjit

View 1 Replies View Related

SQL Restore To Different Size Device

Feb 10, 1999

Hi,
What I need to do is restore a full backup of one database to a database where disk space is limited.

so my source device is 2gb for data and 1gb for tranlog
my dest is 1.5gb for data and .5gb for tranlog

I am thinking this is not possible, but thought I would post here anyway!
Thanks in advance!

View 2 Replies View Related

LDF Files Size Gone To 200 GB

Jul 5, 2013

My database .mdf file size is around 6 GB however .ldf file size is 200 GB.

Though I don't know exactly what .ldf file is, I believe maybe that is the reason why some of the stored procedures taking long time to run which were running good before.

Can I delete the .ldf file? If not, can I do something to reduce the file size?

The database (tables) are also replicated to another sql server in another computer.

View 7 Replies View Related

How To Get The Images Files Size?

Jul 21, 2004

Hi,
I want to retrive the images from SQL database and store into microsoft access database.
But only images file which is <than 500mb is allowed to retireve.How can i get the images files size if i just store the image file name into my sql database.(there is another folder to store images)

p@ywen.

View 3 Replies View Related

Size Of Backup Files

Jun 25, 1999

I need to know how big SQL Server 7 backup files are in comparison to the database size. For example if I have a database that is 300 Mb and I do a complete backup to disk with SQL Server 7 will the backup file be about 300 Mb?

Thanks,

Mike

View 2 Replies View Related

Different Size Of Data Files~~

Aug 14, 2006

hi
just wondering if any expert out there can answer my question.

i got a database separate into 3 datafiles in 3 different drives.
i will name it A, B, C.
A datafile size 30G, B datafile size 15G, C datafile size 15G.
and the drive for datafile A is about full. so is there anyway i can more some of data from A datafile to other data file? or since A+B+C =60G can i make it all 20G for each one of them by any command? thanks!!! :)

View 4 Replies View Related

Initial Size For DB Files

Dec 26, 2006

Hi All,

I need to create a brand new db in prod and I was wondering if anybody has any recomendations for initial .mdf, .ndf, and .ldf file sizes.

Thanks.

View 2 Replies View Related

MDF And LDF Files Size Command

Jul 23, 2005

Hi All,I want to shrink a transaction log using :USE MasterBACKUP Log test WITH truncate_onlyUSE testDBCC shrinkfile(test_log, 0)These commands will be executed from a workstation.After shrinking, I want to see the size of thetransaction log and database files. But, I do notknow what command should I use.Could anyone help me ?Thanks in advanceJohn S.*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!

View 1 Replies View Related

Deployed Files Reduced Size

Apr 20, 2006

I am wondering why deployed packages are so much smaller than built packages. What is removed and why isn't it removed when the packages are built?

I have a package that goes from 3Mb to 1.5Mb

View 5 Replies View Related

Restore Db From Several .bak Files

Mar 21, 2007

Hi,

I backup db into several .bak files to reduce backup time. but how can I restore them back? Do I have to do it by scripts? Can I restore it by using management studio?

cheers

View 4 Replies View Related

Restore A DB From .mdb And .ldb Files.

Jan 21, 2008

I have troubles with my computer, in the pc I have some databases but the only thing that they can recover were the .mdb and .ldb files.
How can I restore a database from these files?

View 7 Replies View Related

Restore From Log Files

Mar 11, 2008

i accidentally restored a db to a backup from last year and i don't have a recent backup - is there anyway to restore from log files?

View 2 Replies View Related

T-SQL (SS2K8) :: Getting Files Size For Each Database File?

Oct 28, 2014

I would like to add to it the actual file size in mb or gb of each file to the results.

select sd.name,mf.name as logical_name,mf.physical_name,
case
when dm.mirroring_state is null then 'No'
else 'Yes'
end as Mirrored
from sys.sysdatabases sd JOIN
sys.master_files mf on sd.dbid = mf.database_id
join sys.database_mirroring dm on sd.dbid = dm.database_id

The sp_spaceused procedure does a nice job on it's own giving me what I want (only one db though), plus a bonus allocated space column. How can I combine this sp with my other query, or is there a better way to ad this information?

View 2 Replies View Related

Balancing Size Of Data Files In Filegroup

Apr 26, 2008

Due to SQL's proportional fill algorithm I'd like to have the amount of data in my data files as close to equal as possible.

File sizes before:
dat 482,895 MB 0% free
2dat 436,927 MB 3% free

I made the max size of each file 600,000 MB and added a third file 3dat also 600,000 MB. I rebuilt all the clustered indexes (and nonclustered for good measure) and unfortunately the re-balancing wasn't quite right.

File sizes after:
dat 464,761 MB 77% free
2dat 443,234 MB 73% free
3dat 309,568 MB 51% free

I only have a handful of heap tables that take up <100MB total so they're not the issue. I did do an ONLINE index rebuild. I'm not sure if an offline rebuild would have been better. I will not be able to try and offline for a few weeks though as it's time consuming and I have other tasks I need to run on this test server now.

I did a FULLSCAN rebuild on any column statistics not updated by the index rebuild but that didn't help either.

View 3 Replies View Related

Transact SQL :: How To Calculate Size Of Files That Have UNC Paths For

Mar 27, 2014

I am on SQL Server 2008 R2. I have a table that contains a field called [Location]. In that field is a UNC path to the physical file on the repository. Is there a way in SQL Server that I can say give me the select sum([Location] UNC file) where criteria? I saw some posts about xp_filesize or xp_GetFileDetails, but I do not see them in master. I am unable to add anything and wondering if there is any native functionality that would allow me to accomplish this!?

View 4 Replies View Related

Restore Files And Filegroups

Sep 26, 2000

hi

To restore files and filegroups in a different server. First, Do i have to create the database with same name as the old one? or it doesn't matter... Can we use Enterprise Manager to do this restore?

Thanks in advance

View 1 Replies View Related

Script .bak Restore W/ .trn Files

Feb 17, 2006

I'm the DBA in an environment with approximately 240 identical (structurally) MSSQL 2000 databases in an environment. Each one of these databases are different business units around the country. For each of these DBs, I have my backup schedule set up to do a full backup every friday night, along w/ doing a transactional every 4 hours in between. Every once in a while (about once every 3 weeks), I get the call to do a restore to pull some piece of data that some end user accidentally deleted or broke. Now most of the time it isn't a big deal, because I can use enterprise mgr to restore to a new DB from the live backup set of the database in question.But, several of the databases seem to have an issue where (for some reason) my predecessor renamed the logical file names of the data and log files to various goofy things. It doesn't affect their operation, but when I try to do a 'restore from database,' it gives me a bunch of big fat errors. This is also the case when the backup I want to restore something that has been written to tape and has been rolled out of the backup history.SO... basically for these databases, now I go into Enterprise mgr and first restore the base .bak file to a new database, leaving it marked 'read only' and 'able to restore additional transactions.' I then have to do the same thing with restoring each additional TRN file, all the while making sure I don't forget to set the 'able to restore additional transactions.' Whenever I forget to set that I have to start all over. And honestly, it happens more often than not when I have to restore 5 days out from the .bak file, which means that I have restore 30 trn files on top of the .bak. Not hard, but incredibly tedious.So here's my idea. I know I can script restores thru QA. I've been looking quite a bit at this MS doc (http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlbackuprest.mspx#E2AA) and have come up with some good ideas. What I want to eventually do is create a script that you can just paste the .bak file and the list of .trn files. The script basically creates a temp table w/ those file names and cursors thru the restore process. The cursor part is easy for me, I'm just not sure about scripting the trn restore. The MS doc is a bit vague and really only shows the Enterprise Mgr method.Here's what I've been playing w/ so far for restoring the base .bak file:restore database restore_dbname --NAME OF NEW DBfrom disk = 's:mssqlackupuserdbnamedbname_db_20060120184 1.bak' --PATH TO BAK FILEwithmove 'pm65mr1_default_data_OldDBName_Data' --LOGICAL FILE NAME OF ORIGINAL MDFto 'I:MSSQL$MSSQLSERVER2Data
estore_dbname.mdf' --PATH TO NEW MDFmove 'pm65mr1_default_data_OldDBName_Log' to --LOGICAL FILE NAME OF ORIGINAL LDF'U:MSSQL$MSSQLSERVER2Log
estore_dbname.ldf' --PATH TO NEW LDFpartial, recoveryI think I'm pretty close with this, but I'm not really sure how I can stack the trn restores on top of that. Any ideas? I've been putzing around the web and so far haven't been able to come up w/ anything really useful.

View 2 Replies View Related

How Can I Restore A Database To Different Files And ...............

Jun 7, 2007

Hi,



I have a database that over time has become spread over different files, file groups all of various sizes.



I want to restore this database to a different set of files/filegroups and evenly spread.



It appears that I can only resotore a database to number/of and size of files from which it was backed up..



I want to redistribute a 40GB file, using EMPTY is taking for ever and then eventually fails.



What can I do?



Thanks for your help

View 1 Replies View Related

MSDB Restore With .ldf And .mdf Files Only

Jan 28, 2008

I had a development server that had all the raid drives fail at once.
This included most of the data/log files and all of the backups.

I need to get DTS packages from the MSDB database, I have the ldf/mdf's for that database, is there a way to restore it?

Thanks
Susan

View 6 Replies View Related

Disaster Recovery: Calculate DB Size Based On .dmp Files

Feb 7, 2000

I have a client with no backup of MASTERdb or Help_rev_devices, all I have is a couple of .dmp's of the production data. In order to run DISK REINIT I need to know the size of the database, is there any way of finding out the size of the database device, if all you have to go with is a backup dump file?

I know it won't be pretty.

`Ken

View 1 Replies View Related

How To Attach Or Restore Db From .mdf And Ldf Files After Db Deleted

Aug 19, 2002

First, let me say that I have already reviewed information posted by experts within the chat area.

Someone completely deleted my SQL Server 7 database. I retrieved the .LDF and .MDF files from a network backup. Now I am trying to attach the database. I have tried this without creating an instance of the database by using the attach stored procedure to attache the .LDF and .MDF files I retrieved from the network backup. Also, I have tried it by creating an instance of the database and doing a detach of the newly created db .LDF and .MDF files and an attach of the .LDF and .MDF files I retrieved from the network backup. Neither of these approaches have worked.


Here is what I have tried in the Query Analyzer, but to no avail:


For the following example, I created a database instance called 'qarun_diamond_48_brett' with brand new .ldf and .mdf files and then tried to detach and then attach the .ldf and .mdf files from the network backup:

use master
go
sp_detach_db
'qarun_diamond_48_brett', 'F:APPSSQL 7.0DatabaseDataqarun_diamond_48_brett_log.ldf'

Message: Usage: sp_detachdb <dbname>, [TRUE|FALSE]


use master
go
sp_detach_db
'qarun_diamond_48_brett', 'F:APPSSQL 7.0DatabaseDataqarun_diamond_48_brett.mdf'

Message: Usage: sp_detachdb <dbname>, [TRUE|FALSE]


I tried the following attaches of the retrieved/recoverd .ldf and .mdf from the network to the newly created db instance. That didn't work, so I tried attaching to a db that had not yet been created.

use master
go
sp_attach_db
'qarun_diamond_48_brett2', 'F:APPSSQL 7.0DatabaseDataqarun_diamond_48_brett2_log.ldf'

Message: Server: Msg 1801, Level 16, State 3, Line 1
Database 'qarun_diamond_48_brett' already exists.

If I use a different db name I get the following error:
Server: Msg 5105, Level 16, State 13, Line 1
Device activation error. The physical file name 'qarun_diamond_48_brett' may be incorrect.


use master
go
sp_attach_db
'qarun_diamond_48_brett2', 'F:APPSSQL 7.0DatabaseDataqarun_diamond_48_brett2.mdf'

Message: Server: Msg 1801, Level 16, State 3, Line 1
Database 'qarun_diamond_48_brett' already exists.

I have also tried these statements wtih the EXEC sp_attach_db and EXEC sp_detach_db commands from within the Master db in Query Analyzer.

Any help would greatly be appreciated.

Thanks,

-Brett

View 2 Replies View Related

Restore DB On SQL 2005 Multiple Files

Apr 9, 2007

Hello,

I have a SQL 2000 DB. Current tables in sql 2000 DB are in single file. I am planningto migrate the DB to sql 2005. I am going to partition the tables in sql 2005 and have multiple files. What is the best way to do this? Would backup/restore work? If I restore onto sql 2005 from sql 2000 backup, will the tables spread over different files automatically or not? Any ideas will be appreciated...

Thanks........

View 1 Replies View Related

Backup/Restore From/to Compressed Files

Apr 24, 2007

Hi everyone,



already tried this in other SQL forums, but maybe i have some luck here.



I need mainly to restore database backups from customers. They arrive in all kind of formats (zip, rar, gz). I'd like to be able to restore those directly from the compressed file, because i'm talking up to 7GB rar files which take a while to uncompress in a separate step.



I'm working for 6 years in R&D environments, but mostly on Linux/Oracle where this is an easy task using pipes, but i haven't found a sinlge web page, post or even script to do this with MSSQL. The VDI is not really what i'm looking for, so aren't backup software like SQLBackup, Litespeed etc. because i can't force the customer to use those.



Anybody any idea or even the same problem maybe with solution?

Thx.

View 10 Replies View Related

SQL Server 2008 :: Virtual Log Files And Determining Right Growth Size

Oct 14, 2015

Any good starting point to understand for a specific db, how many max VLFs are good to have so that it does not cause long startup or backup times?

Also, I need some calculation so that I can identify a best growth parameter I will setup for each database ?

I'm seeing the below msg in errorlog and curious to know the changes (right sizing/growth) to be done? As of now 100 MB of log file growth value is set (refer: [URL] ....)

Database BizTalkMsgBoxDb has more than 1000 virtual log files which is excessive. Too many virtual log files can cause long startup and backup times. Consider shrinking the log and using a different growth increment to reduce the number of virtual log files.

View 3 Replies View Related

SQL Express-solving 4GB Size Limit By Multiple Database Files?

Nov 19, 2006

Hi,I am new to SQL express and try to solve the 4GB size limitation.Is there a possibility to create a new database file every time I getto the limit?How can I do that with C#? how can I create new database file everytime it gets full?Can I be connected to two database files at the same time (the full dband the new db)?thanks in advance,oren

View 1 Replies View Related

Transact SQL :: How To Rollover Trace Files Once It Reaches Max File Size

Aug 18, 2015

I am trying to trace few events using profiler Via T SQL like below,  the below scripts works fine, but once the file reaches 1GB , it is not rolling over to another file and start trace again.I tried using URL...once it reaches max file size provided between the time interval..

declare @rc int
declare @TraceID int
declare @maxfilesize bigint
declare @DateTime datetime
set @DateTime = '2015-08-18  16:00:00.000'------Stop Time 4 PM 
set @maxfilesize = 1024  --1GB max File size 

[code]...

View 2 Replies View Related

T-SQL (SS2K8) :: Automatic Restore Of Backup Files With Different Filename

May 26, 2015

I have a full backup followed by transaction log every Monday, Wednesday and Friday, how can i restore this file using sql agent to automate restoration of backup files with different file-name.

View 6 Replies View Related

SQL Server 2008 :: Restore Database From Raw MDF And LDF Files Of Old To New Computer

Aug 18, 2015

I have a client that has POS software called Restaurant Pro Express (RPE) from www.pcamerica.com
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.

View 4 Replies View Related

Possible To Restore DB Files On Local Laptop To Review Code

Jun 29, 2015

I have an automation project to review the software. The software is using MSVS2012 and uses DBs from MSSQL2012.  Is it possible to restore the DB files on my local laptop to review the code completed thus far?  If so what other software would I need besides MSQLserver 2012 on my local laptop.   I'm able to use MSSQL server 2012 on my local laptop, but the DBs are on servers. 

View 4 Replies View Related

SQL 2012 :: Restore Fails - No Files Ready To Roll Forward

Feb 17, 2014

1. Created a database with a couple of tables with no data.

2. Taken a full database backup - db.bak.

3. Deleted the database.

4. Restored the database db.bak and filled the tables with some data.

5. Taken log backup - dblog.trn

BACKUP LOG <dbname> to DISK='D:Demodblog.trn' WITH NO_TRUNCATE, INIT

6. Dropped the database again.

7. Restored the database again from db.bak.

8. But when I am trying to restore log file dblog.trn on this database, i keep getting this error :

The log or differential backup cannot be restored because no files are ready to rollforward.

Msg 3013, Level 16, State 1, Line 2 RESTORE LOG is terminating abnormally.

View 2 Replies View Related

SQL Server Admin 2014 :: Restore DB1 To DB2 (with Different Filegroups And Files Structure)

Mar 23, 2015

What is the best method to restore a DBTest1 (with one .mdf and one .ldf) into DBTest2 (with one .mdf, multiple .ndf data files and with 4 filegroups associated with specific data files). I do not see how the one .mdf file (in DBTest1) can be separated into the other 4 filegroups (in DBTest2). This does not sounds like it is possible with Backup DBTest1/Restore to DBTEST2 or (Detach/Attach) because the underlying filegroup and file structure is different.

What method should be used to get the data and structure from DBTest1 (includes 1100 Tables and 550 GBs of Data) into DBTest2 (with 4 filegroups)? Is the following possible:

1) First, in DBTest2, execute a script to create tables/indexes on appropriate filegroups.

2) In DBTest2, use scripts to pull data from DBTest1 into DBTest2, for example INSERT INTO DBTest2.dbo.tables with SELECT FROM DBTest1.dbo.tables OR use SELECT/INTO DBTest2.dbo.tables FROM DBTest1.dbo.tables.

Or, is it possible to use the BULK INSERT or BULK COPY Options? Export/Import Wizard?

Does the Create Index step needs to be done after the data is loaded into DBTest2?

View 3 Replies View Related







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