Showing posts with label developed. Show all posts
Showing posts with label developed. Show all posts

Thursday, March 29, 2012

Does SQL Server Exist

Hi All,

I am trying to write an application to install a product that my company has developed. As part of the install I want to perform some validation ie is IIS running is SQL 2000 running etc before installation. The application is in VB .net can anyone tell me if it is possible to check if SQL Server 2000 exists and is running?

Thanks in advance for your help.

Cheers,

SamBefore using SQL DMO or something to check the service state of SQL Server, why not issuing a simple command like "Select 1" to check whether the server is up or not. Of you want to check for the presence of a database you might issue the command:
Select 1 from master..sysdatabases Where name = 'YourDBNametoCheckfor'

HTH, Jens Suessmeyer|||i would first check if network is available, after check if the server (not sql database server) is on-line... and then check if database server is installed... i'm using this for now till i find something better
i open connection to the server for default database and if its not there (exception) then the sql server is either not runing or it's service is stoped...
hope this helps a bit.... its not perfect but it helps for now...
Private Function CheckServer() As Boolean
Try
Dim MyCnn As New SqlClient.SqlConnection(m_CnnString)
Dim MyCmd As New SqlClient.SqlCommand
MyCnn.Open()
MyCnn.Close()
Return True
Catch ex As SqlException
Return False
Catch ex As Exception
Return False
End Try
End Function

and here i check if database with that name exists
Private Function CheckDb() As Boolean
Dim MyCnn As New SqlClient.SqlConnection(m_CnnString)
Dim MyCmd As New SqlClient.SqlCommand
MyCnn.Open()
With MyCmd
.Connection = MyCnn
'this line of code well sql query i found somewhere on this forums
.CommandText = "Select 1 from master..sysdatabases Where name = '" & m_dbName & "'"
.CommandType = CommandType.Text
End With
Try
Select Case (MyCmd.ExecuteScalar).ToString
Case 1
Return True
MyCnn.Close()
Exit Function
Case Else
Return False
MyCnn.Close()
Exit Function
End Select
Catch ex As NullReferenceException
Return False
MyCnn.Close()
Exit Function
End Try
MyCnn.Close()
End Function

Does SQL Server Exist

Hi All,

I am trying to write an application to install a product that my company has developed. As part of the install I want to perform some validation ie is IIS running is SQL 2000 running etc before installation. The application is in VB .net can anyone tell me if it is possible to check if SQL Server 2000 exists and is running?

Thanks in advance for your help.

Cheers,

SamBefore using SQL DMO or something to check the service state of SQL Server, why not issuing a simple command like "Select 1" to check whether the server is up or not. Of you want to check for the presence of a database you might issue the command:
Select 1 from master..sysdatabases Where name = 'YourDBNametoCheckfor'

HTH, Jens Suessmeyer|||i would first check if network is available, after check if the server (not sql database server) is on-line... and then check if database server is installed... i'm using this for now till i find something better
i open connection to the server for default database and if its not there (exception) then the sql server is either not runing or it's service is stoped...
hope this helps a bit.... its not perfect but it helps for now...
Private Function CheckServer() As Boolean
Try
Dim MyCnn As New SqlClient.SqlConnection(m_CnnString)
Dim MyCmd As New SqlClient.SqlCommand
MyCnn.Open()
MyCnn.Close()
Return True
Catch ex As SqlException
Return False
Catch ex As Exception
Return False
End Try
End Function

and here i check if database with that name exists
Private Function CheckDb() As Boolean
Dim MyCnn As New SqlClient.SqlConnection(m_CnnString)
Dim MyCmd As New SqlClient.SqlCommand
MyCnn.Open()
With MyCmd
.Connection = MyCnn
'this line of code well sql query i found somewhere on this forums
.CommandText = "Select 1 from master..sysdatabases Where name = '" & m_dbName & "'"
.CommandType = CommandType.Text
End With
Try
Select Case (MyCmd.ExecuteScalar).ToString
Case 1
Return True
MyCnn.Close()
Exit Function
Case Else
Return False
MyCnn.Close()
Exit Function
End Select
Catch ex As NullReferenceException
Return False
MyCnn.Close()
Exit Function
End Try
MyCnn.Close()
End Function

Sunday, February 19, 2012

Documenting a Database

