Showing posts with label verify. Show all posts
Showing posts with label verify. Show all posts

Monday, March 19, 2012

How can we verify the Clustering algorithm models?

Hi, all here,

Since we are not able to use accuracy chart for Clustering algorithms there. So how can we verify the accuracy of clustering algorithm models here in terms of its classification and regression tasks?

Thank you very much in advance for your guidance and advices for that.

With best regards,

Yours sincerely,

Actaully, you are able to use accuracy chart if you define any columns as predictable for the clustering model. You can verify this by using the Targeted Mailing data set from the Adventure Works DW. You can create a Microsoft Clustering model and set the bike buyer as predict. After you process your model, you will be able to get lift chart, profit chart and classification matrix for your clustering model.

Good luck,

|||

Of course, the strength of clustering is to find intrinsic categories in your data to allow you understand your data better. You can use Cluster Diagram, cluster profiles, cluster characteristics and Cluster discrimination to explore your data. As a domain expert, this tools should also help you validate the quality of the resulting clusters.

We have different clustering algorithms, such as: K-Mean and EM, etc. You can also use our live sample Clustering Art to test and try different clustering algorithms. This will help you understand each algorithm better. If you feel like it, you could also compose your own data set with interesting categories, and see whether a specific clustering algorithm can successfully locate them.

Good luck,

|||

Hi, Yimin Wu,

Thank you very much indeed.

With best regards,

Yours sincerely,

|||

You can also do a

SELECT TOP 1 MSOLAP_NODE_SCORE FROM MyClusterModel.CONTENT

To get a number as to how well the model clusters the training cases. This number is really only comparable between models built on the same dataset and if you tried to use it between disparate models the comparison would be meaningless.

A better way to determine cluster "accuracy" is to create a test set and then do an average of the PredictCaseLikelihood() of all the cases in the testing set. The higher the result, the better the cluster model works against new data.

|||

Hi, Jamie, thanks a lot for your guidance. Very helpful.

With best regards,

Yours sincerely,

How can we verify the Clustering algorithm models?

Hi, all here,

Since we are not able to use accuracy chart for Clustering algorithms there. So how can we verify the accuracy of clustering algorithm models here in terms of its classification and regression tasks?

Thank you very much in advance for your guidance and advices for that.

With best regards,

Yours sincerely,

Actaully, you are able to use accuracy chart if you define any columns as predictable for the clustering model. You can verify this by using the Targeted Mailing data set from the Adventure Works DW. You can create a Microsoft Clustering model and set the bike buyer as predict. After you process your model, you will be able to get lift chart, profit chart and classification matrix for your clustering model.

Good luck,

|||

Of course, the strength of clustering is to find intrinsic categories in your data to allow you understand your data better. You can use Cluster Diagram, cluster profiles, cluster characteristics and Cluster discrimination to explore your data. As a domain expert, this tools should also help you validate the quality of the resulting clusters.

We have different clustering algorithms, such as: K-Mean and EM, etc. You can also use our live sample Clustering Art to test and try different clustering algorithms. This will help you understand each algorithm better. If you feel like it, you could also compose your own data set with interesting categories, and see whether a specific clustering algorithm can successfully locate them.

Good luck,

|||

Hi, Yimin Wu,

Thank you very much indeed.

With best regards,

Yours sincerely,

|||

You can also do a

SELECT TOP 1 MSOLAP_NODE_SCORE FROM MyClusterModel.CONTENT

To get a number as to how well the model clusters the training cases. This number is really only comparable between models built on the same dataset and if you tried to use it between disparate models the comparison would be meaningless.

A better way to determine cluster "accuracy" is to create a test set and then do an average of the PredictCaseLikelihood() of all the cases in the testing set. The higher the result, the better the cluster model works against new data.

|||

Hi, Jamie, thanks a lot for your guidance. Very helpful.

With best regards,

Yours sincerely,

Wednesday, March 7, 2012

How can I verify the availability of an SQL server

Hello everyone,

