Showing posts with label space. Show all posts
Showing posts with label space. Show all posts

Wednesday, March 28, 2012

newbie question : negative unallocated space

What is the significance of having - (negative) unallocated space?
I have a database which has 5 database files.
db1_data.mdf space allocated = 100 MB
db1_1_data.ndf space allocated =7.5 GB
db1_2_data.ndf space allocated =7.5 GB
db1_3_data.ndf space allocated =7.5 GB
db1_4_data.ndf space allocated =7.5 GB
Transaction Log space allocated is 7.065 GB
Ent Manager shows size is 37164.45 MB and available space = 2484.77 MB
sp_spaceused result :
unallocated space = -4350.21 MB
reserved = 35277016 KB data = 18001184 KB index size = 6677840 KB unused =
10597992 KB
Thanks,
I run dbcc updateusage and sp_spaceused and got the correct info.
Thanks,
"winnetka" <winnetka@.netscape.net> wrote in message
news:46Ibd.7787$jo2.5300@.twister.socal.rr.com...
> What is the significance of having - (negative) unallocated space?
> I have a database which has 5 database files.
> db1_data.mdf space allocated = 100 MB
> db1_1_data.ndf space allocated =7.5 GB
> db1_2_data.ndf space allocated =7.5 GB
> db1_3_data.ndf space allocated =7.5 GB
> db1_4_data.ndf space allocated =7.5 GB
> Transaction Log space allocated is 7.065 GB
> Ent Manager shows size is 37164.45 MB and available space = 2484.77 MB
> sp_spaceused result :
> unallocated space = -4350.21 MB
> reserved = 35277016 KB data = 18001184 KB index size = 6677840 KB unused
=
> 10597992 KB
> Thanks,
>
>
>
|||This is because the information about sizes are estimates which are kept up
to date periodically... Running dbcc updateusage or sp_spaceused
@.updateusage=true will force SQL to re-evaluate and update the values.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"winnetka" <winnetka@.netscape.net> wrote in message
news:46Ibd.7787$jo2.5300@.twister.socal.rr.com...
> What is the significance of having - (negative) unallocated space?
> I have a database which has 5 database files.
> db1_data.mdf space allocated = 100 MB
> db1_1_data.ndf space allocated =7.5 GB
> db1_2_data.ndf space allocated =7.5 GB
> db1_3_data.ndf space allocated =7.5 GB
> db1_4_data.ndf space allocated =7.5 GB
> Transaction Log space allocated is 7.065 GB
> Ent Manager shows size is 37164.45 MB and available space = 2484.77 MB
> sp_spaceused result :
> unallocated space = -4350.21 MB
> reserved = 35277016 KB data = 18001184 KB index size = 6677840 KB unused
=
> 10597992 KB
> Thanks,
>
>
>

newbie question : negative unallocated space

What is the significance of having - (negative) unallocated space?
I have a database which has 5 database files.
db1_data.mdf space allocated = 100 MB
db1_1_data.ndf space allocated =7.5 GB
db1_2_data.ndf space allocated =7.5 GB
db1_3_data.ndf space allocated =7.5 GB
db1_4_data.ndf space allocated =7.5 GB
Transaction Log space allocated is 7.065 GB
Ent Manager shows size is 37164.45 MB and available space = 2484.77 MB
sp_spaceused result :
unallocated space = -4350.21 MB
reserved = 35277016 KB data = 18001184 KB index size = 6677840 KB unused =
10597992 KB
Thanks,I run dbcc updateusage and sp_spaceused and got the correct info.
Thanks,
"winnetka" <winnetka@.netscape.net> wrote in message
news:46Ibd.7787$jo2.5300@.twister.socal.rr.com...
> What is the significance of having - (negative) unallocated space?
> I have a database which has 5 database files.
> db1_data.mdf space allocated = 100 MB
> db1_1_data.ndf space allocated =7.5 GB
> db1_2_data.ndf space allocated =7.5 GB
> db1_3_data.ndf space allocated =7.5 GB
> db1_4_data.ndf space allocated =7.5 GB
> Transaction Log space allocated is 7.065 GB
> Ent Manager shows size is 37164.45 MB and available space = 2484.77 MB
> sp_spaceused result :
> unallocated space = -4350.21 MB
> reserved = 35277016 KB data = 18001184 KB index size = 6677840 KB unused
=
> 10597992 KB
> Thanks,
>
>
>|||This is because the information about sizes are estimates which are kept up
to date periodically... Running dbcc updateusage or sp_spaceused
@.updateusage=true will force SQL to re-evaluate and update the values.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"winnetka" <winnetka@.netscape.net> wrote in message
news:46Ibd.7787$jo2.5300@.twister.socal.rr.com...
> What is the significance of having - (negative) unallocated space?
> I have a database which has 5 database files.
> db1_data.mdf space allocated = 100 MB
> db1_1_data.ndf space allocated =7.5 GB
> db1_2_data.ndf space allocated =7.5 GB
> db1_3_data.ndf space allocated =7.5 GB
> db1_4_data.ndf space allocated =7.5 GB
> Transaction Log space allocated is 7.065 GB
> Ent Manager shows size is 37164.45 MB and available space = 2484.77 MB
> sp_spaceused result :
> unallocated space = -4350.21 MB
> reserved = 35277016 KB data = 18001184 KB index size = 6677840 KB unused
=
> 10597992 KB
> Thanks,
>
>
>

