Showing posts with label available. Show all posts
Showing posts with label available. Show all posts

Thursday, March 29, 2012

FTP Task : Put a wait in the FTP task

Hi,

I have a scenario where I want the FTP task to connect to a particular FTP server and download files. But if the files are not available on the FTP server then wait for 10 mins and then try again. Continue this till 3:00 am in the morning and if the files are still not there then raise an error notification.

Do I have to create a custom task for this? Or can it be achevied by using the existing SSIS components?

Your guidance is required to start me in the correct direction.

Thanks for your time.

$wapnil

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1178124&SiteID=1

The forum search is your friend.|||

Thanks again Phil.

Will be trying this out now.

$wapnil

Friday, March 23, 2012

Frustrating: Can't get to Provider Options in SQL 2005 Express

Try setting the rest of provider settings through the @.provstr parameter of
the sp_addlinkedserver.
Some examples are available in Books Online.
ML
http://milambda.blogspot.com/Thanks. After doing some more research, I now know that this is a limitation
of SQL Server Express.
I was however able to use the following system stored procedure to change
the provider options:
EXEC master.dbo.sp_MSset_oledb_prop N'ProviderName', N'AllowInProcess', 1
I hope this can help someone else.
Thanks,
Mike
"ML" <ML@.discussions.microsoft.com> wrote in message
news:1CF1915F-6D1B-443F-B674-7C51B3139B79@.microsoft.com...
> Try setting the rest of provider settings through the @.provstr parameter
> of
> the sp_addlinkedserver.
> Some examples are available in Books Online.
>
> ML
> --
> http://milambda.blogspot.com/|||This is very helpful and good to know. Do you have a blog? Where have you
found the solution?
ML
http://milambda.blogspot.com/|||Hi,
Cindy Winegarden answered in microsoft.public.sqlserver.programming, when I
asked for the same problem (25/05/2006)
Michel Lvy
Communaut Francophone des Professionnels FoxPro
Pour un dveloppement durable...
http://www.atoutfox.org
--
"ML" <ML@.discussions.microsoft.com> a crit dans le message de news:
0BAB0C0C-0151-462E-94B0-9686347E430D@.microsoft.com...
> This is very helpful and good to know. Do you have a blog? Where have you
> found the solution?
>
> ML
> --
> http://milambda.blogspot.com/

Sunday, February 26, 2012

Free space on an index

On SQL 2000, how would you determine:
1. the percent free on an index?
2. the available page size?
Thanks
Message posted via http://www.sqlmonster.com
Indexes don't have "free space" - when pages need to be added to the index,
they are allocated and linked in.
In SQL Server the page size is always the same, 8KB. If you're referring to
the available free space on a particular page, there isn't any documented
way to do this. Perhaps you're talking about FILLFACTOR? You can specify a
FILLFACTOR for index creation that will leave a percentage of space on the
leaf level index pages free, but it is only maintained at index creation
time, not during normal operations. You can use INDEXPROPERTY (<table>,
<index>, 'IndexFillFactor') to get this value...
If I'm misunderstanding your questions, please let me know.
Thanks.
Ryan Stonecipher
Microsoft SQL Server Storage Engine, DBCC
This posting is provided "AS IS" with no warranties, and confers no rights.
"Robert Richards via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:44a0ef20a81f45cb9afa95ac557ba389@.SQLMonster.c om...
> On SQL 2000, how would you determine:
> 1. the percent free on an index?
> 2. the available page size?
> Thanks
> --
> Message posted via http://www.sqlmonster.com
|||Okay. Thanks for getting me straight.
What is happening is I have inserts into a table that are timing out, but
updates on the table are proceeding. Is there a possibility of the index
size growing, or new pages being added to the index that may be causing
these insert timeouts?
Message posted via http://www.sqlmonster.com

Free space on an index

