hi guys,
sp_spaceused 'table1'
I have two ntext columns in 'table1',
by default, is sp_spaceused calculating space for ntext too?Hi Britney
All columns are included. You can see this for yourself:
use pubs
go
select * into newtitles from titles
go
exec sp_spaceused newtitles, @.updateusage= true
go
alter table newtitles add info ntext
go
update newtitles set info = replicate(title, 100)
go
exec sp_spaceused newtitles, @.updateusage= true
go
HTH
Kalen Delaney
"Britney" <britneychen_2001@.yahoo.com> wrote in message
news:emryCsOpFHA.1044@.tk2msftngp13.phx.gbl...
> hi guys,
>
> sp_spaceused 'table1'
> I have two ntext columns in 'table1',
> by default, is sp_spaceused calculating space for ntext too?
>
>|||When NTEXT column is NULL, how come it still takes some spaces?
"Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
news:ODCxkYQpFHA.3828@.TK2MSFTNGP12.phx.gbl...
> Hi Britney
> All columns are included. You can see this for yourself:
> use pubs
> go
> select * into newtitles from titles
> go
> exec sp_spaceused newtitles, @.updateusage= true
> go
> alter table newtitles add info ntext
> go
> update newtitles set info = replicate(title, 100)
> go
> exec sp_spaceused newtitles, @.updateusage= true
> go
> HTH
> Kalen Delaney
>
> "Britney" <britneychen_2001@.yahoo.com> wrote in message
> news:emryCsOpFHA.1044@.tk2msftngp13.phx.gbl...
>
>|||Kevin
LOB data (type text, ntext and image) is by default stored on separate pages
outside the data rows. As soon as you update any rows with LOB data to
anything, even null, SQL Server will allocate at least 2 additional pages to
start keeping track of that data.
FYI, for ANY fixed length data column, NULLs will take space. So a char(100)
that contains NULL will take the full 100 bytes.
HTH
Kalen Delaney
www.solidqualitylearning.com
"kevin" <pearl_77@.hotmail.com> wrote in message
news:%23OP4VFYpFHA.3380@.TK2MSFTNGP12.phx.gbl...
> When NTEXT column is NULL, how come it still takes some spaces?
>
>
> "Kalen Delaney" <replies@.public_newsgroups.com> wrote in message
> news:ODCxkYQpFHA.3828@.TK2MSFTNGP12.phx.gbl...
>
>
Showing posts with label default. Show all posts
Showing posts with label default. Show all posts
Tuesday, March 27, 2012
Monday, March 19, 2012
errors setting up SQL Mail
I get the following error when I test my SQL Mail configuration. MS Outlook is the default mail client so I'm not sure what else could be wrong:
" Error 18030 : xp_test_mapi_profile : Either there is no default mail
client or the current mail client cannot fullfill the messaging request.
Please run Microsoft outlook and set it as the default mail client"
Thanks.
JoeI know there was a bug with the length of a profile - how long is your profile ? Also, have you started the mail service using xp_startmail ? When are you receiving this message ?|||From Ent Mgr / Support Services / SQL Mail / properties I type in what I think is the profile (DBA). (I have set up a mail account in Outlook called DBA.) I get the error when I press the TEST button.
What mail service are you referring to and how do I knkow if it's running?|||More info:
When I bring up the SQL Mail/propertes I should see a drop down menu with all the profiles listed. I don't see anything listed even though I have created a profile. This appears to be my problem - why isn't SQL Mail recognizing the profile I created in Outlook?
I can send and receive email thru Outlook just fine.|||I just bounced the MSSQLServer service and the following profile appeared in the drop down list in SQL Mail/propertes: "Microsoft Outlook Internet Settings". The test button then worked. I'm not sure why the DBA profile doesn't appear but I think I may be ok.
" Error 18030 : xp_test_mapi_profile : Either there is no default mail
client or the current mail client cannot fullfill the messaging request.
Please run Microsoft outlook and set it as the default mail client"
Thanks.
JoeI know there was a bug with the length of a profile - how long is your profile ? Also, have you started the mail service using xp_startmail ? When are you receiving this message ?|||From Ent Mgr / Support Services / SQL Mail / properties I type in what I think is the profile (DBA). (I have set up a mail account in Outlook called DBA.) I get the error when I press the TEST button.
What mail service are you referring to and how do I knkow if it's running?|||More info:
When I bring up the SQL Mail/propertes I should see a drop down menu with all the profiles listed. I don't see anything listed even though I have created a profile. This appears to be my problem - why isn't SQL Mail recognizing the profile I created in Outlook?
I can send and receive email thru Outlook just fine.|||I just bounced the MSSQLServer service and the following profile appeared in the drop down list in SQL Mail/propertes: "Microsoft Outlook Internet Settings". The test button then worked. I'm not sure why the DBA profile doesn't appear but I think I may be ok.
Wednesday, March 7, 2012
Errorlog retention
I am trying to change the default number of SQL errorlogs from 6 to 12. Does anyone know how to change that?EM>Management>Error Logs>Right click>Configure|||2 ways:
GUI - right-mouse click on SQL Server Logs under Management and select Configure
TSQL - ...forgot...looking...|||Thanks. looks like it issues this behind the scenes: xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorlogs', REG_DWORD, 12
That will be helpful so I don't have to click 500 times for 100 servers.|||Thanks. looks like it issues this behind the scenes: xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorlogs', REG_DWORD, 12
That will be helpful so I don't have to click 500 times for 100 servers.|||Thanks. looks like it issues this behind the scenes: xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorlogs', REG_DWORD, 12
That will be helpful so I don't have to click 500 times for 100 servers.|||Almost forgot about this post! Here's a TSQL way of doing it (requires permissions, but I guess you're the admin, so go get it ;)):
xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorlogs', REG_DWORD, <put_your_number_here>|||Yup, you beat me.
GUI - right-mouse click on SQL Server Logs under Management and select Configure
TSQL - ...forgot...looking...|||Thanks. looks like it issues this behind the scenes: xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorlogs', REG_DWORD, 12
That will be helpful so I don't have to click 500 times for 100 servers.|||Thanks. looks like it issues this behind the scenes: xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorlogs', REG_DWORD, 12
That will be helpful so I don't have to click 500 times for 100 servers.|||Thanks. looks like it issues this behind the scenes: xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorlogs', REG_DWORD, 12
That will be helpful so I don't have to click 500 times for 100 servers.|||Almost forgot about this post! Here's a TSQL way of doing it (requires permissions, but I guess you're the admin, so go get it ;)):
xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\MSSQLServer\MSSQLServer', N'NumErrorlogs', REG_DWORD, <put_your_number_here>|||Yup, you beat me.
Subscribe to:
Posts (Atom)