Showing posts with label point. Show all posts
Showing posts with label point. Show all posts

Sunday, March 25, 2012

ActiveX info

I'm getting a little confused about what is supported in MS-SQL ActiveX and
what is Visual Basic and what is VBScript. Can someone please point me to a
website, recommend a book or if I've missed it where in the MS-SQL help that
deals with the ActiveX supported in SQL. I'm not looking to do web pages
ASP, ect. I'm looking to use the ActiveX as add on funtionality to support
the Stored Procs I write.

Thanks,

-pPippen (123@.hotmail.com) writes:
> I'm getting a little confused about what is supported in MS-SQL ActiveX
> and what is Visual Basic and what is VBScript. Can someone please point
> me to a website, recommend a book or if I've missed it where in the
> MS-SQL help that deals with the ActiveX supported in SQL. I'm not
> looking to do web pages ASP, ect. I'm looking to use the ActiveX as add
> on funtionality to support the Stored Procs I write.

Personally I get confused only I see the term ActiveX. I think it is the
same as OLE, but I might be completely wrong.

Anyway, to call OLE objects from SQL Server you can use the sp_OAxxxx
routines, documented in Books Online.

Beware that if you call OLE objects that reside on the same machine as
SQL Server, they execute in-process, which means that an access violation
or similar execution error can cause the whole SQL Server to crash. While
this is useful at times, it something to use with caution.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns959C1FC09AB7Yazorman@.127.0.0.1...
> Pippen (123@.hotmail.com) writes:
>> I'm getting a little confused about what is supported in MS-SQL ActiveX
>> and what is Visual Basic and what is VBScript. Can someone please point
>> me to a website, recommend a book or if I've missed it where in the
>> MS-SQL help that deals with the ActiveX supported in SQL. I'm not
>> looking to do web pages ASP, ect. I'm looking to use the ActiveX as add
>> on funtionality to support the Stored Procs I write.
> Personally I get confused only I see the term ActiveX. I think it is the
> same as OLE, but I might be completely wrong.
> Anyway, to call OLE objects from SQL Server you can use the sp_OAxxxx
> routines, documented in Books Online.
> Beware that if you call OLE objects that reside on the same machine as
> SQL Server, they execute in-process, which means that an access violation
> or similar execution error can cause the whole SQL Server to crash. While
> this is useful at times, it something to use with caution.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp

After re-reading my post I did not make myself very clear... Please let me
try again. I'm looking to find resources to write ActiveX code to support my
stored procs ect... I'm confused on what the built in ActiveX compiler uses
out of the VBScript language. All of the VBScript books I pick up look like
they are written for web designers. I'm looking for a book or resource for
writing code for the ActiveX compiler in MS-SQL.

Sorry for the confusion,

-p|||Like a lot of Microsoft technology terms, ActiveX is a bit nebulous. Here's
a link to google definitions:
http://www.google.com/search?source...fine%3A+activex

The main concept is that ActiveX is a technology/API rather than a language.
One can write a script in a language like VBScript and then execute it using
SQL Server tools like a DTS ActiveX Script task, a SQL Server Agent ActiveX
Script job step or using the sp_OA* procs that Erland mentioned. The script
can also be run independently of SQL Server using Windows Scripting Host.