I have an ASP application mainly connected to one SQL database that works great but now I am trying to add some functionality that requires to connect to another remote SQL server. Till now all is fine except that the remote SQL server is not always online and of course when this happens my ASP application stops with the following error:

Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]Specified SQL server not found.

in my Global.asa I setup my session variables for DSN connections and in my pages I call my SQL connection as follow:

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Session("MySQL")

SQL = "my SQL statement here;"
Set RS = Conn.Execute(SQL)

Every time the page hits the Conn.Open line I get the error if the remote SQL is not online!!!

Is there a way I can check a sort of returned error code holding the connection status before getting to the Conn.Open line?

Any help would be greatly appreciated.

Thx in advance

You could put an error handler around it to catch the error if the server is not available

Check this site for some information on error handling: http://www.magictree.com/vbcourse/11design/errors.htm

So you could create a function to see if the server is online using the error handler of asp.

|||

Thank you Mark,

Well of course creating an error handling is what I am trying to do and the link you supplied is great, except it is for client side scriptting. ASP page are server side scrippting. In ASP.NET I could use it but not in pure old fashion ASP, I mean not that I know of!!!

For sure I need more info on how to!!! Please please please anyone!

The only other way I have found is to do it directly from my primary SQL server in a procedure that I can call from my ASP page but there too I need help so I rather follow one lead first and when exhausted the other.

Thank you again Mark

|||

AAAAAAAAAAHHHHHHHHH

Actually I am going to repeat myself but thank you Mark you put me on the right track and I got my solution.

Here it is:

<%
Response.Buffer = True
On Error Resume Next

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Session("MySQL")

Set ConnRemote = Server.CreateObject("ADODB.Connection")
ConnRemote.Open Session("MySQLRemote")


If Err.Number <> 0 Then
Response.Clear
'set my code without remote SQL here
Else
'set my code with remote SQL here
End If
%>

Thank you so much... I knew I would get an answer in here!

How can I verify that the sqlserver on my development is accessable from internet

Hello!
I'm trying to figure out if it's possible to reach the database on my
development machine from the outside (internet). To test this I'm trying to
connect to the database from the development machine by using my public IP
address. I also opned port 1433 in my firewall.
Is there any other ports I need to open? How can I verify that the sqlserver
on my development is accessable from internet?
Thanks!"Nutshell" <nospam@.nospam.com> wrote in message
news:%239FNk8bgHHA.596@.TK2MSFTNGP05.phx.gbl...

> I'm trying to figure out if it's possible to reach the database on my
> development machine from the outside (internet). To test this I'm trying
> to connect to the database from the development machine by using my public
> IP address. I also opned port 1433 in my firewall.
> Is there any other ports I need to open?
You'll want to give this a read (and some of the related links):
http://support.microsoft.com/kb/823938/en-us

> How can I verify that the sqlserver on my development is accessible from
> internet?
You should be able to use Query Analyzer or OSQL as a basic test
mechanism...
Steve|||Hello Steve,
I'll guess that the SQL Server need to use a static port?
1. From SQL Server Network Utility I'll see that port 1433 is default.
2. In the registry the settings looks like dynamic port allocation
3. The log displays:
2007-04-19 07:49:42.21 server SQL server listening on 192.168.0.6: 1433.
2007-04-19 07:49:42.34 server SQL server listening on 127.0.0.1: 1433.
2007-04-19 07:49:42.34 server SuperSocket Info: Bind failed on TCP port
1433.
2007-04-19 07:49:42.60 server SuperSocket Info: Bind failed on TCP port
1433.
I have tested to change the port to 1500, but I get the same bind error,
"Bind failed on TCP port 1500".
I have both SQL Server 9, and SQL Server Express on this machine. Is that
the problem?
Thanks!
"Steve Thompson" <stevethompson@.nomail.please> skrev i meddelandet
news:eOtYGIfgHHA.4916@.TK2MSFTNGP06.phx.gbl...
> "Nutshell" <nospam@.nospam.com> wrote in message
> news:%239FNk8bgHHA.596@.TK2MSFTNGP05.phx.gbl...
>
> You'll want to give this a read (and some of the related links):
> http://support.microsoft.com/kb/823938/en-us
>
> You should be able to use Query Analyzer or OSQL as a basic test
> mechanism...
> Steve
>

