Showing posts with label inside. Show all posts
Showing posts with label inside. Show all posts

Tuesday, March 20, 2012

cluster check

Guys,
Apart from cluster administrator, is there any way to check from inside SQL
server to know whether a particular installation is clustered?
select serverproperty('IsClustered') will tell you if a particular instance
is part of a cluster
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Bharath" <Bharath@.discussions.microsoft.com> wrote in message
news:A33FB883-4923-45A0-BAA8-434B5530D971@.microsoft.com...
> Guys,
> Apart from cluster administrator, is there any way to check from inside
> SQL
> server to know whether a particular installation is clustered?
|||thanks jasper...
"Jasper Smith" wrote:

> select serverproperty('IsClustered') will tell you if a particular instance
> is part of a cluster
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Bharath" <Bharath@.discussions.microsoft.com> wrote in message
> news:A33FB883-4923-45A0-BAA8-434B5530D971@.microsoft.com...
>
>

cluster check

Guys,
Apart from cluster administrator, is there any way to check from inside SQL
server to know whether a particular installation is clustered?select serverproperty('IsClustered') will tell you if a particular instance
is part of a cluster
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Bharath" <Bharath@.discussions.microsoft.com> wrote in message
news:A33FB883-4923-45A0-BAA8-434B5530D971@.microsoft.com...
> Guys,
> Apart from cluster administrator, is there any way to check from inside
> SQL
> server to know whether a particular installation is clustered?|||thanks jasper...
"Jasper Smith" wrote:

> select serverproperty('IsClustered') will tell you if a particular instanc
e
> is part of a cluster
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Bharath" <Bharath@.discussions.microsoft.com> wrote in message
> news:A33FB883-4923-45A0-BAA8-434B5530D971@.microsoft.com...
>
>

cluster check

Guys,
Apart from cluster administrator, is there any way to check from inside SQL
server to know whether a particular installation is clustered?select serverproperty('IsClustered') will tell you if a particular instance
is part of a cluster
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Bharath" <Bharath@.discussions.microsoft.com> wrote in message
news:A33FB883-4923-45A0-BAA8-434B5530D971@.microsoft.com...
> Guys,
> Apart from cluster administrator, is there any way to check from inside
> SQL
> server to know whether a particular installation is clustered?|||thanks jasper...
"Jasper Smith" wrote:
> select serverproperty('IsClustered') will tell you if a particular instance
> is part of a cluster
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Bharath" <Bharath@.discussions.microsoft.com> wrote in message
> news:A33FB883-4923-45A0-BAA8-434B5530D971@.microsoft.com...
> > Guys,
> >
> > Apart from cluster administrator, is there any way to check from inside
> > SQL
> > server to know whether a particular installation is clustered?
>
>

Wednesday, March 7, 2012

CLR and SQL 2005 Compact Edition

I believe that there is a also a new SQL database for the PDA. Am I right? Is it also possible to use (CF) .Net code inside this edition?

Yes. It's called SQL Server 2005 Mobile Edition. This works on Windows Mobile devices (PocketPC and SmartPhone). You need to install .NETCF 2.0 (compact framework) on the device for using SQL Mobile.

You can develop mobile applications using Visual Studio for Devices.

SQL Mobile is part of SQL Server 2005 or Visual Studio 2005.

You can get more information here:

The SQL Mobile page on MSDN : http://msdn.microsoft.com/mobility/sqlmobile/default.aspx

SQL Mobile page from SQL Server home: http://www.microsoft.com/sql/editions/sqlmobile/default.mspx

News groups: microsoft.public.sqlserver.ce. and

Msdn forums: You will find SQL Mobile under SQL Server: http://forums.microsoft.com/msdn/default.aspx?forumgroupid=19&siteid=1

|||But can you also create UDF en UDT with .Net like the desktop editions?|||SQL Mobile does not support UDT or UDF. Also the CLR is not inside SQL Mobile database. The programming model is different.

Simply stated:
SQL Mobile components is a bunch of dlls that are linked in your device application project. So the database routines are embedded in your application code.

You declare some variables, structures
Application logic - pre data processing
query, modify, delete data from SQL Mobile
Application logic - post data processing

Friday, February 24, 2012

Client user timeout

Hi,
Used Mssql 5 exp. On win 2003 server
my problem,
client user time out 15 minute by sql server,
Client user inside my program, connection closed,
logout program and relogin program work again,
no network problem, no closed network connection
How can i do,There are several reasons depending upon how the connection process is set
up. For a brief review see: http://vyaskn.tripod.com/watch_your_timeouts.htm
Anith

Tuesday, February 14, 2012

Client IP Address Search