What functionality do you need to implement?

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Pippen" <123@.hotmail.com> wrote in message
news:ajUjd.483788$mD.296273@.attbi_s02...
> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
> news:Xns959C1FC09AB7Yazorman@.127.0.0.1...
>> Pippen (123@.hotmail.com) writes:
>>> I'm getting a little confused about what is supported in MS-SQL ActiveX
>>> and what is Visual Basic and what is VBScript. Can someone please point
>>> me to a website, recommend a book or if I've missed it where in the
>>> MS-SQL help that deals with the ActiveX supported in SQL. I'm not
>>> looking to do web pages ASP, ect. I'm looking to use the ActiveX as add
>>> on funtionality to support the Stored Procs I write.
>>
>> Personally I get confused only I see the term ActiveX. I think it is the
>> same as OLE, but I might be completely wrong.
>>
>> Anyway, to call OLE objects from SQL Server you can use the sp_OAxxxx
>> routines, documented in Books Online.
>>
>> Beware that if you call OLE objects that reside on the same machine as
>> SQL Server, they execute in-process, which means that an access violation
>> or similar execution error can cause the whole SQL Server to crash. While
>> this is useful at times, it something to use with caution.
>>
>>
>> --
>> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>>
>> Books Online for SQL Server SP3 at
>> http://www.microsoft.com/sql/techin.../2000/books.asp
> After re-reading my post I did not make myself very clear... Please let me
> try again. I'm looking to find resources to write ActiveX code to support
> my stored procs ect... I'm confused on what the built in ActiveX compiler
> uses out of the VBScript language. All of the VBScript books I pick up
> look like they are written for web designers. I'm looking for a book or
> resource for writing code for the ActiveX compiler in MS-SQL.
> Sorry for the confusion,
> -p|||Pippen (123@.hotmail.com) writes:
> After re-reading my post I did not make myself very clear... Please let
> me try again. I'm looking to find resources to write ActiveX code to
> support my stored procs ect... I'm confused on what the built in ActiveX
> compiler uses out of the VBScript language. All of the VBScript books I
> pick up look like they are written for web designers. I'm looking for a
> book or resource for writing code for the ActiveX compiler in MS-SQL.

Since, as Dan said, no one really knows what ActiveX (save, possibly,
for the marketers that invented the term), it may be easier if you told
us what your business problem is.

Now it sounds a bit like you are asking to access SQL Server from ActiveX.
In such I assume that you use the ActiveX Data Objects, that is ADO. David
Sceppa has a good book about ADO on Microsoft Press. It's a bit old, so I
don't know how easy it is to get hold of.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns959C688EF43EAYazorman@.127.0.0.1...
> Pippen (123@.hotmail.com) writes:
>> After re-reading my post I did not make myself very clear... Please let
>> me try again. I'm looking to find resources to write ActiveX code to
>> support my stored procs ect... I'm confused on what the built in ActiveX
>> compiler uses out of the VBScript language. All of the VBScript books I
>> pick up look like they are written for web designers. I'm looking for a
>> book or resource for writing code for the ActiveX compiler in MS-SQL.
> Since, as Dan said, no one really knows what ActiveX (save, possibly,
> for the marketers that invented the term), it may be easier if you told
> us what your business problem is.
> Now it sounds a bit like you are asking to access SQL Server from ActiveX.
> In such I assume that you use the ActiveX Data Objects, that is ADO. David
> Sceppa has a good book about ADO on Microsoft Press. It's a bit old, so I
> don't know how easy it is to get hold of.
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp

After doing a little more research I think what I'm looking for is a book or
resource that deals with using VBScript in a DTS package to extend the
functionality of the DTS package; namely the ActiveX task in the DTS
package. Every book that I have picked up on VBScript deals primarliy with
webpages.

I have a process that needs to send and receive files that are encrypted
with PGP on a daily basis. Each of the files have unique names so I will
need to read tables to find the files that need to be processed. These files
will be encrypted / decrypted in the VBScript and loaded or extracted from
the DB. I would have used batch files (MS system) if not for the unique file
names. Essentially I'm looking to increase my knowledge of using VBScript in
an ActiveX task for this project and future projects.

Sorry about the misuse of normenclature, SQL is not my primary language.

Thanks,

-p|||Pippen (123@.hotmail.com) writes:
> After doing a little more research I think what I'm looking for is a
> book or resource that deals with using VBScript in a DTS package to
> extend the functionality of the DTS package; namely the ActiveX task in
> the DTS package. Every book that I have picked up on VBScript deals
> primarliy with webpages.

I know very little about DTS, and even less about books on DTS. However,
SQL Server MVPs Darren Green and Allen Mitchell runs www.sqldts.com, and
you might find some good tips there.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Thursday, March 22, 2012

Active/Active/Active/Passive