How can I verify that the sqlserver on my development is accessable from internet

Hello!
I'm trying to figure out if it's possible to reach the database on my
development machine from the outside (internet). To test this I'm trying to
connect to the database from the development machine by using my public IP
address. I also opned port 1433 in my firewall.
Is there any other ports I need to open? How can I verify that the sqlserver
on my development is accessable from internet?
Thanks!
"Nutshell" <nospam@.nospam.com> wrote in message
news:%239FNk8bgHHA.596@.TK2MSFTNGP05.phx.gbl...

> I'm trying to figure out if it's possible to reach the database on my
> development machine from the outside (internet). To test this I'm trying
> to connect to the database from the development machine by using my public
> IP address. I also opned port 1433 in my firewall.
> Is there any other ports I need to open?
You'll want to give this a read (and some of the related links):
http://support.microsoft.com/kb/823938/en-us

> How can I verify that the sqlserver on my development is accessible from
> internet?
You should be able to use Query Analyzer or OSQL as a basic test
mechanism...
Steve
|||Hello Steve,
I'll guess that the SQL Server need to use a static port?
1. From SQL Server Network Utility I'll see that port 1433 is default.
2. In the registry the settings looks like dynamic port allocation
3. The log displays:
2007-04-19 07:49:42.21 server SQL server listening on 192.168.0.6: 1433.
2007-04-19 07:49:42.34 server SQL server listening on 127.0.0.1: 1433.
2007-04-19 07:49:42.34 server SuperSocket Info: Bind failed on TCP port
1433.
2007-04-19 07:49:42.60 server SuperSocket Info: Bind failed on TCP port
1433.
I have tested to change the port to 1500, but I get the same bind error,
"Bind failed on TCP port 1500".
I have both SQL Server 9, and SQL Server Express on this machine. Is that
the problem?
Thanks!
"Steve Thompson" <stevethompson@.nomail.please> skrev i meddelandet
news:eOtYGIfgHHA.4916@.TK2MSFTNGP06.phx.gbl...
> "Nutshell" <nospam@.nospam.com> wrote in message
> news:%239FNk8bgHHA.596@.TK2MSFTNGP05.phx.gbl...
>
> You'll want to give this a read (and some of the related links):
> http://support.microsoft.com/kb/823938/en-us
>
> You should be able to use Query Analyzer or OSQL as a basic test
> mechanism...
> Steve
>

How can I verify that SQLServer is recognizing the "-g" startup option?