Does anyone have a method of tracing a clients IP address
from the SPID available inside SQL Server to the sp_who2
command?Here's one I prepared earlier :-)
create proc get_hostip (@.spid int = NULL)
as
set nocount on
declare @.host varchar(100)
declare @.ip varchar(15)
declare @.cmd varchar(200)
declare @.temp varchar(255)
create table #ip(iptext varchar(255))
If @.spid is null select @.host = host_name()
else
select @.host = max(hostname)
from master.dbo.sysprocesses
where spid = @.spid
if @.host is not null
begin
set @.cmd = 'ping -n 1 ' + @.host
insert #ip exec master..xp_cmdshell @.cmd
select @.ip = ISNULL(substring(iptext,(charindex('[',iptext)+1),
(charindex(']',iptext)-(charindex('[',iptext)+1))),'')
from #ip
where charindex('[',iptext)>0
end
drop table #ip
select NULLIF(rtrim(@.host),'') as 'Hostname',
rtrim(@.ip) as 'IP_Address'
return
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"David B" <david.brough@.nygard.com> wrote in message
news:02e401c39ffb$8a4c74e0$a401280a@.phx.gbl...
Does anyone have a method of tracing a clients IP address
from the SPID available inside SQL Server to the sp_who2
command?|||I am sure you know this will not work for remote hostname. There is no way
for you to resolve my current hostname (client2) for example. This is
because my hostname is not registered with your DNS or WINS and I'm not on
your local subnets so broadcast will not reach me.
As far as name resolutions on windows is concerned, there are 2 kinds:
1. Netbios name resolution - there is no dot in the name. The order for
resolution is as follow:
NetBIOS name cache
WINS
Broadcasts
LMHOSTS
Hosts
DNS
2. Hostname resolution - the order is as follow:
Hosts
DNS
NetBIOS name cache
WINS
Broadcasts
LMHOSTS
-oj
RAC v2.2 & QALite!
http://www.rac4sql.net
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:eCdcf9$nDHA.3320@.tk2msftngp13.phx.gbl...
> Here's one I prepared earlier :-)
> create proc get_hostip (@.spid int = NULL)
> as
> set nocount on
> declare @.host varchar(100)
> declare @.ip varchar(15)
> declare @.cmd varchar(200)
> declare @.temp varchar(255)
> create table #ip(iptext varchar(255))
> If @.spid is null select @.host = host_name()
> else
> select @.host = max(hostname)
> from master.dbo.sysprocesses
> where spid = @.spid
> if @.host is not null
> begin
> set @.cmd = 'ping -n 1 ' + @.host
> insert #ip exec master..xp_cmdshell @.cmd
> select @.ip = ISNULL(substring(iptext,(charindex('[',iptext)+1),
> (charindex(']',iptext)-(charindex('[',iptext)+1))),'')
> from #ip
> where charindex('[',iptext)>0
> end
> drop table #ip
> select NULLIF(rtrim(@.host),'') as 'Hostname',
> rtrim(@.ip) as 'IP_Address'
> return
> --
> HTH
> Jasper Smith (SQL Server MVP)
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "David B" <david.brough@.nygard.com> wrote in message
> news:02e401c39ffb$8a4c74e0$a401280a@.phx.gbl...
> Does anyone have a method of tracing a clients IP address
> from the SPID available inside SQL Server to the sp_who2
> command?
>
>|||Yeah, I should have stressed its limitations, it is of course dependent on
resolving the hostname.
My PC resolves a local ping as [::1] , not sure why :-)
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"oj" <nospam_ojngo@.home.com> wrote in message
news:e8jj7QAoDHA.1764@.tk2msftngp13.phx.gbl...
I am sure you know this will not work for remote hostname. There is no way
for you to resolve my current hostname (client2) for example. This is
because my hostname is not registered with your DNS or WINS and I'm not on
your local subnets so broadcast will not reach me.
As far as name resolutions on windows is concerned, there are 2 kinds:
1. Netbios name resolution - there is no dot in the name. The order for
resolution is as follow:
NetBIOS name cache
WINS
Broadcasts
LMHOSTS
Hosts
DNS
2. Hostname resolution - the order is as follow:
Hosts
DNS
NetBIOS name cache
WINS
Broadcasts
LMHOSTS
-oj
RAC v2.2 & QALite!
http://www.rac4sql.net
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:eCdcf9$nDHA.3320@.tk2msftngp13.phx.gbl...
> Here's one I prepared earlier :-)
> create proc get_hostip (@.spid int = NULL)
> as
> set nocount on
> declare @.host varchar(100)
> declare @.ip varchar(15)
> declare @.cmd varchar(200)
> declare @.temp varchar(255)
> create table #ip(iptext varchar(255))
> If @.spid is null select @.host = host_name()
> else
> select @.host = max(hostname)
> from master.dbo.sysprocesses
> where spid = @.spid
> if @.host is not null
> begin
> set @.cmd = 'ping -n 1 ' + @.host
> insert #ip exec master..xp_cmdshell @.cmd
> select @.ip = ISNULL(substring(iptext,(charindex('[',iptext)+1),
> (charindex(']',iptext)-(charindex('[',iptext)+1))),'')
> from #ip
> where charindex('[',iptext)>0
> end
> drop table #ip
> select NULLIF(rtrim(@.host),'') as 'Hostname',
> rtrim(@.ip) as 'IP_Address'
> return
> --
> HTH
> Jasper Smith (SQL Server MVP)
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "David B" <david.brough@.nygard.com> wrote in message
> news:02e401c39ffb$8a4c74e0$a401280a@.phx.gbl...
> Does anyone have a method of tracing a clients IP address
> from the SPID available inside SQL Server to the sp_who2
> command?
>
>