We are using SQL2000 and considering clustering the
solution. Could someone point us good documentation on
clustering. We are particularly interested in
Active/Active/Active/Passive
Thanks in advance
Amar
Amar,
It appears that you are interested in
-- 3+1 cluster with 3 nodes having instances of SQL Server 2000 and the fourth node is passive. Is that true?
-- i.e. multiple instance SQL cluster
A multiple-instance SQL cluster can have up to four server nodes (next version of SQL Server --Yukon will support upto 8 nodes) and supports up to 16 instances (1 default, 15 named or 16 named). Each SQL
Server 2000 virtual server requires its own disk resources that cannot be used by other instances. These disk resources are the logical drive names (for example, drive F:\) used by SQL Server on which to store
data and log files. Separate physical disk sets are needed to make up the logical drive, unless your disk subsystem supports multiple logical drives on one physical drive set. SQL Server in a clustered
environment also behaves differently from a stand-alone named instance in relation to IP ports. During the installation process, a dynamic port that may be something other than 1433 is configured, and that port
number is reserved for the instance. In a failover cluster, multiple instances can be configured to share the same port, such as 1433, because the failover cluster listens only to the IP address assigned to the SQL
Server virtual server, and is not limited to a 1:1 ratio. However, for security and potentially increased availability, you may want to assign each virtual server to its own unique port of your choice or leave it as it was
configured during installation
Here are some related links that you may find useful:
Microsoft SQL Server 2000 High Availability (MS Press)
ISBN 0-7356-1920-4
Support WebCast: Windows Clustering: An Overview of Microsoft Clustering Technologies
http://support.microsoft.com/?id=325423
Microsoft Whitepaper - SQL Server 2000 Failover Clustering
http://www.microsoft.com/SQL/techinf...vercluster.asp
SQL Server 2000 Pricing and Licensing
http://www.microsoft.com/sql/howtobu...rlicensing.asp
Microsoft SQL Server 2000 High Availability Series
http://www.microsoft.com/technet/pro...y/sqlhalp.mspx
The Microsoft SQL Server 2000 High Availability Series helps you plan and deploy a highly available data center that uses Microsoft SQL Server 2000 through proper procedures that increase availability,
backups help recover from catastrophic disasters, redundant components prevent downtime, and redundant servers minimize downtime.
The series consists of:
oPLANNING to help you design a data center to achieve the level of availability needed for the business environment.
oDEPLOYMENT to help you implement selected server redundancy solutions to minimize unavailability caused by server failures and planned downtime.
SQL Server Consolidation on the 32-Bit Platform using a Clustered Environment
http://www.microsoft.com/technet/pro...olidation.mspx
Q260758 - INF: Frequently Asked Questions - SQL Server 2000 - Failover Clustering
http://support.microsoft.com/?kbid=260758
Q243218 INF: Installation Order for SQL 2000 Enterprise Edition
http://support.microsoft.com/?kbid=243218
NOTE:
======
Make sure that the four node cluster that you use is a complete certified solution.
How to locate qualified cluster solutions for Windows
http://support.microsoft.com/?id=828262
Cluster Support Policy
Microsoft's Cluster support policy is explained in these Q articles: Please read these carefully for the official support policy of
Cluster (General): http://support.microsoft.com/default...b;en-us;309395
Cluster (SQL): http://support.microsoft.com/default...b;en-us;327518
-- The above links are for Windows 2000 cluster. For a four node cluster you will need either Win2K DataCenter or Win2K3 EE or Win2K3DataCenter. If you are using Win2K3, the following links will help you.
Although most of the things are same for SQL 2K Failover cluster on Win2K3, here are some things that are different:
815431 PRB: Installation of a Named Instance of SQL Server 2000 Virtual Server on a Windows 2003-Based Cluster Fails
http://support.microssoft.com/?id=815431
SQL Server 2000 Cluster Does Not Install on Windows Server 2003-Based Computers Where Terminal Services Is Installed
http://support.microsoft.com/?id=301520
SQL Server 2000 Is Not Supported on Windows Server 2003 Terminal Server Application Server
http://support.microsoft.com/?id=327270
PRB: Virtual SQL Server 2000 Installation Fails on Cluster That Has Eight Nodes
http://support.microsoft.com/?id=811054
SQL Server 2000 support for mounted volumes
http://support.microsoft.com/?id=819546
HTH,
Best Regards,
Uttam Parui
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their Microsoft software to better protect against viruses and security vulnerabilities. The easiest way to do this is to visit the following websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx
|||I assume you mean 4 nodes and 3 SQL instances? I haven't seen much
documentation on clusters with more than two nodes, but it is very much
possible. I have such a system running for about 8 months and it works very
well. Most of the standard clustering stuff applies, just with a few extra
twists. Here is a good overview on SQL failover clustering:
http://www.microsoft.com/technet/pro.../failclus.mspx
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Amar" <anonymous@.discussions.microsoft.com> wrote in message
news:2cc1c01c46a68$d62f8cc0$a601280a@.phx.gbl...
> We are using SQL2000 and considering clustering the
> solution. Could someone point us good documentation on
> clustering. We are particularly interested in
> Active/Active/Active/Passive
> Thanks in advance
> Amar
|||Hi Thanks a lot for your quick response.
One more question. Can we have
Active/Active/Active/Passive talking to single database?