newbie question : negative unallocated space

What is the significance of having - (negative) unallocated space?
I have a database which has 5 database files.
db1_data.mdf space allocated = 100 MB
db1_1_data.ndf space allocated =7.5 GB
db1_2_data.ndf space allocated =7.5 GB
db1_3_data.ndf space allocated =7.5 GB
db1_4_data.ndf space allocated =7.5 GB
Transaction Log space allocated is 7.065 GB
Ent Manager shows size is 37164.45 MB and available space = 2484.77 MB
sp_spaceused result :
unallocated space = -4350.21 MB
reserved = 35277016 KB data = 18001184 KB index size = 6677840 KB unused = 10597992 KB
Thanks,I run dbcc updateusage and sp_spaceused and got the correct info.
Thanks,
"winnetka" <winnetka@.netscape.net> wrote in message
news:46Ibd.7787$jo2.5300@.twister.socal.rr.com...
> What is the significance of having - (negative) unallocated space?
> I have a database which has 5 database files.
> db1_data.mdf space allocated = 100 MB
> db1_1_data.ndf space allocated =7.5 GB
> db1_2_data.ndf space allocated =7.5 GB
> db1_3_data.ndf space allocated =7.5 GB
> db1_4_data.ndf space allocated =7.5 GB
> Transaction Log space allocated is 7.065 GB
> Ent Manager shows size is 37164.45 MB and available space = 2484.77 MB
> sp_spaceused result :
> unallocated space = -4350.21 MB
> reserved = 35277016 KB data = 18001184 KB index size = 6677840 KB unused
=> 10597992 KB
> Thanks,
>
>
>|||This is because the information about sizes are estimates which are kept up
to date periodically... Running dbcc updateusage or sp_spaceused
@.updateusage=true will force SQL to re-evaluate and update the values.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"winnetka" <winnetka@.netscape.net> wrote in message
news:46Ibd.7787$jo2.5300@.twister.socal.rr.com...
> What is the significance of having - (negative) unallocated space?
> I have a database which has 5 database files.
> db1_data.mdf space allocated = 100 MB
> db1_1_data.ndf space allocated =7.5 GB
> db1_2_data.ndf space allocated =7.5 GB
> db1_3_data.ndf space allocated =7.5 GB
> db1_4_data.ndf space allocated =7.5 GB
> Transaction Log space allocated is 7.065 GB
> Ent Manager shows size is 37164.45 MB and available space = 2484.77 MB
> sp_spaceused result :
> unallocated space = -4350.21 MB
> reserved = 35277016 KB data = 18001184 KB index size = 6677840 KB unused
=> 10597992 KB
> Thanks,
>
>
>sql

Wednesday, March 21, 2012

Newbie Problem

I'm trying to use the following

SELECT
SPACE(20 - LEN(Extension)) + Extension AS Ext,
StartDateTime,
SPACE(9 - LEN(Duration)) + Duration AS Dur,
SPACE(20 - LEN(ClipNumber)) + ClipNumber AS Dial,
CONVERT(char(10)Cost) + AS Co

FROM SMDROUT

WHERE Flag = 'O'

Cost is a money type
StartDateTime is a date field and is changed to two char fields during the
transformation

However, i get the error
Error description : deferred prepare could not be completed
statements could not be prepared
line 6: incorrect syntax near extension

Any help would be appreciated!Try this:

SELECT
SPACE(20 - LEN([Extension])) + [Extension] AS Ext,
StartDateTime,
SPACE(9 - LEN(Duration)) + Duration AS Dur,
SPACE(20 - LEN(ClipNumber)) + ClipNumber AS Dial,
CONVERT(char(10), Cost) AS Co

FROM SMDROUT

WHERE Flag = 'O'|||That worked great thanks

i ended up modifying it so it is now

SELECT
CONVERT(char(20), [Extension]) AS Ext,
StartDateTime,
CONVERT(char(9), Duration) AS Dur,
CONVERT(char(10), Cost) AS Co,
CONVERT(char(20), DialledDigit) AS Dial
FROM SMDROUT
WHERE (Flag = 'O')

this seems to make the formatting work better - however my output looks like this:

201 ,123 , ,20021230,000000,0 , 0.00,

and i need double quotes round each field

"201 ","123 ", etc

is there anyway to do this? double quotes are set to be the Text Qualifier in the properties of the export file but it doesnt seem to be putting the quotes in|||Just to give you the idea:

SELECT
'"' + CONVERT(char(20), [Extension]) + '"' AS Ext,
...|||That worked great - someone tried to tell me something similar before but i have now worked out that "" is different from '"' and '''' !!

Thanks for your help