A few days ago one our database's default filegroup filled up. To solve the problem one of my colleagues created a new filegroup. This didn't solve the problem as no objects were placed on this filegroup and the initial one is still full. The idea was to expand the original filegroup over a new physical disk, not to create a new filegroup on that disk. Unfortunately, this is what happened.
To solve this I want to delete the new filegroup, but when I issue the command 'alter database PvgOmcsOds remove filegroup ternary' I get the message 'Server: Msg 5042, Level 16, State 7, Line 1 The filegroup 'ternary' cannot be removed because it is not empty.' Yet there're no objects placed on this filegroup.
How can I get rid of this filegroup?
I am trying to remove one of the filegroups in the development database to shrink its size down. I started with emptying and removing its files and ran: dbcc shrinkfile (pubs_data_1,emptyfile) go
and it ran fine, with 'DBCC execution completed' message
but when I tried :
alter database pubs remove file pubs_data_1 go
I got 'pubs_data_1 cannot be removed because it is not empty'. I even tried to go to each of the tables and delete from them first which didn't work, then drop all tables in that filegroup (I knew which tables are located on that filegroup), that didn't work either.
Any ideas? Is there a way to check what else sits on that filegroup?
hello, ihave atablelike this - z uniqueidentifier a varchar(40) b varchar(40) c varchar(40) d varchar(40) e varchar(40) f text g image
I am asked to split this table into 2 filegroups and move text and images on to one and other stuff on one. I am new to MS-SQL 7.0. Can anyone suggest me how to go for it. Thanking you.
i understand that the filegroup for a table can be specified in the CREATE Table statement. just out of curiosity, is there any way to move a table to a different filegroup, that too, if the table contains data.
Hi, There is a table which is about 50GB is size. I am thinking of placing the database of this table into a separate .ndf on a separate drive on the server. Is it possible to place this particular table into a searate drive to increase the performance even more? Basically my question is: is it possible to place tables into separate .ndf files? Thanks
Hi, I have created a database with two filegroups called FG_GroupData, FG_GroupHistory. FG_GroupData is set as default. FG_GroupData contains two secondary data files i.e. GroupData1.ndf and GroupData2.ndf I can create a table so that it is stored in FG_GroupHistory. i.e. CREATE TABLE dbo.OrdersHistory ( OrderID int NOT NULL, ProductID int NOT NULL, CustomerID int NOT NULL, UnitPrice money NOT NULL, OrderQty smallint NOT NULL ) ON FG_GroupHistory Questions: 1) How do I add tables to each .ndf file inside a group i.e. FG_GroupData For example, how do I add a table to GroupData1.ndf and one to GroupData2.ndf ? 2) I guess there is no need to place the file name i.e. .ndf inside the select query Thanks
What is the advantage of having two secondary files inside a filegroup. For example, I can create a table and place it inside a filegroup which obviously will use the secondary files. Not sure why some DBAs create just one but otherscreate more than one secondar files in a filegroup. I have read the booksonline but can not figure out the advantages. Thanks
Can anyone show me in SQL7 how to obtain Available Space on a particular filegroup in a database (not the database or datafile). I am trying to include this in a script to monitor my database which uses Filegroups and I have every other info that I need (from the sysfiles table) except the available space. Thanks in advance!
1. from Transcender ..... One file for each filegroup is sufficient because creating multiple files for the same filegroup on the same disk does not provide any performance gain
2. from bol .... Therefore, creating more files per filegroup can help increase performance because a separate thread is used to scan each file in parallel
Hi , I am restoring a VLDB from a Standby server which has just .mdf and .ldf to my production server which has .mdf and a file group with a single .ndf file, i want to restore the databse on to the Secondary file(is this possible) i checked the BOl but could not figure out of what command is to be given
Is it possible to back up one filegroup independently from the second when tables in one group have foreign key relationships with tables in the second group?
I am managing 120 gb SQL7 database. The 120 GB is in a RAID5 (Hardware RAID). At begining, I think I should create a user defined filegroup besides Primary filegroup, as BOL suggested.
After I read some discussions here, It appears I cannot gain any performance by adding second filegroups. Now I want to drop the filegroup I created. The Question is How?. If I do alter database, move all files from userdefined filegroup, does this mean my userdefined filegroup has gone?
I have 2 test database identical in size and table structure, only one resides on filegroups and one resides on a single file. From everything I have heard filegroups are suppose to improve performance. I stop and start the server before each test to clean out cache. When I run the filegroup test initially the first run averages 20 seconds slower then the database sitting on the single file. However on consective runs there is a significant improvement in performance with filegroups verses single files. I have the indexes sitting on a separate filegroup and 2 additional filegroups to spread the tables across. Does any one know what would be causing the performance to degrade on the initial run of the test. (The test by the way is a stored procedure that runs a select statement against each table).
We have sql 2000 server at a remote site that log ships to a standby server at the site, and back here to corporate. For performance we are adding a new RAID array to the remote servers along with a new file group for indexes. The server back here is older and we can't add this RAID. For log shipping purposes, what if anything might happen to this server when the filegroup is added. We are going to be using this filegroup for indexes
Hi, I am running out of space on one of the local drive, and I would like to move a filegroup from one drive to another. Does anyone know how to do it?
Are there any general recommendations concerning filegroups? My personal point of view is to place large tables in their own filegroups and group smaller, more static, tables in a single filegroup. Is it also good practice to group small and large index in two separate filegroups or should each large index have their own filegroup? Are there any useful links out there concerning filegroups and configuration?
Is there a way to rename a Filegroup "FG1" to "FG2"?
For those interested, I'm trying to script a sliding window procedure for my partitioned table and rather than use dynamic SQL I'd like to always refer to the same Filegroup name (ie. "FG1").
WHERE DO I FOUND THE FILEGROUP? WHEN THIS ERROR OCCURED
Could not allocate space for object '<temporary system object: 431024047390720>' in database 'tempdb' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
Greetings All, I was hoping that someone might be able to shed somelight on this issue. I am trying to add a FileGroup/Datafile to anexisting SQL database. The code below compile and it runs in .NETStudio, however nothing happens? The form closes, no error messagesare thrown, there is no sign of any type of error taking place. Theend result (assuming the code is correct) is tha there should be a newFileGroup with a datafile in it, here is the code:************************************************** ******************private void AddFileGroup(frmMyForm f){SQLMy.SQLServer MySQLServerName = new SQLMy.SQLServer();SQLMy.Database MyDBDbName = new SQLMy.Database();SQLMy.FileGroup MyDBDataGroup = new SQLMy.FileGroup();SQLMy.DBFile MyDBDataFile = new SQLMy.DBFile();try{MySQLServerName.ConnectmyGetConfigData.OlapServerName*,myGetConfigData.Ol apUserLogin*,myGetConfigData.OlapUserPassw*ord);MyDBDbName.Name =myConnectionData.OlapDatabaseN*ame.ToString().Trim ();MyDBDataGroup.Name = "DBDataGroup";MyDBDbName.FileGroups.Add (MyDBDataGroup);MyDBDataFile.Name = "DBData";MyDBDataFile.PhysicalName =myConnectionData.OlapDBDataPat*h.ToString().Trim() + @"DBData.ndf";MyDBDataFile.Size = 50;MyDBDataFile.MaximumSize = -1;MyDBDataFile.FileGrowth = 5;MyDBDataFile.FileGrowthType = 0;MyDBDataFile.PrimaryFile = false;MyDBDbName.FileGroups.Item("DB*DataGroup").DBFiles.Ad (MyDBDataFile);this.Close();MySQLServerName.DisConnect();}catch (Exception e){MessageBox.Show(e.Message);}finally{MySQLServerName.DisConnect();}}************************************************** ******************Note: myGetConfigData: This is a class that reads in the values for thedb connection from an XML file. This class has been tested extensivelyand the data values are being populated into the variables.I would appreciate any help that anyone might be able to provide to me.Regards, TFD.
Is a single transaction log created for a database or, if you have aprimary and a secondary file group in that database, are twotransaction logs generated? Yep, a newbie.Thanks,Phil
I am using SQL Server 2000. How can I tell how much free space isavailable within a particular filegroup? What query can I run to getthis information?Thanks,Greg
The Microsoft Course 2780A book says you can do backups using the following: BACKUP DATABASE PhoneOrders File = Orders2 to OrderBackup2 BACKUP LOG PhoneOrders to OrderBackupLog
but when I try this in SQL Server 2005, I get the message: "The media set has 2 media families but only 1 are provided. All members must be provided."
I posted this on MSDN forum but didn't get much of a response. I only need/want to backup one file group out of two. The simple recovery model will not alow me to backup a single filegroup. Bulked-logged recovery mode produces log file size problems.
I have a backup of my PRIMARY filegroup saved as a .bak from a webserver. I am trying to restore this to a fresh copy of my database on my local PC. The database has a PRIMARY filegroup and 1 additional filegroup - which contains READONLY data, but is not set as readonly. First I complete a taillog backup, then I restore the PRIMARY filegroup - no problems so far. Finally I try to restore the taillog - however I get the following error. Can anyone help? (note, I have already searched google, msdn and BOL but don't understand what I am missing) rgds MArco Msg 4326, Level 16, State 1, Line 2The log in this backup set terminates at LSN 182000000043700001, which is too early to apply to the database. A more recent log backup that includes LSN 183000000022100001 can be restored.Msg 3013, Level 16, State 1, Line 2RESTORE LOG is terminating abnormally. --Perform a tail-log backupuse masterbackup log mydatabaseto disk = 'C:POTail.bak'with norecovery--Restore PRIMARY filegroupuse masterrestore database mydatabasefilegroup = 'PRIMARY'from disk = 'C:PRIMARY.bak'with partial, norecovery --Restore tail-loguse masterrestore log mydatabasefrom disk = 'C:POTail.bak'with recovery
We have allocating space for a number of filegroups in our database. We had thought the one index was going to a certain table and it actually wasn't. So, one filegroup is filling up faster than another. We want to leave the index where it is, just take away space from one filegroup and add it to another. Is this possible? Thanks!
Hi, I want to replace the indexes in my database to a different filegroup. How can I do that using T-SQL? I only found a way that uses the EM, but I have a lot of indexes and I hate to do it manually.
Problem: I need to build several databases on a quarterly basis. The databases range in size from 30 GB to 250 GB. I want to keep each dtabase file <= 20 GB so my databases contain from 2 to 13 database files (I put these all in one filegroup. the filegroup is separate from the PRIMARY filegroup which contains only the system tables in my databases).
I would like to create the files for the databases asynchronously (I have four physical drive letters on which to create the files and would like to be building one file on each drive simultaneosly). I can acheive the asynchronous operation by creating a separate job for each of the drive letters and then callin sp_start_job for each of the jobs.
The problem is that the ALTER DATABASE command apparently locks the sysfiles table and three of the four processes are always blocked and I therfore end up build the files serially instaed of in parallel.
Is there a way to make these processes work in parallel?
I have around 9 index to a table and when I transfer my table with the help of Import/Export utility I get this error, can any1 tell me, why do I'm getting this error and I don't have help on that.
Error: -------- Error at Destination for Row number 2279. Errors encountered so far in this task: 1
could not allocate space for object 'a_pua01_tblmdlmast' in database dbDev because the primary filegroup is full ---------
I have my user defined objects created on the PRIMARY filegroup. I have a secondary filegroup existing for the database. How can I move all my user objects to the secondary filegroup from the primary filegroup. Info on this is appreciated.
I will be moving production SQL databases (one is 25Gb, the other is 3Gb) to a new server. One of the reasons is the old server has only IDE disks while the new has raid (I don't know the configuration yet). Database 1 has a primary and one other filegroup. I want to spread the disk I/O by moving table A to it's own filegroup on it's own disk. For the purposes of testing I have 1. brought a database onto a test server (using sp_detach_db, copying the files and attaching using sp_attach_db) 2. created a new filegroup 3. created a physical file on disk, allocated space and associated with my new filegroup
my question is how do I now move table A into this file?
Hi, I want to replace the indexes in my database to a different filegroup. How can I do that using T-SQL? I only found a way that uses the EM, but I have a lot of indexes and I hate to do it manually.
I have created a new filegroup and would like to move my indices there. Do I need to create a file for each index or can I just specify the filegroup in Enterprise Manager?
I need to know if it is possible to move ONE table from an existing filegroup to another existing filegroup. The answer I received to use ALTER database only modifies the file/filegroup name or changes the default filegroup. Any assistance will be greatly appreciated.