Hi,
I have designed and developed a database. Now I want to prepare some
documentation so that other developers can continue working on that.
How can I do this? Are there any standard ways to describe the entities and
procedures using some tools or etc.
Thanks in advance,
Leila
Hi
With the Enterprise Edition of Visio you can produce reports and diagrams
for your database, other modeling tools will provide similar functions.
You can also add extended properties to document your database such as
http://www.aspfaq.com/show.asp?id=2244
John
"Leila" <Leilas@.hotpop.com> wrote in message
news:%23527A5D7EHA.3616@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I have designed and developed a database. Now I want to prepare some
> documentation so that other developers can continue working on that.
> How can I do this? Are there any standard ways to describe the entities
> and
> procedures using some tools or etc.
> Thanks in advance,
> Leila
>
|||I can't pass this one up. How did you design a database without
documentation? Oh, nevermind!!!
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:uDoASTE7EHA.4040@.TK2MSFTNGP14.phx.gbl...
> Hi
> With the Enterprise Edition of Visio you can produce reports and diagrams
> for your database, other modeling tools will provide similar functions.
> You can also add extended properties to document your database such as
> http://www.aspfaq.com/show.asp?id=2244
> John
> "Leila" <Leilas@.hotpop.com> wrote in message
> news:%23527A5D7EHA.3616@.TK2MSFTNGP11.phx.gbl...
>
>

Documenting a Database

Hi,
I have designed and developed a database. Now I want to prepare some
documentation so that other developers can continue working on that.
How can I do this? Are there any standard ways to describe the entities and
procedures using some tools or etc.
Thanks in advance,
LeilaHi
With the Enterprise Edition of Visio you can produce reports and diagrams
for your database, other modeling tools will provide similar functions.
You can also add extended properties to document your database such as
http://www.aspfaq.com/show.asp?id=2244
John
"Leila" <Leilas@.hotpop.com> wrote in message
news:%23527A5D7EHA.3616@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I have designed and developed a database. Now I want to prepare some
> documentation so that other developers can continue working on that.
> How can I do this? Are there any standard ways to describe the entities
> and
> procedures using some tools or etc.
> Thanks in advance,
> Leila
>|||I can't pass this one up. :) How did you design a database without
documentation? Oh, nevermind!!!
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:uDoASTE7EHA.4040@.TK2MSFTNGP14.phx.gbl...
> Hi
> With the Enterprise Edition of Visio you can produce reports and diagrams
> for your database, other modeling tools will provide similar functions.
> You can also add extended properties to document your database such as
> http://www.aspfaq.com/show.asp?id=2244
> John
> "Leila" <Leilas@.hotpop.com> wrote in message
> news:%23527A5D7EHA.3616@.TK2MSFTNGP11.phx.gbl...
> > Hi,
> > I have designed and developed a database. Now I want to prepare some
> > documentation so that other developers can continue working on that.
> > How can I do this? Are there any standard ways to describe the entities
> > and
> > procedures using some tools or etc.
> > Thanks in advance,
> > Leila
> >
> >
>
>

Documenting a Database

Hi,
I have designed and developed a database. Now I want to prepare some
documentation so that other developers can continue working on that.
How can I do this? Are there any standard ways to describe the entities and
procedures using some tools or etc.
Thanks in advance,
LeilaHi
With the Enterprise Edition of visio you can produce reports and diagrams
for your database, other modeling tools will provide similar functions.
You can also add extended properties to document your database such as
http://www.aspfaq.com/show.asp?id=2244
John
"Leila" <Leilas@.hotpop.com> wrote in message
news:%23527A5D7EHA.3616@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I have designed and developed a database. Now I want to prepare some
> documentation so that other developers can continue working on that.
> How can I do this? Are there any standard ways to describe the entities
> and
> procedures using some tools or etc.
> Thanks in advance,
> Leila
>|||I can't pass this one up. How did you design a database without
documentation? Oh, nevermind!!!
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:uDoASTE7EHA.4040@.TK2MSFTNGP14.phx.gbl...
> Hi
> With the Enterprise Edition of visio you can produce reports and diagrams
> for your database, other modeling tools will provide similar functions.
> You can also add extended properties to document your database such as
> http://www.aspfaq.com/show.asp?id=2244
> John
> "Leila" <Leilas@.hotpop.com> wrote in message
> news:%23527A5D7EHA.3616@.TK2MSFTNGP11.phx.gbl...
>
>