On SQL 2000, how would you determine:
1. the percent free on an index?
2. the available page size?
Thanks
--
Message posted via http://www.sqlmonster.comIndexes don't have "free space" - when pages need to be added to the index,
they are allocated and linked in.
In SQL Server the page size is always the same, 8KB. If you're referring to
the available free space on a particular page, there isn't any documented
way to do this. Perhaps you're talking about FILLFACTOR? You can specify a
FILLFACTOR for index creation that will leave a percentage of space on the
leaf level index pages free, but it is only maintained at index creation
time, not during normal operations. You can use INDEXPROPERTY (<table>,
<index>, 'IndexFillFactor') to get this value...
If I'm misunderstanding your questions, please let me know.
Thanks.
--
Ryan Stonecipher
Microsoft SQL Server Storage Engine, DBCC
This posting is provided "AS IS" with no warranties, and confers no rights.
"Robert Richards via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:44a0ef20a81f45cb9afa95ac557ba389@.SQLMonster.com...
> On SQL 2000, how would you determine:
> 1. the percent free on an index?
> 2. the available page size?
> Thanks
> --
> Message posted via http://www.sqlmonster.com|||Okay. Thanks for getting me straight.
What is happening is I have inserts into a table that are timing out, but
updates on the table are proceeding. Is there a possibility of the index
size growing, or new pages being added to the index that may be causing
these insert timeouts?
--
Message posted via http://www.sqlmonster.com

Free space on an index

On SQL 2000, how would you determine:
1. the percent free on an index?
2. the available page size?
Thanks
Message posted via http://www.droptable.comIndexes don't have "free space" - when pages need to be added to the index,
they are allocated and linked in.
In SQL Server the page size is always the same, 8KB. If you're referring to
the available free space on a particular page, there isn't any documented
way to do this. Perhaps you're talking about FILLFACTOR? You can specify a
FILLFACTOR for index creation that will leave a percentage of space on the
leaf level index pages free, but it is only maintained at index creation
time, not during normal operations. You can use INDEXPROPERTY (<table>,
<index>, 'IndexFillFactor') to get this value...
If I'm misunderstanding your questions, please let me know.
Thanks.
--
Ryan Stonecipher
Microsoft SQL Server Storage Engine, DBCC
This posting is provided "AS IS" with no warranties, and confers no rights.
"Robert Richards via droptable.com" <forum@.droptable.com> wrote in message
news:44a0ef20a81f45cb9afa95ac557ba389@.SQ
droptable.com...
> On SQL 2000, how would you determine:
> 1. the percent free on an index?
> 2. the available page size?
> Thanks
> --
> Message posted via http://www.droptable.com|||Okay. Thanks for getting me straight.
What is happening is I have inserts into a table that are timing out, but
updates on the table are proceeding. Is there a possibility of the index
size growing, or new pages being added to the index that may be causing
these insert timeouts?
Message posted via http://www.droptable.com

Free space information in Management Studio

In Enterprise Manager, the taskpad view showed me how much space is available in the data and log files. Is this information available anywhere in SSMS?

