Monday, March 26, 2012
number of tempdb files?
configure in order to reduce schema lock contention? 8, or 16? I see 16
processors on the Task Manager. According to some articles dual-core CPU is
considered to be two CPUs. What about hyper-threading?
Thanks,
Lijun1) Consider (and test) turning off hyperthreading.
2) I would go with either 4 or 8 files for your tempdb, one per each true
cpu or one per core. I have seen guidance for one per cpu, but don't know
how the shared cache would really play out with dual core. Gut feeling is 4
would be best.
--
TheSQLGuru
President
Indicium Resources, Inc.
"Lijun Zhang" <sonyzhang00@.yahoo.com> wrote in message
news:u5ijH7phHHA.4904@.TK2MSFTNGP05.phx.gbl...
> On a 4 dual core, hyper threading server, how many tempdb files I should
> configure in order to reduce schema lock contention? 8, or 16? I see 16
> processors on the Task Manager. According to some articles dual-core CPU
> is
> considered to be two CPUs. What about hyper-threading?
> Thanks,
> Lijun
>
Monday, March 12, 2012
Nulls Versus Blanks PArt 2
emty strings. On the same Token the server should insert <NULLS> by default
My server was configured like that and for some reason now it is behaving
differently. There has to be some global configuration, I am not looking for
individual constraints and default values. If there is no global
configuration am I looking at some kind of bug?
Thanks
IT PHYTOSAN>>How do I configure SQL 2000 to insert <NULLS> when deleting an entry
I assume by deleting you don't mean deleting the whole row like this
DELETE table where SomeColumn =SomeValue
Are you talking about EM (Enterprise Manager) ?
If so then enter CTRL + 0 in the column and a NULL will be inserted
Denis the SQL Menace
http://sqlservercode.blogspot.com/|||> How do I configure SQL 2000 to insert <NULLS> when deleting an entry and notn">
> emty strings.
There's no such setting as this never happens. Let me explain:
If you by "deleting an entry" mean deleting a row, using the DELETE SQL comm
and, then the row is
gone and there is no place for NULL nor space.
If you mean changing the value of a column for a row, then you set this usin
g the UPDATE statement:
UPDATE tblname
SET colname = NULL
WHERE ...
So you need to dig in the application to see how it modifies the data.
Possibly you has a default constraint for a column, with NULL and that defau
lt is not an empty
string. You can refer to a default for a column in an update like:
UPDATE tblname
SET colname = DEFAULT
WHERE ...
See if you do have any default for this column using sp_help.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"IT PHYTOSAN" <ITPHYTOSAN@.discussions.microsoft.com> wrote in message
news:FD708941-A75E-4C00-8D3F-706FFD2E7744@.microsoft.com...
> How do I configure SQL 2000 to insert <NULLS> when deleting an entry and n
ot
> emty strings. On the same Token the server should insert <NULLS> by defaul
t
> My server was configured like that and for some reason now it is behaving
> differently. There has to be some global configuration, I am not looking f
or
> individual constraints and default values. If there is no global
> configuration am I looking at some kind of bug?
> Thanks
> IT PHYTOSAN|||Thanks for your help. Looking at the source of the issue, what I would reall
y
like to accomplish is that varchar and char entries treat empty strings as
<NULL>'s. When deleting a single field (using the delete button on the
keyboard in a table opended enterprise manager for example) I would like to
see a <NULL> inserted rather than an empty string. There must be a simple wa
y
of enforcing meaningfull entries in the tables.
any hints?
IT PHYTOSAN
"Tibor Karaszi" wrote:
> There's no such setting as this never happens. Let me explain:
> If you by "deleting an entry" mean deleting a row, using the DELETE SQL co
mmand, then the row is
> gone and there is no place for NULL nor space.
> If you mean changing the value of a column for a row, then you set this us
ing the UPDATE statement:
> UPDATE tblname
> SET colname = NULL
> WHERE ...
> So you need to dig in the application to see how it modifies the data.
> Possibly you has a default constraint for a column, with NULL and that def
ault is not an empty
> string. You can refer to a default for a column in an update like:
> UPDATE tblname
> SET colname = DEFAULT
> WHERE ...
> See if you do have any default for this column using sp_help.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "IT PHYTOSAN" <ITPHYTOSAN@.discussions.microsoft.com> wrote in message
> news:FD708941-A75E-4C00-8D3F-706FFD2E7744@.microsoft.com...
>|||To create NULL values from Enterprise Manager use CTRL + 0 instead of
delete
Hightlight all the text and then press CTRL + 0
Or switch to Query analyzer and write UPDATE statements like Tibor
showed you that will also give you more control and you will know
what's going on
Denis the SQL Menace
http://sqlservercode.blogspot.com/|||I am aware of CTRL + 0 but it does not fix my problem. Right now my client
(InfoPath) will insert empty strings in tables that have no entry and does
not recognize that this field is required but empty. I would like SQL server
to treat empty strings like <NULLS> as mentioned.
Thanks
IT PHYTOSAN
"SQL" wrote:
> To create NULL values from Enterprise Manager use CTRL + 0 instead of
> delete
> Hightlight all the text and then press CTRL + 0
> Or switch to Query analyzer and write UPDATE statements like Tibor
> showed you that will also give you more control and you will know
> what's going on
>
> Denis the SQL Menace
> http://sqlservercode.blogspot.com/
>|||create a trigger on the table|||that won't be recognized by InfoPath as required field. The trigger will
throw an error but for me that's after the fact.
Thanks
IT PHYTOSAN
"SQL" wrote:
> create a trigger on the table
>|||As suggested, this is an application (InfoPath) problem.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"IT PHYTOSAN" <ITPHYTOSAN@.discussions.microsoft.com> wrote in message
news:0AF6F82F-CC92-4F15-A988-779391530969@.microsoft.com...[vbcol=seagreen]
>I am aware of CTRL + 0 but it does not fix my problem. Right now my client
> (InfoPath) will insert empty strings in tables that have no entry and does
> not recognize that this field is required but empty. I would like SQL serv
er
> to treat empty strings like <NULLS> as mentioned.
> Thanks
> IT PHYTOSAN
> "SQL" wrote:
>|||Wow I am really stuck now, they can't help me over there either. Any clues?
Thanks anyway
IT PHYTOSAN
"Tibor Karaszi" wrote:
> As suggested, this is an application (InfoPath) problem.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "IT PHYTOSAN" <ITPHYTOSAN@.discussions.microsoft.com> wrote in message
> news:0AF6F82F-CC92-4F15-A988-779391530969@.microsoft.com...
>
Nulls Versus Blanks PArt 2
emty strings. On the same Token the server should insert <NULLS> by default
My server was configured like that and for some reason now it is behaving
differently. There has to be some global configuration, I am not looking for
individual constraints and default values. If there is no global
configuration am I looking at some kind of bug?
Thanks
IT PHYTOSAN>>How do I configure SQL 2000 to insert <NULLS> when deleting an entry
I assume by deleting you don't mean deleting the whole row like this
DELETE table where SomeColumn =SomeValue
Are you talking about EM (Enterprise Manager) ?
If so then enter CTRL + 0 in the column and a NULL will be inserted
Denis the SQL Menace
http://sqlservercode.blogspot.com/|||> How do I configure SQL 2000 to insert <NULLS> when deleting an entry and not
> emty strings.
There's no such setting as this never happens. Let me explain:
If you by "deleting an entry" mean deleting a row, using the DELETE SQL command, then the row is
gone and there is no place for NULL nor space.
If you mean changing the value of a column for a row, then you set this using the UPDATE statement:
UPDATE tblname
SET colname = NULL
WHERE ...
So you need to dig in the application to see how it modifies the data.
Possibly you has a default constraint for a column, with NULL and that default is not an empty
string. You can refer to a default for a column in an update like:
UPDATE tblname
SET colname = DEFAULT
WHERE ...
See if you do have any default for this column using sp_help.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"IT PHYTOSAN" <ITPHYTOSAN@.discussions.microsoft.com> wrote in message
news:FD708941-A75E-4C00-8D3F-706FFD2E7744@.microsoft.com...
> How do I configure SQL 2000 to insert <NULLS> when deleting an entry and not
> emty strings. On the same Token the server should insert <NULLS> by default
> My server was configured like that and for some reason now it is behaving
> differently. There has to be some global configuration, I am not looking for
> individual constraints and default values. If there is no global
> configuration am I looking at some kind of bug?
> Thanks
> IT PHYTOSAN|||Thanks for your help. Looking at the source of the issue, what I would really
like to accomplish is that varchar and char entries treat empty strings as
<NULL>'s. When deleting a single field (using the delete button on the
keyboard in a table opended enterprise manager for example) I would like to
see a <NULL> inserted rather than an empty string. There must be a simple way
of enforcing meaningfull entries in the tables.
any hints?
IT PHYTOSAN
"Tibor Karaszi" wrote:
> > How do I configure SQL 2000 to insert <NULLS> when deleting an entry and not
> > emty strings.
> There's no such setting as this never happens. Let me explain:
> If you by "deleting an entry" mean deleting a row, using the DELETE SQL command, then the row is
> gone and there is no place for NULL nor space.
> If you mean changing the value of a column for a row, then you set this using the UPDATE statement:
> UPDATE tblname
> SET colname = NULL
> WHERE ...
> So you need to dig in the application to see how it modifies the data.
> Possibly you has a default constraint for a column, with NULL and that default is not an empty
> string. You can refer to a default for a column in an update like:
> UPDATE tblname
> SET colname = DEFAULT
> WHERE ...
> See if you do have any default for this column using sp_help.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "IT PHYTOSAN" <ITPHYTOSAN@.discussions.microsoft.com> wrote in message
> news:FD708941-A75E-4C00-8D3F-706FFD2E7744@.microsoft.com...
> > How do I configure SQL 2000 to insert <NULLS> when deleting an entry and not
> > emty strings. On the same Token the server should insert <NULLS> by default
> > My server was configured like that and for some reason now it is behaving
> > differently. There has to be some global configuration, I am not looking for
> > individual constraints and default values. If there is no global
> > configuration am I looking at some kind of bug?
> >
> > Thanks
> >
> > IT PHYTOSAN
>|||To create NULL values from Enterprise Manager use CTRL + 0 instead of
delete
Hightlight all the text and then press CTRL + 0
Or switch to Query analyzer and write UPDATE statements like Tibor
showed you that will also give you more control and you will know
what's going on
Denis the SQL Menace
http://sqlservercode.blogspot.com/|||I am aware of CTRL + 0 but it does not fix my problem. Right now my client
(InfoPath) will insert empty strings in tables that have no entry and does
not recognize that this field is required but empty. I would like SQL server
to treat empty strings like <NULLS> as mentioned.
Thanks
IT PHYTOSAN
"SQL" wrote:
> To create NULL values from Enterprise Manager use CTRL + 0 instead of
> delete
> Hightlight all the text and then press CTRL + 0
> Or switch to Query analyzer and write UPDATE statements like Tibor
> showed you that will also give you more control and you will know
> what's going on
>
> Denis the SQL Menace
> http://sqlservercode.blogspot.com/
>|||create a trigger on the table|||that won't be recognized by InfoPath as required field. The trigger will
throw an error but for me that's after the fact.
Thanks
IT PHYTOSAN
"SQL" wrote:
> create a trigger on the table
>|||As suggested, this is an application (InfoPath) problem.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"IT PHYTOSAN" <ITPHYTOSAN@.discussions.microsoft.com> wrote in message
news:0AF6F82F-CC92-4F15-A988-779391530969@.microsoft.com...
>I am aware of CTRL + 0 but it does not fix my problem. Right now my client
> (InfoPath) will insert empty strings in tables that have no entry and does
> not recognize that this field is required but empty. I would like SQL server
> to treat empty strings like <NULLS> as mentioned.
> Thanks
> IT PHYTOSAN
> "SQL" wrote:
>> To create NULL values from Enterprise Manager use CTRL + 0 instead of
>> delete
>> Hightlight all the text and then press CTRL + 0
>> Or switch to Query analyzer and write UPDATE statements like Tibor
>> showed you that will also give you more control and you will know
>> what's going on
>>
>> Denis the SQL Menace
>> http://sqlservercode.blogspot.com/
>>|||Wow I am really stuck now, they can't help me over there either. Any clues?
Thanks anyway
IT PHYTOSAN
"Tibor Karaszi" wrote:
> As suggested, this is an application (InfoPath) problem.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "IT PHYTOSAN" <ITPHYTOSAN@.discussions.microsoft.com> wrote in message
> news:0AF6F82F-CC92-4F15-A988-779391530969@.microsoft.com...
> >I am aware of CTRL + 0 but it does not fix my problem. Right now my client
> > (InfoPath) will insert empty strings in tables that have no entry and does
> > not recognize that this field is required but empty. I would like SQL server
> > to treat empty strings like <NULLS> as mentioned.
> >
> > Thanks
> >
> > IT PHYTOSAN
> >
> > "SQL" wrote:
> >
> >> To create NULL values from Enterprise Manager use CTRL + 0 instead of
> >> delete
> >> Hightlight all the text and then press CTRL + 0
> >> Or switch to Query analyzer and write UPDATE statements like Tibor
> >> showed you that will also give you more control and you will know
> >> what's going on
> >>
> >>
> >> Denis the SQL Menace
> >> http://sqlservercode.blogspot.com/
> >>
> >>
>|||You may use a INSTEAD OF type of trigger to do your data validation.
"IT PHYTOSAN" <ITPHYTOSAN@.discussions.microsoft.com> wrote in message
news:E1BDC16A-E880-4919-95CE-FCEA4DE3EC7C@.microsoft.com...
> that won't be recognized by InfoPath as required field. The trigger will
> throw an error but for me that's after the fact.
> Thanks
> IT PHYTOSAN
> "SQL" wrote:
>> create a trigger on the table
>>|||I suggest you open a case with MS Support. If you don't know what caused the change, or even if the
change was at the database level, it is hard to suggest anything. If the change was at the database
level, and you don't know who did it any what they did and don't know what the database definition
is supposed to look like, it is hard to tell anything. MS Support should be able to track this down
for you.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"IT PHYTOSAN" <ITPHYTOSAN@.discussions.microsoft.com> wrote in message
news:3D54C44E-093D-4A78-997F-7E49AECB4D12@.microsoft.com...
> Wow I am really stuck now, they can't help me over there either. Any clues?
> Thanks anyway
> IT PHYTOSAN
> "Tibor Karaszi" wrote:
>> As suggested, this is an application (InfoPath) problem.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "IT PHYTOSAN" <ITPHYTOSAN@.discussions.microsoft.com> wrote in message
>> news:0AF6F82F-CC92-4F15-A988-779391530969@.microsoft.com...
>> >I am aware of CTRL + 0 but it does not fix my problem. Right now my client
>> > (InfoPath) will insert empty strings in tables that have no entry and does
>> > not recognize that this field is required but empty. I would like SQL server
>> > to treat empty strings like <NULLS> as mentioned.
>> >
>> > Thanks
>> >
>> > IT PHYTOSAN
>> >
>> > "SQL" wrote:
>> >
>> >> To create NULL values from Enterprise Manager use CTRL + 0 instead of
>> >> delete
>> >> Hightlight all the text and then press CTRL + 0
>> >> Or switch to Query analyzer and write UPDATE statements like Tibor
>> >> showed you that will also give you more control and you will know
>> >> what's going on
>> >>
>> >>
>> >> Denis the SQL Menace
>> >> http://sqlservercode.blogspot.com/
>> >>
>> >>
>>|||That is good adivce. I'll do that and post back if the solution can be found.
Thans again for your help to both of you.
IT PHYTOSAN
"Tibor Karaszi" wrote:
> I suggest you open a case with MS Support. If you don't know what caused the change, or even if the
> change was at the database level, it is hard to suggest anything. If the change was at the database
> level, and you don't know who did it any what they did and don't know what the database definition
> is supposed to look like, it is hard to tell anything. MS Support should be able to track this down
> for you.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "IT PHYTOSAN" <ITPHYTOSAN@.discussions.microsoft.com> wrote in message
> news:3D54C44E-093D-4A78-997F-7E49AECB4D12@.microsoft.com...
> > Wow I am really stuck now, they can't help me over there either. Any clues?
> >
> > Thanks anyway
> >
> > IT PHYTOSAN
> >
> > "Tibor Karaszi" wrote:
> >
> >> As suggested, this is an application (InfoPath) problem.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "IT PHYTOSAN" <ITPHYTOSAN@.discussions.microsoft.com> wrote in message
> >> news:0AF6F82F-CC92-4F15-A988-779391530969@.microsoft.com...
> >> >I am aware of CTRL + 0 but it does not fix my problem. Right now my client
> >> > (InfoPath) will insert empty strings in tables that have no entry and does
> >> > not recognize that this field is required but empty. I would like SQL server
> >> > to treat empty strings like <NULLS> as mentioned.
> >> >
> >> > Thanks
> >> >
> >> > IT PHYTOSAN
> >> >
> >> > "SQL" wrote:
> >> >
> >> >> To create NULL values from Enterprise Manager use CTRL + 0 instead of
> >> >> delete
> >> >> Hightlight all the text and then press CTRL + 0
> >> >> Or switch to Query analyzer and write UPDATE statements like Tibor
> >> >> showed you that will also give you more control and you will know
> >> >> what's going on
> >> >>
> >> >>
> >> >> Denis the SQL Menace
> >> >> http://sqlservercode.blogspot.com/
> >> >>
> >> >>
> >>
> >>
>
Monday, February 20, 2012
Null multi-value parameters
I'm using integer multi-value parameters. I can't set the parameter to allow null, and when I preview the report and leave the parameter blank, it tells me to enter at least one value. I tried it with string parameters, and the report just doesn't run in preview if you don't enter any values, even if you choose "allow blank".
How do you specify a multi-value parameter to allow "empty" or "null"?Hope this will help you,
use TSQL for mutiple value parameter
select NULL as ID
union
select ID from table1|||I'm talking about Report Parameters in SSRS. Your SQL doesn't even use any parameters. How can this help?
|||Yes, I guess that he was also talkling about :-) Define a dataset which is filled with the parameters you want to display and in addition the NULL parameter (with the UNION mentioned above) You can also use something like "Select a value" as your display value for the NULL parameter. Then set the default value to non-queried and set the value to NULL. The Report will then open with the Report parameter list and set the "Select a value" value. In qour query you will have to handle the NULL appearance like the following mentioned example
WHERE
@.YourParameter IS NULL OR
YourColumn IN (@.YourParameter)
Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Ah, I see. This is for "Available values" in the parameter configuration. However, this wouldn't work for me, because when I deploy my reports the parameters are configured by a separate program, which then passes them to the webservice.
I did try what you suggested, and it didn't work as you describe. In preview, the values from the table were available to choose from, but the null value I created with UNION was not there.
I'm not sure how this would work anyway, because the parameter configuration is actually set to not "Allow null". So even if you could pick a null you might still get an error.
What I need is to be able to check "Allow null" for a multi-value parameter, but it gives an error when I try that. Does anyone even know why this is not allowed for multi-value parameters? It seems like a last-minute hack to protect some coding flaw.
|||then file it as a bug on connect.microsoft.com . The RS team keeps track of the posted bugs there.
Jens K. Suessmeyer.
http://www.sqlserver2005.de
NULL Exception Configuring SRS 2005
the Report Server Configuration Manager to, well, configure things. The
server status was green. When to the "Report Server Virtual Directory" and
clicked "New". It seemed to do it's thing, then all of a sudden the tool
just exited without any messages.
Now when we go back into the tool, the Report Server Virtual Directory icon
is green, but when we try to go to that tab, we get the following error:
There was an error while switching panels. The most likely cause is an
error retrieving WMI properties. The exception details are:
Object reference not set to an instance of an object.
We have several web sites defined in IIS (including having SBS installed
w/Sharepoint). I was unable to find the ReportServer virtual directory
created in any of them. Nor where the SRS app pools created. The Report
Server Virtual Directory icon is grayed out.
Any suggestions on how to proceed to resolve this error?
Thanks,
ChrisOn Feb 16, 7:11 am, "Chris Walls" <chwal...@.community.nospam> wrote:
> We just installed SQL Server 2005 w/SRS on a Windows 2003 box. I fired up
> the Report Server Configuration Manager to, well, configure things. The
> server status was green. When to the "Report Server Virtual Directory" and
> clicked "New". It seemed to do it's thing, then all of a sudden the tool
> just exited without any messages.
> Now when we go back into the tool, the Report Server Virtual Directory icon
> is green, but when we try to go to that tab, we get the following error:
> There was an error while switching panels. The most likely cause is an
> error retrieving WMI properties. The exception details are:
> Object reference not set to an instance of an object.
> We have several web sites defined in IIS (including having SBS installed
> w/Sharepoint). I was unable to find the ReportServer virtual directory
> created in any of them. Nor where the SRS app pools created. The Report
> Server Virtual Directory icon is grayed out.
> Any suggestions on how to proceed to resolve this error?
> Thanks,
> Chris
One thought would be to check the EventViewer for SSRS/IIS-related
errors. They might lead you to a more informative error. Also, you
might check the SSRS log files, if SSRS was installed to that point.
They are usually located in this path: C:\Program Files\Microsoft SQL
Server\<MSSQL.2 -or- MSSQL.3>\Reporting Services\LogFiles. As a last
resort, you could try uninstalling and reinstalling SSRS/SQL Server.
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Chris,
I don't know if this is related to your issue, but I just ran into the same
problem in Reporting Services Configuration Manager.
After Setting up SharePoint Integration the Report Manager section is grayed
out because Report Manager isn't needed in SharePoint integrated mode. When
I clicked on that section I saw a message saying that it's not supported and
that I should uninstall it to reduce the security footprint of the server.
It sounded like a good idea so I uninstalled the Report Manager portion of
SRS. Well that lead to the error you're seeing.
I reinstalled Report Manager and now I can get back into the Report Server
Virtual Directory section.
Seems like a bug to me.
Is Report Manager installed on this machine, and can you get into that
section of the Configuration Manager?
-Alex
"Chris Walls" wrote:
> We just installed SQL Server 2005 w/SRS on a Windows 2003 box. I fired up
> the Report Server Configuration Manager to, well, configure things. The
> server status was green. When to the "Report Server Virtual Directory" and
> clicked "New". It seemed to do it's thing, then all of a sudden the tool
> just exited without any messages.
> Now when we go back into the tool, the Report Server Virtual Directory icon
> is green, but when we try to go to that tab, we get the following error:
> There was an error while switching panels. The most likely cause is an
> error retrieving WMI properties. The exception details are:
> Object reference not set to an instance of an object.
> We have several web sites defined in IIS (including having SBS installed
> w/Sharepoint). I was unable to find the ReportServer virtual directory
> created in any of them. Nor where the SRS app pools created. The Report
> Server Virtual Directory icon is grayed out.
> Any suggestions on how to proceed to resolve this error?
> Thanks,
> Chris
>
>