I am trying to resize a database initial log file from 500M to 2M. I€™m using€?
ALTER DATABASE <DBNAME> MODIFY FILE ( NAME = <DBLOGFILENAME, SIZE = 2 ) "
And I'm getting "MODIFY FILE failed. Specified size is less than current size." I tried going into the database properties and setting the log file to 2M, but it doesn€™t keep the changes.
We had a runaway query which built the size of tempdb to 24000mb. Then someone changed the unrestricted file growth property to restricted growth while the size was 24000mb. Now I can not reduce the initial size. I have set the property back to unrestricted file growth. I have shrunk the tempdb and available space is almost 24000mb. I have stopped sqlserver. I even deleted the existing tempdb.mdf & tempdb.ldf files. But when SQL server is restarted, the initial size is set to 24000mb. It will not let me reduce the size. Is there anything short of manipulating the system tables to reduce the size back to 500mb?
I would like to increase the initial size of a SQL 2005 DB from 150 to 250 GB to prevent automatic autogrowth; would this have any impact in production if you do it on the fly?
Is there a way to decrease the initial size of a database/log file? I've noticed you can increase it, but if you decrease it, after you confirm the change and go checking again, you will see nothing happened.
Currently my db size is only 6 GB but the transaction log file initial size was set to 20 GB and has grown much way beyond the db size with the autogrowth feature turn on. The database was originally a test/development DB and was migrated to a production server including the log file. This probably caused the accumulation of transactions on the log.
We run backup everyday and tried to shrinkfile and file size did not change.
Can I change the "initial size" setting of the transaction log without causing any problems? Do I need to stop the service before I made the change assuming I made the change after the backup run? Or can I change it on the fly?
Via t-sql, how can I query for a file's initial size?
I want the same thing one finds by : Start SQL Server Management Studio, view, object explorer, right click [dbname], properties, files, Database files: Initial Size (MB).
Many thanks.
Anything will give up its secrets if you love it enough. -- George Washington Carver
I would like to increase the initial size of a SQL 2005 DB from 150 to 250 GB to prevent automatic autogrowth; would this have any impact in production if you do it on the fly?
I've worked with informix for a very long time and this is my first aproach to sql server. I have an extremely simple design for a "small" database and at this moment I'm creating the tables, in informix I can assign a first extent and next extent size to the creation of the table so if your volume and growth analisys is good you can basically be sure that you will allways have contigous space on disk for your table. I'm readin BOL to see if I have that feature here but can't seem to find anything similar. Does that mean that my table data will be "fragmented" all over the primary and secondary files every time I load into them? Would it be a good practice to simulate the extents by creating a secondary file for each table with the size I require?
I have a database I need to copy from a Prod server to a Dev server. There is not enough space on the Dev server. In looking at the size of the files on the Prod server, the Initial Size property for the transaction log on the Prod server is set to 100,000 MB though the log is using nowhere near that.
This is a mirrored database so the recovery model is "full". I know that to change the initial log size, I have to put the database in 'simple" recovery model. Is this possible? Can I just:
1. Pause the mirror 2. Switch recovery model to simple 3. Change the initial size property to something smaller. 4. Shrink the transaction log 5. Change the recovery model back to full and resume the mirror?
I honestly don't know if the transaction log is needed on the Dev server. Meaning I may just be able to restore the transaction log to a different location on the server and delete it so that new one is created.
We currently have a fairly new SQL server 2000 db (currently about 18mb is size) as a backend to an application (Navision). Performance seems to be below what it should be.
The db is increasing quite rapidly in size, with a lot of data scheduled to be loaded onto the db and also more and more shops and users coming onto the system with alot more transactions going onto the db.
The initial setup of the db has the database File properties set to "Automatically grow file" by "30%" and has an unrestricted file growth.
The server that the db sits on is high spec and very large disk space.
Because the database will be expanding alot and thus reaching its maximum space allocation and then performing a 30% increase in size (which I guess affects performance quite a bit??) quite regularly.
Is it best to set the intitial size of the db to a alot bigger size in the first place as we have large disk space availiable and also set the % increase bigger also.
any advice on best performance would be much appreicated.
We have installed SQL Server 2008 R2 SP1 instance and it's having Share Point 2010 databases.
We have 2 dedicated drives for Tempdb on SAN with 50 GB space. Both tempdb data & log files are created with default size. I would like to presize them.
What are the best values to start with?
U ->Tempdbdata having tempdb.mdf file V->Tempdblog having templog.ldf file
I have a sql 2005 system and have a very large 25gb ldf file and a 200mb database. Someone has set the initial size at 25gb so shrinking the file will not help. I need to remove/add the file to gain space on the drive.
SQL 2000 you could just detach the DB and rename the ldf file and attach the db back and you are done. With 2005 you cannot do that.
I am doing a report in SQL Server Reporting Services 2k5 , the report has a chart that displays data from a query. The question is: Is possible to dynamically resize the area occupied by the chart depending on the amount of information (variations of a category) to be displayed on it ?
I have a very big report with 60 columns and some columns are invisible.
The problem is now if I have 30 columns that are invisible (hidden=TRUE), the report width still stays at 60 columns width, and the Horizontal scroll bar become very long and it just scroll to blanks.
I would like to know how to resize the report after it is generated?
I am trying to resize a COLUMN. Can I do this with the ALTER TABLE MODIFY command? I am getting the following error message when I try the "alter table [admin] modify [runFileTypes] NVARCHAR(250)" command.
The only other option I can think of is to rename the old field, add a new field, copy the value of the old field to the new field, and delete the old field. I have some of the code below, but I am not sure how to copy the contents of the old field to the new field.
command = ssceconn.CreateCommand()
command.CommandText = "ALTER TABLE myTable RENAME COLUMN [oldField] TO [newField]"
Hi, I have a database with about 200Gigs allocated to filegroups and 200Megs data in it presently, and am trying to create a copy of the database on the same server - except I don't have enough diskspace free for another 200Gigs. Is there a way using copy database wizard, or restore that the filegroup allocations can be resized?
I have a report that has a certain number of columns that are hidden and when hidden they leave a lot of white space. Is there a way to detect when they are hidden and set the width property to 0 and then reverse the value when they are visible?
I am linking to another SQL Server database to extract data into my own system. Following an increase in size on one of the columns in a table I am extracting, I am getting the following error:
'OLE DB provider 'SQLNCLI' for linked server 'gsc-rpt.svr.bankone.net' returned data that does not match expected data length for column '[gsc-rpt.svr.bankone.net].[Peregrine].[dbo].[scProblem].short_description'. The (maximum) expected data length is 100, while the returned data length is 148'
The column short_description has been increased from 100 to 1024. Writing a simple query, SELECT (max(len(short_description)) FROM dbo.Peregrine_Problem will generate the error, but if I embed the same SQL into an Excel VBA macro and connect to the server, it happily returns the result 1024. Our Access databases also link to the table on the remote server and handle the increased column size properly.
I have done everything I can think of, including deleting the linked server within SQL Server MS, and recreating it, but I can't override the setting of 100.
I am currently developing a CustomQueryDesigner which is based on a Windows.Form that I have already developed.
Currently the QueryDesigner Class contains two UserControls: the ToolBar and the class that wrapps my own QueryDesigner.
So what I want to do now, is to resize my Windows.Form which is encapsulated in the second UserControl whenever the size of the window, that contains these two UserControls, is modified.
I already tried to use the "Parent" property and the "FindForm()" method but both just return "null".
--> I do not unterstand how I can access these informations!
We have a very severe issue in our production, and this is very very ugent to fix this issue, there was a job started on server on 10th October, 2007, for backup of database of 3.2 TB, which caused this issue on 18th October, 2007. I cancelled that job and even restarted the server, but still there is same issue on the server.
I am using this command to expand the physical file,
ALTER DATABASE [ODS] MODIFY FILE ( NAME = N'ODSFG33File1', SIZE = 307200000KB )
Error:
MODIFY FILE encountered operating system error 1450(Insufficient system resources exist to complete the requested service.) while attempting to expand the physical file.
Server:
64bit Itanium Server with 4 Processors 4TB of SAN Storage 24GB of RAM MS Windows 2003 Enterprise Edition with SP1 MS SQL Server 2005 (9.0.3152) Enterprise Edition with SP2
Database:
3.2 TB Size of Partitioned Database with 60 File Groups Every File Group contains One month data in its only one physical File. Physical Files are of different size between 10GB and 300GB.
I recently upgraded to on 2012 SP1 CU5 and have found the SSDT gui for SSIS to be almost unusable. I can't drag or resize items. Any time i try they either automagically shrink to the tiniest possible size, shoot off to some extreme or just shake uncontrollably I didn't have these problems on previous versions (dont remember what It was).
I have been using a licensed copy of Visual Studio 2005 and MS SQLServer 2005 for some time but am only now trying out the Reporting Services functionality.
I have attempted to follow the instructions from url:
However despite confirming that the report services are running and also checking the configuration by following the information in the above web page I still get the following problems.
1. When attempting to create a project via the wizard I get the following error: Exception has been thrown by the target of an invocation. If an attempt is made to add a new data source I am unable to choose the data source type (eg: Microsoft SQL Server). I am not given a choice for the type, in fact the relevant drop down is blank.
2. A project can be created without the wizard but if I right click the Shared Data Source folder I do not see the next Pop up to set the data source parameters.
I assume I am missing something quite fundamental - however so far I cannot see what.