Showing posts with label hii. Show all posts
Showing posts with label hii. Show all posts

Friday, March 9, 2012

'PRIMARY' filegroup is full problem

Hi
I have a script that creates a table in a database and populates it using
bulk copy from a comma-delimited file.
The number of rows of data to be entered is fairly large (approximately 24
million rows of data).
However, last night this fell over with the error message:
quote:

>Could not allocate space for object 'myTableName' in database

'myDatabase'
quote:

>because the 'PRIMARY' filegroup is full.

Using the Enterprise manager, I click on the database symbol and choose
"properties". The size of the database is '8132 MB' and it claims the space
available is '0.00 MB'.
However, on both the data file and the log file, I've got the following
properties set:
Automatically Grow File: YES
By Percent: 10%
Maximum file size: Unrestricted file growth
I've checked the disk and there's ~50 GB of free disk space, and it's fairly
contiguous space too.
Is my problem just that I need to increase the % growth from the current
value of 10% to something higher? I ask only because I have another
database that is smaller (but comparable in size) and this sort of data
import works with a growth size set of just 5%.
A second related question is whether there is a way to identify what % of
the database size is taken up by one particular (existing) table? If I knew
this, I'm sure I could answer the first question definitively myself.
Thanks in advance
GriffIt probably timed out before it could allocate the new space for the file.
You should never rely on autogrow and always ensure you have plenty of free
space in the database and log files. If you know your going to do a large
load you should check beforehand and manually grow the files before you
attempt the load. I would increase it an try again.
Andrew J. Kelly
SQL Server MVP
"GriffithsJ" <GriffithsJ_520@.hotmail.com> wrote in message
news:OUSGyfO4DHA.2332@.TK2MSFTNGP10.phx.gbl...
quote:

> Hi
> I have a script that creates a table in a database and populates it using
> bulk copy from a comma-delimited file.
> The number of rows of data to be entered is fairly large (approximately 24
> million rows of data).
> However, last night this fell over with the error message:
>
> 'myDatabase'
> Using the Enterprise manager, I click on the database symbol and choose
> "properties". The size of the database is '8132 MB' and it claims the

space
quote:

> available is '0.00 MB'.
> However, on both the data file and the log file, I've got the following
> properties set:
> Automatically Grow File: YES
> By Percent: 10%
> Maximum file size: Unrestricted file growth
> I've checked the disk and there's ~50 GB of free disk space, and it's

fairly
quote:

> contiguous space too.
> Is my problem just that I need to increase the % growth from the current
> value of 10% to something higher? I ask only because I have another
> database that is smaller (but comparable in size) and this sort of data
> import works with a growth size set of just 5%.
> A second related question is whether there is a way to identify what % of
> the database size is taken up by one particular (existing) table? If I

knew
quote:

> this, I'm sure I could answer the first question definitively myself.
> Thanks in advance
> Griff
>
>
|||Andrew
Thanks for your response. Can I ask though why one should never rely on the
"auto-grow" feature? Is it one of those features that "does not always do
what it says on the tin"...
Cheers
Griff|||The reason is just what you (probably) have got -- in an application you
have too large a data load, that grows the db size for which it needs such a
long time that your application times out.
To look at the size of a table run
sp_spaceused TableName, true
"GriffithsJ" <GriffithsJ_520@.hotmail.com> wrote in message
news:u521Q9O4DHA.488@.TK2MSFTNGP12.phx.gbl...
quote:

> Andrew
> Thanks for your response. Can I ask though why one should never rely on

the
quote:

> "auto-grow" feature? Is it one of those features that "does not always do
> what it says on the tin"...
> Cheers
> Griff
>
>
|||Quentin is correct. Also growing the db is an expensive process and
something you don't want to happen when the users are making updates in the
db if you can help it. It is better to manually (or schedule it) grow the
db during off peak times so as not to impact the users.
Andrew J. Kelly
SQL Server MVP
"Quentin Ran" <ab@.who.com> wrote in message
news:%236Wzg7Q4DHA.1704@.tk2msftngp13.phx.gbl...
quote:

> The reason is just what you (probably) have got -- in an application you
> have too large a data load, that grows the db size for which it needs such

a
quote:

> long time that your application times out.
> To look at the size of a table run
> sp_spaceused TableName, true
> "GriffithsJ" <GriffithsJ_520@.hotmail.com> wrote in message
> news:u521Q9O4DHA.488@.TK2MSFTNGP12.phx.gbl...
> the
do[QUOTE]
>

Primary filegroup