For instance, in one database EM shows me that I have 1200MB free in the data file and 400MB free in the log file. It also says, at the top of the taskpad view, that I have 0 free space in the database - I'm not sure how they relate, but in SSMS the only number that I can see is the 0. It also takes several mouse clicks and scrolling over to see the breakdown of the data and log sizes.
In the object browser, highlight your database. On the right pane, click on the Summary tab. (If it is not there, hit F7.) Take a look at the Report dropdown. I think you'll like the Disk Usage report a little bit better than EM's archaic taskpad view. A wrote in message news:c99645b4-1bd4-45d3-8a71-46591c4597dd@.discussions.microsoft.com...
> In Enterprise Manager, the taskpad view showed me how much space is
> available in the data and log files. Is this information available
> anywhere in SSMS? >
> For instance, in one database EM shows me that I have 1200MB free in the
> data file and 400MB free in the log file. It also says, at the top of
> the taskpad view, that I have 0 free space in the database - I'm not
> sure how they relate, but in SSMS the only number that I can see is the
> 0. It also takes several mouse clicks and scrolling over to see the
> breakdown of the data and log sizes. >
>|||Thanks for the suggestion. However, the Report dropdown is greyed out on my Summary tab. I guess that's because we didn't install Reporting Services?
|||No, I don't have reporting services installed either. Are you sure the focus in the object browser is on a database name, like I originally suggested? >> In the object browser, highlight your database. The Summary tab is context sensitive, so if in the object browser you have highlighted "assemblies" or an individual stored procedure or table or the database diagrams node or server objects, the reports dropdown will be greyed out, because there are no reports relevant to those objects. A wrote in message news:6134a1d2-8631-434a-897c-6308dc7fef63@.discussions.microsoft.com...
> Thanks for the suggestion. However, the Report dropdown is greyed out on
> my Summary tab. I guess that's because we didn't install Reporting
> Services? >
>|||You're right - I must have had the focus in the wrong place. It is a nice report and contains a lot of useful information, but it took 2 minutes to run on an otherwise idle server (with 4 Xeon 3.6 processors in 64 bit mode, 4GB of RAM, and data and log on separate RAID 5 spindles). I would still like to have something that quickly gives me total size and free space at the file level.|||

> nice report and contains a lot of useful information, but it took 2
> minutes to run on an otherwise idle server The first time you ran it? Was that the only time you've run it? It may have had to do some background processing and/or caching the first time. My server is less powerful than that (virtual machine with 2 CPUs and 3 GB allocated), and it resides 60 miles away in our data center, and the report took 4 seconds to load on my paltry workstation (dual xeon 3.4, 2 GB). And I use this report all the time; if it was slow by nature and this instance wasn't a freak phenomenen, I'm sure I would have observed this issue before? A

|||It consitently takes over 2 minutes for our main databases. I suspect it has something to do with the size of the database or number of tables - our database has over 1100 tables. When I tried it on a much smaller database, it came back within a few seconds.|||

> our database has over 1100 tables. Ah, I see. Well, "quick" is a pretty lofty goal, then, unless you want relatively stale data. You could run queries on the hour that store this information into your own tables, then that query will be quick, but it won't be up-to-the-minute. A

|||So, in summary, if I am monitoring a SQL2000 server in SSMS 05 then there is no way for me to see the free space on my data files. AND if it's a large 2005 database I have to wait a long time for the report because it wants to give me details on every table. So much for a quick check of my systems!|||

I agree. Monitoring free space in data files is something a DBA does frequently, and so in SQL2000 Enterprise Manager I often used the Taskpad view for a quick check (even though it was buggy and would sometimes throw interface errors). I had been hunting for the same kind of quick reporting in SQL 2005 Management Studio, and thanks to this thread I figured it out... but I am STILL waiting for my first report to come up on Disk Usage, and it has been over 5 minutes now! I manage a large number of SAP databases, and this is the first one to be configured on SQL 2005 (the others are still 2000, but they will be upgraded soon). This is one of the smaller ones, at only 20 GB in size, but it still has 27,000 tables. I wonder what will happen when I move our 70 GB R/3 database onto this platform? Also, although I haven't checked this out yet, it appears that this disk usage report may be putting a certain amount of load on the server, based on anecdotal observation. That can't be good, if true.