>--Original Message--
>I assume you mean 4 nodes and 3 SQL instances? I
haven't seen much
>documentation on clusters with more than two nodes, but
it is very much
>possible. I have such a system running for about 8
months and it works very
>well. Most of the standard clustering stuff applies,
just with a few extra
>twists. Here is a good overview on SQL failover
clustering:
>http://www.microsoft.com/technet/pro.../sql/2000/main
tain/failclus.mspx
>
>--
>Geoff N. Hiten
>Microsoft SQL Server MVP
>Senior Database Administrator
>Careerbuilder.com
>I support the Professional Association for SQL Server
>www.sqlpass.org
>"Amar" <anonymous@.discussions.microsoft.com> wrote in
message
>news:2cc1c01c46a68$d62f8cc0$a601280a@.phx.gbl...
>
>.
>
|||No. SQL clustering is a failover technology, not a scale-out technology.
Each instance has a unique set of databases and appears on the network as a
complete and unique virtual system. Read over the link I included to get a
better idea of what SQL clustering really does. It is critical to
understand the benefits and limitations of SQL clustering before you try and
build a highly available system around that technology.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Amar" <anonymous@.discussions.microsoft.com> wrote in message
news:2da4901c46a8d$8f3b07c0$a401280a@.phx.gbl...[vbcol=seagreen]
> Hi Thanks a lot for your quick response.
> One more question. Can we have
> Active/Active/Active/Passive talking to single database?
> haven't seen much
> it is very much
> months and it works very
> just with a few extra
> clustering:
> tain/failclus.mspx
> message
sql

Thursday, February 16, 2012

Accessing SQL Server 8

We're running a point of sale/inventory management system that uses MS SQL Server as the backend. I'm looking to do some reporting and need to query data from the existing inventory databases but the server is not responding via OSQL and the ODBC "Test Data Source" fails.

osql -L reports:

"Servers: CONNPOS"

osql -E -S CONNPOS reports:

[Shared Memory]SQL Server does not exist or access denied.
[Shared Memory]ConnectionOpen (Connect()).

I am logged in as the admin which was the account used to install the server and create the databases.

Any suggestions?try pinging it. also check if using ip for the server name will do the trick. here i managed to simulate the error only by stopping the server.|||Have you tried to login using SQL authenthification?
If this succeds, then it means that your user's rights have been removed somehow, if not your connection is down. And I think this is the problem, at least the second message (ConnectionOpen (Connect()) is suggesting that. Probably you were connected to the database, and while beeing connected the connection got lost.
Try disconnecting and reconecting, and check if the server is REALLY running, because it's not necessarily has to run to be reported by the "osql -L" statement.

Best regards!
:cool:|||According to sqlmangr/services panel the server is up and running... I should note that the osql commands were run from the local machine (2000 Server), not from a remote system. I haven't tried SQL auth... just NT.

I did notice that netstat doesn't report ms-sql-* on any TCP ports... hmm.|||Well, looks like we're up and running.

"osql -E -S servername/instancename" works like a charm... I've also established a user DSN as well and the test passed.