Hi
I have a database with 3 datafiles :
file1 => filegroup primary
file2 => filegroup primary
file3 => filegroup index_data
Now I want to delete the file2. Is that possible ? I get the message that
the file is not empty. How can I determine what data is in the file ?
Regards
Gene
You need to empty it first using DBCC SHRINKFILE with the EMPTYFILE option.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gene Vangampelaere" <gene.vangampelaere.remove.this@.infohos.remove.thi s.be> wrote in message
news:e5GdaAfVFHA.3716@.TK2MSFTNGP12.phx.gbl...
> Hi
> I have a database with 3 datafiles :
> file1 => filegroup primary
> file2 => filegroup primary
> file3 => filegroup index_data
> Now I want to delete the file2. Is that possible ? I get the message that the file is not empty.
> How can I determine what data is in the file ?
>
> Regards
> Gene
>
|||thx !!!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> schreef
in bericht news:OyG65IfVFHA.1200@.TK2MSFTNGP14.phx.gbl...
> You need to empty it first using DBCC SHRINKFILE with the EMPTYFILE
> option.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Gene Vangampelaere"
> <gene.vangampelaere.remove.this@.infohos.remove.thi s.be> wrote in message
> news:e5GdaAfVFHA.3716@.TK2MSFTNGP12.phx.gbl...
>
|||Hi,
To do this, use the DBCC SHRINKFILE with EMPTY FILE option for the NDF file
This will empty the file and mark it as unavailable. After this use ALTER
DATABASE.. REMOVE FILE option to remove the NDF file.
Steps:
1. Take a database backup
2. Use database_name
go
DBCCSHRINKFILE('NDFFILE_name',X'EMPTYFILE')
3. Use ALTER database to Remove the file
ALTER DATABASE <DBNAME> REMOVE FILE 'logical ndf file name'
Thanks
Hari
SQL Server MVP
"Gene Vangampelaere" <gene.vangampelaere.remove.this@.infohos.remove.thi s.be>
wrote in message news:e5GdaAfVFHA.3716@.TK2MSFTNGP12.phx.gbl...
> Hi
> I have a database with 3 datafiles :
> file1 => filegroup primary
> file2 => filegroup primary
> file3 => filegroup index_data
> Now I want to delete the file2. Is that possible ? I get the message that
> the file is not empty. How can I determine what data is in the file ?
>
> Regards
> Gene
>

Primary filegroup

Hi
I have a database with 3 datafiles :
file1 => filegroup primary
file2 => filegroup primary
file3 => filegroup index_data
Now I want to delete the file2. Is that possible ' I get the message that
the file is not empty. How can I determine what data is in the file ?
Regards
GeneYou need to empty it first using DBCC SHRINKFILE with the EMPTYFILE option.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Gene Vangampelaere" <gene.vangampelaere.remove.this@.infohos.remove.this.be>
wrote in message
news:e5GdaAfVFHA.3716@.TK2MSFTNGP12.phx.gbl...
> Hi
> I have a database with 3 datafiles :
> file1 => filegroup primary
> file2 => filegroup primary
> file3 => filegroup index_data
> Now I want to delete the file2. Is that possible ' I get the message that
the file is not empty.
> How can I determine what data is in the file ?
>
> Regards
> Gene
>|||thx !!!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> schreef
in bericht news:OyG65IfVFHA.1200@.TK2MSFTNGP14.phx.gbl...
> You need to empty it first using DBCC SHRINKFILE with the EMPTYFILE
> option.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Gene Vangampelaere"
> <gene.vangampelaere.remove.this@.infohos.remove.this.be> wrote in message
> news:e5GdaAfVFHA.3716@.TK2MSFTNGP12.phx.gbl...
>|||Hi,
To do this, use the DBCC SHRINKFILE with EMPTY FILE option for the NDF file
This will empty the file and mark it as unavailable. After this use ALTER
DATABASE.. REMOVE FILE option to remove the NDF file.
Steps:
1. Take a database backup
2. Use database_name
go
DBCCSHRINKFILE('NDFFILE_name',_'EMPTYFIL
E')
3. Use ALTER database to Remove the file
ALTER DATABASE <DBNAME> REMOVE FILE 'logical ndf file name'
Thanks
Hari
SQL Server MVP
"Gene Vangampelaere" <gene.vangampelaere.remove.this@.infohos.remove.this.be>
wrote in message news:e5GdaAfVFHA.3716@.TK2MSFTNGP12.phx.gbl...
> Hi
> I have a database with 3 datafiles :
> file1 => filegroup primary
> file2 => filegroup primary
> file3 => filegroup index_data
> Now I want to delete the file2. Is that possible ' I get the message that
> the file is not empty. How can I determine what data is in the file ?
>
> Regards
> Gene
>

Saturday, February 25, 2012

Preview/Print/Save reports

Hi

I have done many Reports using SQL 2005 Reporting Services and I can access them by:

http://localhost/Reports

In my ASP.NET application, I have 3 buttons:

Preview, Print and Save

If the user clicks on Preview the report is displayed

if the user clicks on Print,the report is sent automatically to the printer

if the user clicks on Save,the report is Exported in Pdf format to C:/

Can anyone give me some tutorials on how to manage Reports(.rdc) from ASP.NET

Hi,

From your description, it seems that you are wondering how to embed your report in ASP.Net application, right?

Generally, you can add a report viewer to your aspx page. You can follow the steps below to add your report viewer.

Open the Toolbox window. From the Data group, drag a ReportViewer control onto the page.

If it is not already open, open the ReportViewer Tasks smart tag panel by clicking the triangle in the upper right corner of the ReportViewer control on the Web page. In the Choose Report box, select the fully qualified file name for Report.rdlc.

When you select a report, instances of data sources used in the report are created automatically. Code is generated to instantiate each DataTable (and its DataSet container) and an ObjectDataSource control corresponding to each data source used in the report. This data source control is configured automatically.

And then, you can preview and print reports from reportviewer in the following way:
http://msdn2.microsoft.com/en-us/library/ms251693(VS.80).aspx

For more information on embed a report in your website, see:
http://msdn2.microsoft.com/en-us/library/ms252123(VS.80).aspx

Thanks.