It's true that I can get the information I want on any given single database very quickly by logging into the SAP application and running application-specific database monitor tools (and if the application can do it so quickly, why can't the Disk Usage report? After all, it's just a collection of system stored procedures like sp_spaceused with the output presented graphically). However, when trying to quickly get status on 20+ servers, it's a little tedious to log into each one individually, whereas the Taspad could move through them a little quicker (even though it's still one at a time).

Ok, after more than 10 minutes of execution time while writing this post, the Disk Usage report finally came back with something. However, the information is not what I had hoped for. It tells me "the information needed to display a summary page for the selected object is not available" and throws an error about "object reference not set to an instance of an object." It took 10 minutes to get to that?

|||

I can do you one better. I used the TaskPad the way you did -- space problems can be seen at a glance. I moved a db instance from 2000 to 2005, but we are running in 2000 compatibility mode until we can make some code changes. When I try to run the space report in Management Studio, it barks at me for being in 2000 compatibility mode. I can't hit the dbs from EM and I can't get the data in Managment Studio until I switch compatibility mode (and then I'll have a long running on-line report...lucky me).

I think in an effort to use their own framework and tools, Microsoft has taken away the beauty of quick access to data in this case. That's a lot of extra work to break something that already worked really pretty well.

|||

OK, further research uncovered the following:

http://www.sqlservercentral.com/columnists/bBaliner/quicklyviewingavailablespace.asp

I tweaked it by adding total space to the mix:

SELECT name AS NameOfFile, size/128.0 AS TotalSpaceInMB,size/128.0 -CAST(FILEPROPERTY(name, 'SpaceUsed' )AS int)/128.0 AS AvailableSpaceInMB

FROM dbo.SYSFILES

Kudos to Boris Baliner!


Free space information in Management Studio

In Enterprise Manager, the taskpad view showed me how much space is available in the data and log files. Is this information available anywhere in SSMS?

For instance, in one database EM shows me that I have 1200MB free in the data file and 400MB free in the log file. It also says, at the top of the taskpad view, that I have 0 free space in the database - I'm not sure how they relate, but in SSMS the only number that I can see is the 0. It also takes several mouse clicks and scrolling over to see the breakdown of the data and log sizes.In the object browser, highlight your database.

On the right pane, click on the Summary tab.

(If it is not there, hit F7.)

Take a look at the Report dropdown. I think you'll like the Disk Usage

report a little bit better than EM's archaic taskpad view.

A

wrote in message

news:c99645b4-1bd4-45d3-8a71-46591c4597dd@.discussions.microsoft.com...

> In Enterprise Manager, the taskpad view showed me how much space is

> available in the data and log files. Is this information available

> anywhere in SSMS?

>

> For instance, in one database EM shows me that I have 1200MB free in the

> data file and 400MB free in the log file. It also says, at the top of

> the taskpad view, that I have 0 free space in the database - I'm not

> sure how they relate, but in SSMS the only number that I can see is the

> 0. It also takes several mouse clicks and scrolling over to see the

> breakdown of the data and log sizes.

>

>|||Thanks for the suggestion. However, the Report dropdown is greyed out on my Summary tab. I guess that's because we didn't install Reporting Services?|||No, I don't have reporting services installed either. Are you sure the

focus in the object browser is on a database name, like I originally

suggested?

>> In the object browser, highlight your database.

The Summary tab is context sensitive, so if in the object browser you have

highlighted "assemblies" or an individual stored procedure or table or the

database diagrams node or server objects, the reports dropdown will be

greyed out, because there are no reports relevant to those objects.

A

wrote in message

news:6134a1d2-8631-434a-897c-6308dc7fef63@.discussions.microsoft.com...

> Thanks for the suggestion. However, the Report dropdown is greyed out on

> my Summary tab. I guess that's because we didn't install Reporting

> Services?

>

>|||You're right - I must have had the focus in the wrong place. It is a nice report and contains a lot of useful information, but it took 2 minutes to run on an otherwise idle server (with 4 Xeon 3.6 processors in 64 bit mode, 4GB of RAM, and data and log on separate RAID 5 spindles). I would still like to have something that quickly gives me total size and free space at the file level.|||

> nice report and contains a lot of useful information, but it took 2

> minutes to run on an otherwise idle server

The first time you ran it? Was that the only time you've run it? It may

have had to do some background processing and/or caching the first time.

My server is less powerful than that (virtual machine with 2 CPUs and 3 GB

allocated), and it resides 60 miles away in our data center, and the report

took 4 seconds to load on my paltry workstation (dual xeon 3.4, 2 GB). And

I use this report all the time; if it was slow by nature and this instance

wasn't a freak phenomenen, I'm sure I would have observed this issue before?

A

|||It consitently takes over 2 minutes for our main databases. I suspect it has something to do with the size of the database or number of tables - our database has over 1100 tables. When I tried it on a much smaller database, it came back within a few seconds.|||

> our database has over 1100 tables.

Ah, I see. Well, "quick" is a pretty lofty goal, then, unless you want

relatively stale data. You could run queries on the hour that store this

information into your own tables, then that query will be quick, but it

won't be up-to-the-minute.

A

|||So, in summary, if I am monitoring a SQL2000 server in SSMS 05 then there is no way for me to see the free space on my data files. AND if it's a large 2005 database I have to wait a long time for the report because it wants to give me details on every table. So much for a quick check of my systems!|||

I agree. Monitoring free space in data files is something a DBA does frequently, and so in SQL2000 Enterprise Manager I often used the Taskpad view for a quick check (even though it was buggy and would sometimes throw interface errors). I had been hunting for the same kind of quick reporting in SQL 2005 Management Studio, and thanks to this thread I figured it out... but I am STILL waiting for my first report to come up on Disk Usage, and it has been over 5 minutes now! I manage a large number of SAP databases, and this is the first one to be configured on SQL 2005 (the others are still 2000, but they will be upgraded soon). This is one of the smaller ones, at only 20 GB in size, but it still has 27,000 tables. I wonder what will happen when I move our 70 GB R/3 database onto this platform? Also, although I haven't checked this out yet, it appears that this disk usage report may be putting a certain amount of load on the server, based on anecdotal observation. That can't be good, if true.

It's true that I can get the information I want on any given single database very quickly by logging into the SAP application and running application-specific database monitor tools (and if the application can do it so quickly, why can't the Disk Usage report? After all, it's just a collection of system stored procedures like sp_spaceused with the output presented graphically). However, when trying to quickly get status on 20+ servers, it's a little tedious to log into each one individually, whereas the Taspad could move through them a little quicker (even though it's still one at a time).

Ok, after more than 10 minutes of execution time while writing this post, the Disk Usage report finally came back with something. However, the information is not what I had hoped for. It tells me "the information needed to display a summary page for the selected object is not available" and throws an error about "object reference not set to an instance of an object." It took 10 minutes to get to that?

|||

I can do you one better. I used the TaskPad the way you did -- space problems can be seen at a glance. I moved a db instance from 2000 to 2005, but we are running in 2000 compatibility mode until we can make some code changes. When I try to run the space report in Management Studio, it barks at me for being in 2000 compatibility mode. I can't hit the dbs from EM and I can't get the data in Managment Studio until I switch compatibility mode (and then I'll have a long running on-line report...lucky me).

I think in an effort to use their own framework and tools, Microsoft has taken away the beauty of quick access to data in this case. That's a lot of extra work to break something that already worked really pretty well.

|||

OK, further research uncovered the following:

http://www.sqlservercentral.com/columnists/bBaliner/quicklyviewingavailablespace.asp

I tweaked it by adding total space to the mix:

SELECT name AS NameOfFile, size/128.0 AS TotalSpaceInMB,size/128.0 -CAST(FILEPROPERTY(name, 'SpaceUsed' )AS int)/128.0 AS AvailableSpaceInMB

FROM dbo.SYSFILES

Kudos to Boris Baliner!


Free space information in Management Studio

In Enterprise Manager, the taskpad view showed me how much space is available in the data and log files. Is this information available anywhere in SSMS?

For instance, in one database EM shows me that I have 1200MB free in the data file and 400MB free in the log file. It also says, at the top of the taskpad view, that I have 0 free space in the database - I'm not sure how they relate, but in SSMS the only number that I can see is the 0. It also takes several mouse clicks and scrolling over to see the breakdown of the data and log sizes.

I agree. Monitoring free space in data files is something a DBA does frequently, and so in SQL2000 Enterprise Manager I often used the Taskpad view for a quick check (even though it was buggy and would sometimes throw interface errors). I had been hunting for the same kind of quick reporting in SQL 2005 Management Studio, and thanks to this thread I figured it out... but I am STILL waiting for my first report to come up on Disk Usage, and it has been over 5 minutes now! I manage a large number of SAP databases, and this is the first one to be configured on SQL 2005 (the others are still 2000, but they will be upgraded soon). This is one of the smaller ones, at only 20 GB in size, but it still has 27,000 tables. I wonder what will happen when I move our 70 GB R/3 database onto this platform? Also, although I haven't checked this out yet, it appears that this disk usage report may be putting a certain amount of load on the server, based on anecdotal observation. That can't be good, if true.

It's true that I can get the information I want on any given single database very quickly by logging into the SAP application and running application-specific database monitor tools (and if the application can do it so quickly, why can't the Disk Usage report? After all, it's just a collection of system stored procedures like sp_spaceused with the output presented graphically). However, when trying to quickly get status on 20+ servers, it's a little tedious to log into each one individually, whereas the Taspad could move through them a little quicker (even though it's still one at a time).

Ok, after more than 10 minutes of execution time while writing this post, the Disk Usage report finally came back with something. However, the information is not what I had hoped for. It tells me "the information needed to display a summary page for the selected object is not available" and throws an error about "object reference not set to an instance of an object." It took 10 minutes to get to that?

|||

I can do you one better. I used the TaskPad the way you did -- space problems can be seen at a glance. I moved a db instance from 2000 to 2005, but we are running in 2000 compatibility mode until we can make some code changes. When I try to run the space report in Management Studio, it barks at me for being in 2000 compatibility mode. I can't hit the dbs from EM and I can't get the data in Managment Studio until I switch compatibility mode (and then I'll have a long running on-line report...lucky me).

I think in an effort to use their own framework and tools, Microsoft has taken away the beauty of quick access to data in this case. That's a lot of extra work to break something that already worked really pretty well.

|||

OK, further research uncovered the following:

http://www.sqlservercentral.com/columnists/bBaliner/quicklyviewingavailablespace.asp

I tweaked it by adding total space to the mix:

SELECTnameAS NameOfFile,size/128.0 AS TotalSpaceInMB,size/128.0 -CAST(FILEPROPERTY(name,'SpaceUsed')ASint)/128.0 AS AvailableSpaceInMB

FROM dbo.SYSFILES

Kudos to Boris Baliner!


|||In the object browser, highlight your database. On the right pane, click on the Summary tab. (If it is not there, hit F7.) Take a look at the Report dropdown. I think you'll like the Disk Usage report a little bit better than EM's archaic taskpad view. A wrote in message news:c99645b4-1bd4-45d3-8a71-46591c4597dd@.discussions.microsoft.com...
> In Enterprise Manager, the taskpad view showed me how much space is
> available in the data and log files. Is this information available
> anywhere in SSMS? >
> For instance, in one database EM shows me that I have 1200MB free in the
> data file and 400MB free in the log file. It also says, at the top of
> the taskpad view, that I have 0 free space in the database - I'm not
> sure how they relate, but in SSMS the only number that I can see is the
> 0. It also takes several mouse clicks and scrolling over to see the
> breakdown of the data and log sizes. >
>|||Thanks for the suggestion. However, the Report dropdown is greyed out on my Summary tab. I guess that's because we didn't install Reporting Services?
|||No, I don't have reporting services installed either. Are you sure the focus in the object browser is on a database name, like I originally suggested? >> In the object browser, highlight your database. The Summary tab is context sensitive, so if in the object browser you have highlighted "assemblies" or an individual stored procedure or table or the database diagrams node or server objects, the reports dropdown will be greyed out, because there are no reports relevant to those objects. A wrote in message news:6134a1d2-8631-434a-897c-6308dc7fef63@.discussions.microsoft.com...
> Thanks for the suggestion. However, the Report dropdown is greyed out on
> my Summary tab. I guess that's because we didn't install Reporting
> Services? >
>|||You're right - I must have had the focus in the wrong place. It is a nice report and contains a lot of useful information, but it took 2 minutes to run on an otherwise idle server (with 4 Xeon 3.6 processors in 64 bit mode, 4GB of RAM, and data and log on separate RAID 5 spindles). I would still like to have something that quickly gives me total size and free space at the file level.|||

> nice report and contains a lot of useful information, but it took 2
> minutes to run on an otherwise idle server The first time you ran it? Was that the only time you've run it? It may have had to do some background processing and/or caching the first time. My server is less powerful than that (virtual machine with 2 CPUs and 3 GB allocated), and it resides 60 miles away in our data center, and the report took 4 seconds to load on my paltry workstation (dual xeon 3.4, 2 GB). And I use this report all the time; if it was slow by nature and this instance wasn't a freak phenomenen, I'm sure I would have observed this issue before? A

|||It consitently takes over 2 minutes for our main databases. I suspect it has something to do with the size of the database or number of tables - our database has over 1100 tables. When I tried it on a much smaller database, it came back within a few seconds.|||

> our database has over 1100 tables. Ah, I see. Well, "quick" is a pretty lofty goal, then, unless you want relatively stale data. You could run queries on the hour that store this information into your own tables, then that query will be quick, but it won't be up-to-the-minute. A

|||So, in summary, if I am monitoring a SQL2000 server in SSMS 05 then there is no way for me to see the free space on my data files. AND if it's a large 2005 database I have to wait a long time for the report because it wants to give me details on every table. So much for a quick check of my systems!

Free space in a filegroup.

Hi everyone,
I need to write a SP to check the available free space in a certain database
filegroup(SQL Server 2000 database).
Any help will be appreciated.
Best Regards,Hi
You may want to look at http://sqlteam.com/item.asp?ItemID=282 on
calculating sizes of tables. If you need filegroups, then sysindexes contain
s
a groupid column that you can link back to the filegroup.
John
"Sezgin Rafet" wrote:

> Hi everyone,
> I need to write a SP to check the available free space in a certain databa
se
> filegroup(SQL Server 2000 database).
> Any help will be appreciated.
>
> Best Regards,
>
>
>|||Thanks,it is a very useful SP. Meanwhile, I spent some time reading Books
Online and came up with this solution:
SELECT ([size]*8)/1024.0 AS CurrentSizeInMB,(CAST(FILEPROPERTY('file
name
',
'SpaceUsed') AS INTEGER )*8)/1024.0 AS SpaceUsedInMB FROM sysfiles WHERE
[name] = 'filename'
We use 2 filegroups containing 1 file each,so this will do for now.
Regards,
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E7BD935E-0D06-4546-8D1E-6AA3FD39C136@.microsoft.com...[vbcol=seagreen]
> Hi
> You may want to look at http://sqlteam.com/item.asp?ItemID=282 on
> calculating sizes of tables. If you need filegroups, then sysindexes
> contains
> a groupid column that you can link back to the filegroup.
> John
> "Sezgin Rafet" wrote:
>

Free space in a filegroup.

Hi everyone,
I need to write a SP to check the available free space in a certain database
filegroup(SQL Server 2000 database).
Any help will be appreciated.
Best Regards,Hi
You may want to look at http://sqlteam.com/item.asp?ItemID=282 on
calculating sizes of tables. If you need filegroups, then sysindexes contains
a groupid column that you can link back to the filegroup.
John
"Sezgin Rafet" wrote:
> Hi everyone,
> I need to write a SP to check the available free space in a certain database
> filegroup(SQL Server 2000 database).
> Any help will be appreciated.
>
> Best Regards,
>
>
>|||Thanks,it is a very useful SP. Meanwhile, I spent some time reading Books
Online and came up with this solution:
SELECT ([size]*8)/1024.0 AS CurrentSizeInMB,(CAST(FILEPROPERTY('filename',
'SpaceUsed') AS INTEGER )*8)/1024.0 AS SpaceUsedInMB FROM sysfiles WHERE
[name] = 'filename'
We use 2 filegroups containing 1 file each,so this will do for now.
Regards,
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E7BD935E-0D06-4546-8D1E-6AA3FD39C136@.microsoft.com...
> Hi
> You may want to look at http://sqlteam.com/item.asp?ItemID=282 on
> calculating sizes of tables. If you need filegroups, then sysindexes
> contains
> a groupid column that you can link back to the filegroup.
> John
> "Sezgin Rafet" wrote:
>> Hi everyone,
>> I need to write a SP to check the available free space in a certain
>> database
>> filegroup(SQL Server 2000 database).
>> Any help will be appreciated.
>>
>> Best Regards,
>>
>>

Free space in a filegroup.

Hi everyone,
I need to write a SP to check the available free space in a certain database
filegroup(SQL Server 2000 database).
Any help will be appreciated.
Best Regards,
Hi
You may want to look at http://sqlteam.com/item.asp?ItemID=282 on
calculating sizes of tables. If you need filegroups, then sysindexes contains
a groupid column that you can link back to the filegroup.
John
"Sezgin Rafet" wrote:

> Hi everyone,
> I need to write a SP to check the available free space in a certain database
> filegroup(SQL Server 2000 database).
> Any help will be appreciated.
>
> Best Regards,
>
>
>
|||Thanks,it is a very useful SP. Meanwhile, I spent some time reading Books
Online and came up with this solution:
SELECT ([size]*8)/1024.0 AS CurrentSizeInMB,(CAST(FILEPROPERTY('filename',
'SpaceUsed') AS INTEGER )*8)/1024.0 AS SpaceUsedInMB FROM sysfiles WHERE
[name] = 'filename'
We use 2 filegroups containing 1 file each,so this will do for now.
Regards,
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:E7BD935E-0D06-4546-8D1E-6AA3FD39C136@.microsoft.com...[vbcol=seagreen]
> Hi
> You may want to look at http://sqlteam.com/item.asp?ItemID=282 on
> calculating sizes of tables. If you need filegroups, then sysindexes
> contains
> a groupid column that you can link back to the filegroup.
> John
> "Sezgin Rafet" wrote:

Free Space available for use

If I have 4 GB database with 1 GB of free space (just
completed a DELETE of records). Will the space be
available for use by INSERTS? Previously, the db was
automatically growing and I hope that stops with the mass
delete that was done. Space is running low on the drive.
Does shrinking provide a benefit?Hi Micheal,
1 GB you cleared will be used for the new data addition (Inserts).
If you run the SHRINK command it shrinks your data files (Physical files)
and since you have mentioned the auto growth option the file will grow
depends up on the amount of inserts.
Thanks
Hari
MCDBA
"Michael Orechoff" <anonymous@.discussions.microsoft.com> wrote in message
news:05e601c39da8$b18a6710$a301280a@.phx.gbl...
> If I have 4 GB database with 1 GB of free space (just
> completed a DELETE of records). Will the space be
> available for use by INSERTS? Previously, the db was
> automatically growing and I hope that stops with the mass
> delete that was done. Space is running low on the drive.
> Does shrinking provide a benefit?|||Are you saying that the db was full, and you deleted a bunch or rows so you now have 1GB free space
in db? If so,
> Will the space be
> available for use by INSERTS?
Yes.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Michael Orechoff" <anonymous@.discussions.microsoft.com> wrote in message
news:05e601c39da8$b18a6710$a301280a@.phx.gbl...
> If I have 4 GB database with 1 GB of free space (just
> completed a DELETE of records). Will the space be
> available for use by INSERTS? Previously, the db was
> automatically growing and I hope that stops with the mass
> delete that was done. Space is running low on the drive.
> Does shrinking provide a benefit?