Greetings, all
When starting SQLServer 2005, it is possible to set the "-g" option to
reserve a minimum amount of memory for the MemToLeave region. After
starting SQLServer, is there a way to verify that the number specified
in the -g option has been recognized and used properly?
I had originally expected the Target buffer count in the DBCC
MemoryStatus command to drop when specifying a larger-than-default
MemToLeave region, and also a lowered number in the VM Reserved (KB)
value in the Memory Manager table. In my case, neither of these values
changed.
Situation:
I am using a SQL Server 2005 Enterprise Edition installation on a 32-
bit Windows 2003 Enterprise Edition Server with 3.38GB of RAM. Given
the standard configuration of a 2GB VAS, I expected that the Buffer
Pool for this SQL server would be approximately 1.6 GB, with the
default MemToLeave region of approximately 384MB, and the initial
numbers reported by DBCC MemoryStatus were consistent with those
expectations. I changed the -g setting to reserve 1GB of memory for
MemToLeave, and I expected to see the Buffer Pool decrease to 1GB
accordingly, but as described, such is not the case. I now suspect
that the -g option is not being recognized.
I specified the "-g 1024" parameter in the SQL Configuration Manager
under "Startup Parameters," and restarted the server immediately
after adding the option. No errors were recorded during startup.
I would appreciate any assist on this someone could offer.
-DavidHi David, check SQL Server error log to see if if -g is being used or not (It
logs this during startup)
Also, are you heavily using OLE automation objects (ex: SP_OA) or any
extended stored procedures. (Hope the obejcts are being cleared/destroyed
after it's use using SP_OADestroy) *I've seen cases in the past where it
doesn't.
However, the default value for -g inboth SQL Server 2000 and 2005 is 256 MB
and if you wish to increment this value then you'll need to do this in the
increments of 128 MB. (Try specifying -g 384 and restart SQL Server services
to see if that helps)
--
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (World Wide Microsoft SQL Server Community)
SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
Articles, SQL Clinic and a lot of SQL fun.
Register (Free):
http://sqlcommunity.com/RegistrationLoginPage/tabid/68/Default.aspx?returnurl=%2fdefault.aspx
"SoonerDEW@.gmail.com" wrote:
> Greetings, all
> When starting SQLServer 2005, it is possible to set the "-g" option to
> reserve a minimum amount of memory for the MemToLeave region. After
> starting SQLServer, is there a way to verify that the number specified
> in the -g option has been recognized and used properly?
> I had originally expected the Target buffer count in the DBCC
> MemoryStatus command to drop when specifying a larger-than-default
> MemToLeave region, and also a lowered number in the VM Reserved (KB)
> value in the Memory Manager table. In my case, neither of these values
> changed.
> Situation:
> I am using a SQL Server 2005 Enterprise Edition installation on a 32-
> bit Windows 2003 Enterprise Edition Server with 3.38GB of RAM. Given
> the standard configuration of a 2GB VAS, I expected that the Buffer
> Pool for this SQL server would be approximately 1.6 GB, with the
> default MemToLeave region of approximately 384MB, and the initial
> numbers reported by DBCC MemoryStatus were consistent with those
> expectations. I changed the -g setting to reserve 1GB of memory for
> MemToLeave, and I expected to see the Buffer Pool decrease to 1GB
> accordingly, but as described, such is not the case. I now suspect
> that the -g option is not being recognized.
> I specified the "-g 1024" parameter in the SQL Configuration Manager
> under "Startup Parameters," and restarted the server immediately
> after adding the option. No errors were recorded during startup.
> I would appreciate any assist on this someone could offer.
> -David
>|||Hi, Saleem
Thank you so much for your assistance.
I was able to review the logs and verify that the -g option is being
recognized.
That brings me to my problem. My intent here is to free up enough
MemToLeave area to allow one of several SQLCLR procedures to run.
These procedures will run fine on a local SQLEXPRESS box, but fail
with 701 (Insufficient Memory) errors when run on one of our 32-bit
SQL Server Enterprise servers running Win 2K3 Server EE.
My investigation led me to believe that my local SQLExpress box was
actually being given a greater chunk in the MemToLeave region for
these SQLCLR procedures by virtue of it's 1GB buffer pool allocation,
leaving 1GB in MemToLeave, whereas the server, with just over 3GB of
physical RAM (but no /3GB boot.ini switch nor are AWE enabled in SQL
Server), was being given only the default of 256MB (plus the thread
stack space). I theorized that forcing MemToLeave at some rather
ridiculous value, such as 1GB (1024), would have been ample for these
procedures, but the error persists. Hence, I suspected the -g
parameter was not being accepted. This is obviously not the case.
Should I not see a difference in the buffer status and related
allocations when the -g parameter is specified?
Again, many thanks for your assistance,
David
On Oct 17, 5:41 am, Saleem Hakani
<SaleemHak...@.discussions.microsoft.com> wrote:
> Hi David, check SQL Server error log to see if if -g is being used or not (It
> logs this during startup)
> Also, are you heavily using OLE automation objects (ex: SP_OA) or any
> extended stored procedures. (Hope the obejcts are being cleared/destroyed
> after it's use using SP_OADestroy) *I've seen cases in the past where it
> doesn't.
> However, the default value for -g inboth SQL Server 2000 and 2005 is 256 MB
> and if you wish to increment this value then you'll need to do this in the
> increments of 128 MB. (Try specifying -g 384 and restart SQL Server services
> to see if that helps)
> --
> Thank you,
> Saleem Hakani
> HTTP://WWW.SQLCOMMUNITY.COM (World Wide Microsoft SQL Server Community)
> SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
> Articles, SQL Clinic and a lot of SQL fun.
> Register (Free):http://sqlcommunity.com/RegistrationLoginPage/tabid/68/Default.aspx?r...
>
> "Sooner...@.gmail.com" wrote:
> > Greetings, all
> > When starting SQLServer 2005, it is possible to set the "-g" option to
> > reserve a minimum amount of memory for the MemToLeave region. After
> > starting SQLServer, is there a way to verify that the number specified
> > in the -g option has been recognized and used properly?
> > I had originally expected the Target buffer count in the DBCC
> > MemoryStatus command to drop when specifying a larger-than-default
> > MemToLeave region, and also a lowered number in the VM Reserved (KB)
> > value in the Memory Manager table. In my case, neither of these values
> > changed.
> > Situation:
> > I am using a SQL Server 2005 Enterprise Edition installation on a 32-
> > bit Windows 2003 Enterprise Edition Server with 3.38GB of RAM. Given
> > the standard configuration of a 2GB VAS, I expected that the Buffer
> > Pool for this SQL server would be approximately 1.6 GB, with the
> > default MemToLeave region of approximately 384MB, and the initial
> > numbers reported by DBCC MemoryStatus were consistent with those
> > expectations. I changed the -g setting to reserve 1GB of memory for
> > MemToLeave, and I expected to see the Buffer Pool decrease to 1GB
> > accordingly, but as described, such is not the case. I now suspect
> > that the -g option is not being recognized.
> > I specified the "-g 1024" parameter in the SQL Configuration Manager
> > under "Startup Parameters," and restarted the server immediately
> > after adding the option. No errors were recorded during startup.
> > I would appreciate any assist on this someone could offer.
> > -David- Hide quoted text -
> - Show quoted text -|||Everyone,
I have resolved this problem, and thought I should share my findings.
It turns out that the "-g" option should, indeed, be reflected as a
decrease in the size of the reserved buffer pool in SQL Server, as I
had surmised. Our servers were not honoring the "-g" parameter at
startup merely be restarting SQLServer; it was honored only after the
server itself had been rebooted. DBCC MEMORYSTATUS correctly reflected
the proper/expected buffer pool reservation size *only* after a server
reboot.
Our SQLCLR procedure now runs happily.
Thanks to all!
-David
On Oct 17, 8:28 am, Sooner...@.gmail.com wrote:
> Hi, Saleem
> Thank you so much for your assistance.
> I was able to review the logs and verify that the -g option is being
> recognized.
> That brings me to my problem. My intent here is to free up enough
> MemToLeave area to allow one of several SQLCLR procedures to run.
> These procedures will run fine on a local SQLEXPRESS box, but fail
> with 701 (Insufficient Memory) errors when run on one of our 32-bit
> SQL Server Enterprise servers running Win 2K3 Server EE.
> My investigation led me to believe that my local SQLExpress box was
> actually being given a greater chunk in the MemToLeave region for
> these SQLCLR procedures by virtue of it's 1GB buffer pool allocation,
> leaving 1GB in MemToLeave, whereas the server, with just over 3GB of
> physical RAM (but no /3GB boot.ini switch nor are AWE enabled in SQL
> Server), was being given only the default of 256MB (plus the thread
> stack space). I theorized that forcing MemToLeave at some rather
> ridiculous value, such as 1GB (1024), would have been ample for these
> procedures, but the error persists. Hence, I suspected the -g
> parameter was not being accepted. This is obviously not the case.
> Should I not see a difference in the buffer status and related
> allocations when the -g parameter is specified?
> Again, many thanks for your assistance,
> David
> On Oct 17, 5:41 am, Saleem Hakani
>
> <SaleemHak...@.discussions.microsoft.com> wrote:
> > Hi David, check SQL Server error log to see if if -g is being used or not (It
> > logs this during startup)
> > Also, are you heavily using OLE automation objects (ex: SP_OA) or any
> > extended stored procedures. (Hope the obejcts are being cleared/destroyed
> > after it's use using SP_OADestroy) *I've seen cases in the past where it
> > doesn't.
> > However, the default value for -g inboth SQL Server 2000 and 2005 is 256 MB
> > and if you wish to increment this value then you'll need to do this in the
> > increments of 128 MB. (Try specifying -g 384 and restart SQL Server services
> > to see if that helps)
> > --
> > Thank you,
> > Saleem Hakani
> > HTTP://WWW.SQLCOMMUNITY.COM (World Wide Microsoft SQL Server Community)
> > SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
> > Articles, SQL Clinic and a lot of SQL fun.
> > Register (Free):http://sqlcommunity.com/RegistrationLoginPage/tabid/68/Default.aspx?r...
> > "Sooner...@.gmail.com" wrote:
> > > Greetings, all
> > > When starting SQLServer 2005, it is possible to set the "-g" option to
> > > reserve a minimum amount of memory for the MemToLeave region. After
> > > starting SQLServer, is there a way to verify that the number specified
> > > in the -g option has been recognized and used properly?
> > > I had originally expected the Target buffer count in the DBCC
> > > MemoryStatus command to drop when specifying a larger-than-default
> > > MemToLeave region, and also a lowered number in the VM Reserved (KB)
> > > value in the Memory Manager table. In my case, neither of these values
> > > changed.
> > > Situation:
> > > I am using a SQL Server 2005 Enterprise Edition installation on a 32-
> > > bit Windows 2003 Enterprise Edition Server with 3.38GB of RAM. Given
> > > the standard configuration of a 2GB VAS, I expected that the Buffer
> > > Pool for this SQL server would be approximately 1.6 GB, with the
> > > default MemToLeave region of approximately 384MB, and the initial
> > > numbers reported by DBCC MemoryStatus were consistent with those
> > > expectations. I changed the -g setting to reserve 1GB of memory for
> > > MemToLeave, and I expected to see the Buffer Pool decrease to 1GB
> > > accordingly, but as described, such is not the case. I now suspect
> > > that the -g option is not being recognized.
> > > I specified the "-g 1024" parameter in the SQL Configuration Manager
> > > under "Startup Parameters," and restarted the server immediately
> > > after adding the option. No errors were recorded during startup.
> > > I would appreciate any assist on this someone could offer.
> > > -David- Hide quoted text -
> > - Show quoted text -- Hide quoted text -
> - Show quoted text -

How can I verify a GUID number ?

Dear SQL,

I need to SELECT something from a database that has a UNIQUEIDENTIFIER (GUID) field,

If the number is wrong (has some other than A-Z 0-9) than theASP page just freaks out and gets "error converting from a character string to uniqueidentifier"

How can I check that the GUID is OK before I SELECT ?
this is the number format:
{7A9B5F81-4936-4A31-B4E2-9168AAB75A0}

I tried to cast this "error" number with no successs:
"WHERE Deceased_ID = cast('"& "---4936-4A31-B4E2-9168AAB75A0" &"' as uniqueidentifier)"

Thanks in advance, Yovav.?? The string you're trying to cast is not a valid GUID, whats with the concats and the "--"? If a GUID is in the database then it will always be valid.|||I know it's not valid - that's the idea...

I'm getting a GUID as a parameter (using GET) and I want to avoid getting an error
if the user will change the GUID I'm sending to something illegal like "--+..."

The problem is that if I'm trying to SELECT some stuff WHERE someGUID = '" & givenGUID & "'
it will get a nasty error on the ASP page (error converting from a character string to uniqueidentifier)

I also tried to cast it into varchar(38) - which is working - BUT not if the GUID contains some illegal characters...

I guess I will have to write a function to validate GUID number - I could not find a function like that anywhere :-(|||Solved|||but GUID is a datatype so it will error if you try to put an invalid item into it, can't you rely on that?|||Solved