SQL 2012 :: Restoring Only One File Group?
Feb 27, 2014
I have created the file group for my database.First i took backup of individual file group(mdf and ndf) then I tried to restore only secondary(ndf) file group.I got error like
Restore failed for Server 'pcnameSQLEXPRESS'. (Microsoft.SqlServer.SmoExtended)
File 'regSQL_dat' was not backed up in file 1 on device 'D:vtndf.bak'. The file cannot be restored from this backup set.
RESTORE DATABASE is terminating abnormally. (Microsoft SQL Server, Error: 3144)
When i tried to restore only primary file group i got the same error.
Can i restore individual file group? I
For the purpose of data archiveng,i have taken back up of ndf file (it contains very old data) & i have removed this file from database.Now my customer asking these file data.Now i have to again attach/restore this ndf file.how to attach/restore.
View 1 Replies
ADVERTISEMENT
Sep 23, 2014
Been asked to restore an orphaned MDF file leftover after a botched uninstall - no .bak file. Tried to reattach, but got an error, I don't think it had been detached. My initial answer was, "No, very likely can't be done".
Am I right? Or is there a way of attaching it that doesn't require it to have been detached?
View 4 Replies
View Related
May 15, 2015
I am trying to restore a database called BCC_DB (I'm actually just needing one table opened to find some data in one column) so I created a blank database called BCCrestore.
I have a .bak file called BCC_DB_backup_201505020017.bak.
I placed it in my local drive C:BCC_DB_backup_201505020017.bak and tried the SQL:
RESTORE DATABASE BCCrestore FROM DISK = 'C:BCC_DB_backup_201505020017.bak'
GO
I get an error:
Msg 3201, Level 16, State 2, Line 1
Cannot open backup device 'C:BCC_DB_backup_201505020017.bak'. Operating system error 2(The system cannot find the file specified.).
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
View 9 Replies
View Related
Apr 29, 2014
Why shrinkfile empty file does not redistribute data evenly in the primary file group with multiple files:
Please run the script attached to see what the end result is.
This is what I set up last night on my test machine.
1) Create database [FGTest] size 200MB
2) Create table called TEST on primary
3) Insert 40MB of data into test
4) Create another file group called temp in primary size 200MB
5) Shrinkfile('FGTest',emptyfile) so that all data is transfered from FGTest into temp file group.
6) Add another 2 files called DATA2 and DATA3. Both are 200MB.
7) We now have 3 empty files that I want data distributed evenly on. FGTest, DATA2 & DATA3
8) Shrinkfile('temp',emptyfile) to move all the data from temp over the 3 file groups evenly
I would expect at this stage to have the following:
FGTest = 13MB,
DATA2 = 13MB,
DATA3 = 13MB
(40MB of data over 3 files should be about 13 MBish in each file)
What I actually end up with is this:
FGTest = 20MB
DATA1 = 10MB
DATA2 = 10MB
It looks as though SQL Server is allocating 50% of all data to the original file and then 50% evenly over
the remaining files in PRIMARY.
View 3 Replies
View Related
Dec 11, 2014
I am not able to to drop few file groups that has been created to add partition range.
Steps taken so far:
--Empty files started
DBCC ShrinkFile(YEAR2015_FG,EmptyFile);
GO
--Removing files
Alter DATABASE ETL_MART REMOVE FILEGROUP YEAR2015_FG;
GO
-- Remove parition scheme depednecy
[code]...
View 2 Replies
View Related
Aug 13, 2014
Recently maintenance was done removing some tables from the original filegroup in one drive of our SQL Server 2012 Standard Edition 64bits to another created on a separate physical drive. I was expecting the full amount of data moved to the secondary filegroup to show up as unused on the primary filegroup but that doesn't seem to be the case. Do I have to do anything after the move to release that space, not to disk, but to the database as unused?
View 2 Replies
View Related
Feb 11, 2014
I setup SQL Server 2012 on Windows Server 2012 with the service accounts in the local Administrator group, but now that I'd like to remove the accounts from this group I'm finding they don't have the appropriate access to the network storage. notes on setting the per-service SID's for SQL (SQL Engine, Analysis Services, Reporting Services, and Agent Service) so they can read the Data, Log, and TempDB mount points?
View 2 Replies
View Related
May 19, 2015
partition with single file group or multiple file group which one best.
we have some report running from partition table, few reports don't have any partition Key and after creating 400 partition with 400 file group it is slow.what is best practices to crate 400 file group or single file group.
View 9 Replies
View Related
Jan 10, 2014
I'd like to ask how you would get the OUTPUT below from the TABLE below:
TABLE:
id category
1 A
2 C
3 A
4 A
5 B
6 C
7 B
OUTPUT:
category count id's
A 3 1,3,4
B 2 5,7
C 2 2,6
The code would go something like:
Select category, count(*), .... as id's
from TABLE
group by category
I just need to find that .... part.
View 3 Replies
View Related
Feb 28, 2014
I'm having a fight with Reporting Services at the minute when trying to compute an average at the row group level for a value summed in a column group.I have the following column groups:
Year
Month
Date
And the following row groups:
Region
Product
SubType (hidden, data at the date level is summed to Product)
At the moment I'm computing the average for SubType for each Date at the Product level (giving a decimal value), so for each day I end up with a nice average, that works. However I am unable to average that average over the whole Year for a Product. The issue being that I'm trying to combine Row Groups (Product) and Column Groups (Date/Year)
View 0 Replies
View Related
May 1, 2014
select top 15 count(*) as cnt, state from table
group by state
order by cnt desc
[code[...
Can the above three queries be combined into one and still be fast, if so how?What i am trying to go is an item count, by group, similar to ones Inbox in Outlook.
View 9 Replies
View Related
Sep 5, 2007
We have 2 SQL Server 2k5 servers running the same build - 9.0.2047 . When I backup any database from one server and attempt to restore it to the other, the log file generally increases by 100 fold. It errors out after I try to restore a 100MB db and it tries to create a 9.8GB log file. This happens both when I use the GUI to restore and when I restore from a T-SQL script. What am I doing wrong?
Thanks in advance.
View 1 Replies
View Related
Mar 5, 2014
I have clustered SQL server machines(SSserver1 and SSserver2). I need to restore a database from another standalone server to this clustered environment. In this case do I need to restore the DB on both the nodes that are part of the clustering(SSserver1 and SSserver2) or Just can I do it on one of them?
View 5 Replies
View Related
Sep 15, 2015
I am working with one of the task automating the db refresh in test server from production backup.The production backup sits on the production server local drive.Moving the production server latest backup from its local drive to Test server local drive
View 9 Replies
View Related
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
Aug 10, 2000
"Restore Now" button is greyed out after choosing to "Add File". I know I've done this before, can't figure out the problem.
View 1 Replies
View Related
Aug 25, 1998
I have a .dat file from a SQL Server 6.5 database and am trying to restore it on my server. Any help would be greatly appreciated. If you need more information, please let me know. If it`s not obvious, I`m new to SQL Server so try not to gloss too much over the details.
Thanks,
Nelson
View 2 Replies
View Related
Jan 12, 2004
Tried restoring a database from .bak file through Enterprise Manager and also by usng the following code :
RESTORE DATABASE DBB
FROM DISK = 'c:DBA.BAK'
WITH
REPLACE,
RECOVERY,
MOVE 'ap0data' TO 'c:mssqldataapm_data.mdf',
MOVE 'ap0Log' TO 'c:mssqldataapm_log.ldf'
But, I get an error :
Server: Msg 3156, Level 16, State 2, Line 1
The file 'd:mssql7dataapm.mdf' cannot be used by RESTORE. Consider using the WITH MOVE option to identify a valid location for the file.
I have got the two filenames i.e."ap0data" and "ap0log" by using the command "restore fileslistonly from disk = c:dba.bak".
Can anyone help me to do the things rigtly ?
View 11 Replies
View Related
Jul 27, 2007
I have tried unsuccessfully to attach a database that doesnt have its corresponding log file.
Is this possible in SQL 2005?
Please help.
View 5 Replies
View Related
Oct 19, 2015
Every once in a while a scheduled restore of a production database backup to a development server will fail with the following error.
RESTORE cannot operate on database 'XXX' because it is configured for database mirroring or has joined an availability group
While it is true the production database is involved in database mirroring, the development server does not have database mirroring enabled. This error tells me something within the backup is telling the development server the database is configured for database mirroring.
However the perplexing part for me is that we only receive this error maybe 5% of the time, if that, and only on a couple of our databases. We have numerous other restores of mirrored production databases to development servers that have never produced this error. So my question is what is causing this error to occur, and why is it not happening all of the time? We get around this error by deleting the DEV database and re-running the restore job.
View 0 Replies
View Related
Jul 6, 2015
I have a database with deployed CLR assembly on SQL 2008. I recently took a backup for the database and restored it on SQL 2012 server. Everything worked fine except very strange working of CLR assemblies functions.The result of the function is very odd. It manipulates the numeric string and return the result. It is returning very strange result on SQL 2012 as compared to SQL 2008.Example SQL 2008 ManipulateString('1234') returns 2345 On SQL 2012 the same call returns 1155.I am also trying to deploy the same assembly to SQL 2012 server database. I have successfully register the assembly, but the database do not list the exposed methods.
View 5 Replies
View Related
Sep 16, 2015
Suddenly one day I found some corruptions have occurred in my SQL Server 2012 installation. Because my 'msdb' has been marked SUSPECT/CORRUPT; hence no new work can be done as per my schedules.
I have gone about trying to repair it. I followed this article here: [URL] [the region 'Create new MSDB Database'].
I am facing some sizeable difficulties in doing this on my own. Steps 1. & 2. I have done. I am now stuck at step no. 3.My instance name is SQLEXPRESS. So, when I give,
SQLCMD -E -S<SQLEXPRESS> -dmaster -Q"EXEC sp_detach_db msdb"Â [as per the article], what I get is:
The System cannot find the file specified.
So I am stuck at that point. What's with the 'cannot find file specified'? The stored procedure, or the mdf, ldf files for my msdb? What is it?Also, if and when I am through with step no. 3 I would like to know about steps 5. & 6. also which are soon to follow [like how to do them correctly, safely and from where, the different options]. This is a huge priority for me to get my sql server up and running again because I can't do my other coding works without it. Everything is stalled. Slowly reaching the desperation, SOS mode..
View 7 Replies
View Related
Jul 6, 2015
For a database, we have 4 data files in a particular file group and the file sizes are almost 70 GB each.
Do I come across any performance issues if I create/pre-allocate an additional data file in the same file group so that the existing files don't grow too much?
View 5 Replies
View Related
Mar 2, 2001
I have a MSSQL7 data file mydata_data.mdf that I would like to load into my MSSQL7.
When I try to restore to my database, I got an error message saying MSSQl does not recognize the file as a valid backup file.
Your help is greatly appreciated.
View 1 Replies
View Related
Apr 2, 2008
I am using MS SQL 2005 Express. I have a database with two filegroups, the PRIMARY default filegroup, and then filegroup X. I have a backup of the PRIMARY filegroup only, and am trying to restore it to my database. When I select the .bak file to restore from, I am NOT given any 'backup sets to restore' - I therefore cannot select the filegroup to restore it. Can anyone advise? (NOTE - I have backed up the transaction log on the database I am restoring to already)
Thanks
MArco
View 5 Replies
View Related
Jan 8, 2008
Here is the problem in details :
It’s a classical ASP ( not .net ) website and it has a sql server 2000 backend database. I’m moving the website to a new windows 2003 server with sql server 2005 standard edition.
The hosting company ( Godaddy ) of the website refused to give me the mdf & ldf files for security reasons so they only allow to give .bak files.
I restored the database to sql server 2005 using the .bak file , the sql server has SQL server authentication, and everything seemed to be nice.
The problem is :
The database has a user name and he is the owner of the database schema. When I try to login with it the sql server says invalid login.
How to change the PASSWORD of this user after the backup?
I tried other scenarios to solve the problem but with no hope…. Some of them were:
•I added a new user to the SERVER security node, and I mapped it to the database schema, it worked fine BUT : all SQL statements in the code are like “ SELECT * from table� not “SELECT * FROM scehma.table�… so I don’t think the user was mapped correctly?
•I tried to delete the old user, but sql server said that he is the owner of the schema.
The only solution I have now is to change all sql statements in the code to be like “SELECT * FROM schema.table “… which will be a GREAT PAIN.
View 3 Replies
View Related
Jul 20, 2005
Hello.Can anyone tell me if a SQL Server 2000 database can berecovered only from the MDF and log files ?I have no backups.Thanks in advance
View 1 Replies
View Related
Oct 4, 2006
how 2 restore database in MS SQL 2005 using .mdf & .ldf file
View 4 Replies
View Related
Feb 21, 2008
Hello
I am trying to restore a file from a file/filegroup backup from our live server to a test machine but keep getting the following error:
The supplied backup is not on the same recovery path as the database, and is ineligible for use for an online file restore.
The location of the files on the live server are different to where they will be on the test machine but from my understanding of the restore t-sql i thought it the move would locate them to where they should be? here is my restore command i am running:
RESTORE DATABASE TestDB
FILE = 'File1'
,file ='File2'
,file ='File3'
,file ='File4'
,file ='File5'
,file ='File6'
FROM disk = 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBackupFileGroup.bak'
WITH norecovery,
MOVE 'File1' TO 'C:sqlarchivesFile1.ndf' ,
MOVE 'File2' TO 'C:sqlarchivesFile2.ndf' ,
MOVE 'File3' TO 'C:sqlarchivesFile3.ndf' ,
MOVE 'File4' TO 'C:sqlarchivesFile4.ndf' ,
MOVE 'File5' TO 'C:sqlarchivesFile5.ndf' ,
MOVE 'File6' TO 'C:sqlarchivesFile6.ndf',
I can not find any info about this error i am getting, can anyone point me in the direction of where to try and troubleshoot this message please?
Thanks
View 1 Replies
View Related
Sep 24, 2007
Hello everybody!
Does anyone know how to restore a database from a .dmp file? I'm using the SQL Server Enterprise Manager to do that.
I've searched within the program, but i didn't find anything.
Thanks.
View 5 Replies
View Related
Apr 27, 2015
In a server we had File Growth,And then We had to Add New Hard Drive And New File On It.And Now We have New server with a Huge Hard Drive.But all files remaind.Can I Reduce This files to One data file or not ?
View 3 Replies
View Related
Nov 15, 2015
We are trying to restore from a backup (.bak) of a sql 2005 database with full text catologs to sql 2012.
We are getting errors saying that the backup file context are different from what we are trying to restore to, even if we try to create a new database from the backup.The new database is just a test database. The source is a production database with full cataologs.
The normal restore from a bak file does not seem to work.
We dont need the full text catalogs in the new database, but cannot change settings in the source production database.
Is there a way to take a backup of the sql 2005 database without the full text cataologs being included ? , without changing setting in the source database beforehand ?
View 2 Replies
View Related
Jul 30, 2007
I have a huge MDF File - 120 GB File (Had setup as 1 MDF initially) -- Did not anticipate that the DB would grow to that size!!
Anyways.. I heard that the general performance woul grow if i had them as "File Groups"..
Is there anyway - to split the existing MDF file into Mutliple files as a File Group?
Where should i start? Can someone please direct me..
View 1 Replies
View Related