Thanks for the help.|||I have run into this sort of thing before. In the server network utility, you will find a checkbox that says something like "Enable Shared Memory Protocol" (not sure of the wording, so that could be pretty wrong). Uncheck that box. Then retry the query. Good luck.|||I am able to connect via OSQL and can execute queries. I have also configured a user DSN for this database via the ODBC Control Panel but can not connect through an ASP script even tho the ODBC data source test passed. Here's the error that is returned to the browser when the script attempts to open a connection:

[Microsoft][ODBC Driver Manager]Data Source Name not found and no default driver specified.

I had selected "SQL Server" as the driver and again, the data source test had passed.

Suggestions?|||Create a system DSN. User DSNs are only available to the user that creates them.

Sunday, February 12, 2012

Accessing Query Execution Plan (QEP) Statistics

Hi,
I have some questions about estimated QEPs that can be generated in MSSQL QA.
If I point at an icon/physical operator in the estimated QEP, it shows me
some statistics about the operator.
1. Is there a way to retrieve these statistics through a query, i.e., can
these statistics be available to the user?
2. Are these statistics generated at the server or at the client?
3. Also, is there a way to generate these statistics on my own?
Thanks in advance,
-TC.
T Chaudhary wrote:
> Hi,
> I have some questions about estimated QEPs that can be generated in
> MSSQL QA.
> If I point at an icon/physical operator in the estimated QEP, it
> shows me some statistics about the operator.
> 1. Is there a way to retrieve these statistics through a query, i.e.,
> can these statistics be available to the user?
> 2. Are these statistics generated at the server or at the client?
> 3. Also, is there a way to generate these statistics on my own?
> Thanks in advance,
> -TC.
Generated on the server. You can use SET SHOWPLAN_ALL ON from QA to get
results back in result set format.
Try This:
Set showplan_all on
go
select * from pubs..publishers
go
Set showplan_all off
go
David G.
|||If you are also interested in index statistics try
DBCC show_statistics(object_id, indid)
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
"T Chaudhary" <replysoon_04@.yahoo.com> wrote in message
news:e8149671.0409091256.56631cf@.posting.google.co m...
> Hi,
> I have some questions about estimated QEPs that can be generated in MSSQL
QA.
> If I point at an icon/physical operator in the estimated QEP, it shows me
> some statistics about the operator.
> 1. Is there a way to retrieve these statistics through a query, i.e., can
> these statistics be available to the user?
> 2. Are these statistics generated at the server or at the client?
> 3. Also, is there a way to generate these statistics on my own?
> Thanks in advance,
> -TC.

Accessing Query Execution Plan (QEP) Statistics

Hi,
I have some questions about estimated QEPs that can be generated in MSSQL QA.
If I point at an icon/physical operator in the estimated QEP, it shows me
some statistics about the operator.
1. Is there a way to retrieve these statistics through a query, i.e., can
these statistics be available to the user?
2. Are these statistics generated at the server or at the client?
3. Also, is there a way to generate these statistics on my own?
Thanks in advance,
-TC.T Chaudhary wrote:
> Hi,
> I have some questions about estimated QEPs that can be generated in
> MSSQL QA.
> If I point at an icon/physical operator in the estimated QEP, it
> shows me some statistics about the operator.
> 1. Is there a way to retrieve these statistics through a query, i.e.,
> can these statistics be available to the user?
> 2. Are these statistics generated at the server or at the client?
> 3. Also, is there a way to generate these statistics on my own?
> Thanks in advance,
> -TC.
Generated on the server. You can use SET SHOWPLAN_ALL ON from QA to get
results back in result set format.
Try This:
Set showplan_all on
go
select * from pubs..publishers
go
Set showplan_all off
go
David G.|||If you are also interested in index statistics try
DBCC show_statistics(object_id, indid)
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
"T Chaudhary" <replysoon_04@.yahoo.com> wrote in message
news:e8149671.0409091256.56631cf@.posting.google.com...
> Hi,
> I have some questions about estimated QEPs that can be generated in MSSQL
QA.
> If I point at an icon/physical operator in the estimated QEP, it shows me
> some statistics about the operator.
> 1. Is there a way to retrieve these statistics through a query, i.e., can
> these statistics be available to the user?
> 2. Are these statistics generated at the server or at the client?
> 3. Also, is there a way to generate these statistics on my own?
> Thanks in advance,
> -TC.