Friday, March 23, 2012
How to Determine if MSDE 2K running
I need to check if MSDE2K service is running on a stand-alone computer using
VB6
I have tried using SQLDMO.ListAvailableServers but find it very
unreliable...
Dim oApp As SQLDMO.Application
Dim oNames As SQLDMO.NameList
Set oApp = CreateObject("SQLDMO.Application")
Set oNames = oApp.ListAvailableSQLServers()
MsgBox oNames.count
If I first run this code it detects my MSDE service oNames.count = 1
(correct)
If I stop MSDE, this code returns oNames.count = 0 (correct)
If I restart MSDE (icon indicates running) oNames.count still returns 0
(incorrect)
Any ideas
Regards
Steve
I know it's not the best way, but how about just writing an ADO application
that executes a test query in one of the databases? If your app fails to
connect to MSDE, then you know you have a problem.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"steve" <sfrancis@.bigpond.net.au> wrote in message
news:etCwYZcjFHA.320@.TK2MSFTNGP09.phx.gbl...
Hi All
I need to check if MSDE2K service is running on a stand-alone computer using
VB6
I have tried using SQLDMO.ListAvailableServers but find it very
unreliable...
Dim oApp As SQLDMO.Application
Dim oNames As SQLDMO.NameList
Set oApp = CreateObject("SQLDMO.Application")
Set oNames = oApp.ListAvailableSQLServers()
MsgBox oNames.count
If I first run this code it detects my MSDE service oNames.count = 1
(correct)
If I stop MSDE, this code returns oNames.count = 0 (correct)
If I restart MSDE (icon indicates running) oNames.count still returns 0
(incorrect)
Any ideas
Regards
Steve
|||hi Steve,
steve wrote:
> Hi All
> I need to check if MSDE2K service is running on a stand-alone
> computer using VB6
> I have tried using SQLDMO.ListAvailableServers but find it very
> unreliable...
> Dim oApp As SQLDMO.Application
> Dim oNames As SQLDMO.NameList
> Set oApp = CreateObject("SQLDMO.Application")
> Set oNames = oApp.ListAvailableSQLServers()
> MsgBox oNames.count
> If I first run this code it detects my MSDE service oNames.count = 1
> (correct)
> If I stop MSDE, this code returns oNames.count = 0 (correct)
> If I restart MSDE (icon indicates running) oNames.count still returns
> 0 (incorrect)
you could use the SQLDMOSQLServer Status property,
http://msdn.microsoft.com/library/de..._p_s_769l.asp,
but this requires you to be already connected ot the SQL Server instance..
and, as you already saw, the ListAvailableServers is not reliable, because
of the nature of the broadcast call of the ODBC SQLBrowseConnect api used by
the DMO method, where the timeframe window is involved as well...
ListAvailableServer uses ODBC function SQLBrowseConnect() provided by ODBC
libraries installed by MDAC;
this is a mechanism working in broadcast calls, which result never are
conclusive and consistent, becouse results are influenced of various
servers's answer states, answer time, etc.
Until Mdac 2.5, SQLBrowseConnect function works based on a NetBIOS
broadcast, on which SQL Servers respond (Default protocol for SQL Server
7.0), while in SQL Server 2000 the rules changed, because the default client
protocol changed to TCP/IP and now a UDP broadcast is used, beside a NetBIOS
broadcast, listening on port 1434:
which is using a UDP broadcast on port 1434, if instance do not listen or
not respond on time they will not be part of the enumeration.
Some basic rules for 7.0 are:
- SQL Servers have to be running on Windows NT or Windows 2000 and have to
listen on Named Pipes, that is why in 7.0 Windows 9x SQL Servers will never
show up, because they do not listen on Named Pipes.
- The SQL Server has to be running in order to respond on the broadcast.
There is a gray window of 15 minutes after shutdown, where a browse master
in the domain may respond on the broadcast and answer.
- If you have routers in your network, that do not pass on NetBIOS
broadcasts, this might limit your scope of the broadcast.
- Only servers within the same NT domain (or trust) will get enumerated.
In SQL Server 2000 using MDAC 2.6 this changes a little, because now the
default protocol has been changed to be TCP/IP sockets and instead of a
NetBIOS broadcast, they use a TCP UDP to detect the servers. The same logic
still applies roughly.
- SQL Server that are running
- SQL Server that listening on TCP/IP
- Running on Windows NT or Windows 2000 or Windows 9x
- If you use routers and these are configured not to pass UDP broadcasts,
only machines within the same subnet show up.
Upgrading to Service Pack 2 of SQL Server 2000 is required in order to have
..ListAvailableServer method to work properly, becouse precding release of
Sql-DMO Components of Sql Server 2000 present a bug in this area.
Courtesy of Mr. Gert E.R. Drapers
further Information at
http://sqldev.net/misc.htm
to the besto of my knowledge, as you can see from
http://msdn.microsoft.com/library/de...ob_s_7igk.asp,
SQLServer object does not directly exposes a disconnected property to get
it's state, so you have to connect (and eventually use the Status method,,,
but youll''be already connected)..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.14.0 - DbaMgr ver 0.59.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
sql
Wednesday, March 21, 2012
How to detect SQLServer 2005
2005 Express with program like c# or VB.NNET?
Hi
If you can connect to the instance you can run a query that returns the
result of the function SERVERPROPERTY
SELECT CONVERT(varchar(40), SERVERPROPERTY('edition'));
John
"ad" wrote:
> How can I detect if my computer have installed SQLServer 2005 or SQLServer
> 2005 Express with program like c# or VB.NNET?
>
>
How to detect SQLServer 2005
2005 Express with program like c# or VB.NNET?Hi
If you can connect to the instance you can run a query that returns the
result of the function SERVERPROPERTY
SELECT CONVERT(varchar(40), SERVERPROPERTY('edition'));
John
"ad" wrote:
> How can I detect if my computer have installed SQLServer 2005 or SQLServer
> 2005 Express with program like c# or VB.NNET?
>
>sql
How to detect INSTALLED SQL version?
I need to detect whether the computer has SQL Server 2000 SP3 installed
before
attempting to connect to it, for example during my custom setup program. Wha
t
is the recommended way of doing this?
TIA,
A.SELECT TOP 0 NULL AS Property , NULL AS Variable
UNION ALL SELECT 'Version' , SERVERPROPERTY( 'ProductVersion' )
UNION ALL SELECT 'Level' , SERVERPROPERTY( 'ProductLevel' )
UNION ALL SELECT 'Engine Edition' , SERVERPROPERTY( 'Edition' )
"Abbey" <Abbey@.discussions.microsoft.com> wrote in message
news:1D2E126E-B6FE-411C-B157-FD3BBB49CE82@.microsoft.com...
> Hello,
> I need to detect whether the computer has SQL Server 2000 SP3 installed
> before
> attempting to connect to it, for example during my custom setup program.
What
> is the recommended way of doing this?
> TIA,
> A.
>|||HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Mi
crosoft SQL
Server\MSSQLServer\MSSQLServer\CurrentVe
rsion\
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Mi
crosoft SQL Server\<instance
name>\MSSQLServer\CurrentVersion\
Key name = CSDVersion (not CurrentVersion).
"Abbey" <Abbey@.discussions.microsoft.com> wrote in message
news:1D2E126E-B6FE-411C-B157-FD3BBB49CE82@.microsoft.com...
> Hello,
> I need to detect whether the computer has SQL Server 2000 SP3 installed
> before
> attempting to connect to it, for example during my custom setup program.
> What
> is the recommended way of doing this?
> TIA,
> A.
>|||This won't work "before attempting to connect to it"... you have to be
connected to the server to run your query...
> SELECT TOP 0 NULL AS Property , NULL AS Variable
> UNION ALL SELECT 'Version' , SERVERPROPERTY( 'ProductVersion' )
> UNION ALL SELECT 'Level' , SERVERPROPERTY( 'ProductLevel' )
> UNION ALL SELECT 'Engine Edition' , SERVERPROPERTY( 'Edition' )|||Hello Aaron,
Thanks for that suggestion - I'll try it and let you know...
Regards,
Abbey
"Aaron Bertrand [SQL Server MVP]" wrote:
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Mi
crosoft SQL
> Server\MSSQLServer\MSSQLServer\CurrentVe
rsion\
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Mi
crosoft SQL Server\<instance
> name>\MSSQLServer\CurrentVersion\
> Key name = CSDVersion (not CurrentVersion).
>
> "Abbey" <Abbey@.discussions.microsoft.com> wrote in message
> news:1D2E126E-B6FE-411C-B157-FD3BBB49CE82@.microsoft.com...
>
>|||Is there any harm in opening a connection to check the database version?
If it's the wrong version you can always run "wrong version" code and
disconnect the connection.
"Rebecca York" <rebecca.york {at} 2ndbyte.com> wrote in message
news:4362481f$0$134$7b0f0fd3@.mistral.news.newnet.co.uk...
> SELECT TOP 0 NULL AS Property , NULL AS Variable
> UNION ALL SELECT 'Version' , SERVERPROPERTY( 'ProductVersion' )
> UNION ALL SELECT 'Level' , SERVERPROPERTY( 'ProductLevel' )
> UNION ALL SELECT 'Engine Edition' , SERVERPROPERTY( 'Edition' )
>
> "Abbey" <Abbey@.discussions.microsoft.com> wrote in message
> news:1D2E126E-B6FE-411C-B157-FD3BBB49CE82@.microsoft.com...
> What
>sql
Friday, March 9, 2012
HOW TO DEPLOY A PROJECT TO REMOTE SERVER(starve for)
Several ways:
First.
Right click on your project name in the BI Dev Studio select "Properties". Click on "Deployment" node on the left and you will see the name of the server you deploying to. By default it is "localhost" , change it to boco-ace
Second.
Open SQL Management Studio. Right Click on your database name->Script database to->Create ...
Send resulting script to your new server. Make sure you process your database after creating it.
Third.
Run MigrationWizard application and point it to the project files. At some point it will ask you which server you'd like to deploy it to.
I am sure I can come up with some more.. Like Sync , Backup/Restore, ...
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
i think maybe because i built roles,so i delete the role.but it daps another error"login failed for user"NT AUTHORITY\ANONYMOUS LOGON"",i do not know how to correct it?
thanks.
database's login mode is SQL's security
|||You should use windows integrated security when connecting to Analysis Server.
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
HOW TO DEPLOY A PROJECT TO REMOTE SERVER
Several ways:
First.
Right click on your project name in the BI Dev Studio select "Properties". Click on "Deployment" node on the left and you will see the name of the server you deploying to. By default it is "localhost" , change it to boco-ace
Second.
Open SQL Management Studio. Right Click on your database name->Script database to->Create ...
Send resulting script to your new server. Make sure you process your database after creating it.
Third.
Run MigrationWizard application and point it to the project files. At some point it will ask you which server you'd like to deploy it to.
I am sure I can come up with some more.. Like Sync , Backup/Restore, ...
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
i think maybe because i built roles,so i delete the role.but it daps another error"login failed for user"NT AUTHORITY\ANONYMOUS LOGON"",i do not know how to correct it?
thanks.
database's login mode is SQL's security
|||You should use windows integrated security when connecting to Analysis Server.
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
How to deploy a custom component?
Hi
I developed a “data flow source” in my computer and it is ready!
It works in my computer, but how do I deploy this component in to the server? I have any programming environment on it.
Any Idea?
You will have to register it with the new computers GAC.
Here is a pretty good article on developing and registering a custom component (you will have to register with the web site but it is free):
http://www.sqlservercentral.com/articles/SQL+Server+2005+-+SSIS/2795/