Showing posts with label names. Show all posts
Showing posts with label names. Show all posts

Wednesday, March 28, 2012

I dont see any hostname in sysprocesses

Why do I not see the hostnames in my sysprocesses ? I am trying to find the
names of hosts connected.
I see a net_address column. How can I track the hostname from the
net_address?
Also how can I ensure we get the hostnames to display..i..e. how do I get
the app devs to work this out.
ThanksHassan
If you use Citrix you do not see hostnames
"Hassan" <hassan@.test.com> wrote in message
news:eBoc9SxKIHA.5224@.TK2MSFTNGP02.phx.gbl...
> Why do I not see the hostnames in my sysprocesses ? I am trying to find
> the names of hosts connected.
> I see a net_address column. How can I track the hostname from the
> net_address?
> Also how can I ensure we get the hostnames to display..i..e. how do I get
> the app devs to work this out.
> Thanks
>|||Hassan;
That depends on the Workstation ID setting in the connection string of the
app. Many APIs will set it to the default local hostname if it's not
explicitly set. For instance, if you are using System.Data.SqlClient (.NET
SQL Server Provider) or System.Data.OleDb (.NET data provider for OLEDB),
both will set it to the local host name for you. But to ensure that hostname
is present, it's safe to always set the Workstation ID property explicitly in
the app's connection string.
Linchi
"Hassan" wrote:
> Why do I not see the hostnames in my sysprocesses ? I am trying to find the
> names of hosts connected.
> I see a net_address column. How can I track the hostname from the
> net_address?
> Also how can I ensure we get the hostnames to display..i..e. how do I get
> the app devs to work this out.
> Thanks
>
>|||"Hassan" <hassan@.test.com> wrote in message
news:eBoc9SxKIHA.5224@.TK2MSFTNGP02.phx.gbl...
> I see a net_address column. How can I track the hostname from the
> net_address?
>
In SQL Server 2005 you can have a CLR function to resolve the IP address to
host name. Most likely using System.Net.Dns.
HTH,
Plamen Ratchev
http://www.SQLStudio.com

Wednesday, March 21, 2012

I cannot transfer column DEFAULT values from old table to new table

Hi all,
SQL 2000
I am doing :
SELECT *
INTO NewTable
FROM OldTable
WHERE 1 =0
The NewTable has the same :
column names, Data Type and Length BUT the column DEFAULT VALUES
don't get transferred , I always have te reenter them manually.
Does any one have a quick solution? Thanks a millionDefaults is a type of constraint, and those are not carried over with SELECT
INTO. For this, you
have to script the table...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
<placidite1@.yahoo.com> wrote in message news:1178732983.525139.93780@.u30g2000hsc.googlegroup
s.com...
> Hi all,
> SQL 2000
> I am doing :
> SELECT *
> INTO NewTable
> FROM OldTable
> WHERE 1 =0
> The NewTable has the same :
> column names, Data Type and Length BUT the column DEFAULT VALUES
> don't get transferred , I always have te reenter them manually.
> Does any one have a quick solution? Thanks a million
>|||Thanks Mr Tibor Karaszi
I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
formation
and it doesn't carry over the Default Constraint either...I have the
CREATE TABLE script, but
no default values.
Is there any tool within SQL 2000 that will do it (ie carry over the
default values)?
Thanks a million.
On May 9, 1:54 pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> Defaults is a type of constraint, and those are not carried over with SELE
CT INTO. For this, you
> have to script thetable...
> --
> Tibor Karaszi,SQLServer MVPhttp://www.karaszi.com/sqlserver/default.asphtt
p://sqlblog.com/blogs/tibor_karaszi
>
> <placidi...@.yahoo.com> wrote in messagenews:1178732983.525139.93780@.u30g20
00hsc.googlegroups.com...
>

>
> - Show quoted text -|||> I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
> formation
You need to configure this to include constraints.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<placidite1@.yahoo.com> wrote in message
news:1178748995.880148.288630@.e65g2000hsc.googlegroups.com...
> Thanks Mr Tibor Karaszi
> I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
> formation
> and it doesn't carry over the Default Constraint either...I have the
> CREATE TABLE script, but
> no default values.
> Is there any tool within SQL 2000 that will do it (ie carry over the
> default values)?
> Thanks a million.
>
> On May 9, 1:54 pm, "Tibor Karaszi"
> <tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
>
>

I cannot transfer column DEFAULT values from old table to new table

Hi all,
SQL 2000
I am doing :
SELECT *
INTO NewTable
FROM OldTable
WHERE 1 =0
The NewTable has the same :
column names, Data Type and Length BUT the column DEFAULT VALUES
don't get transferred , I always have te reenter them manually.
Does any one have a quick solution? Thanks a millionDefaults is a type of constraint, and those are not carried over with SELECT INTO. For this, you
have to script the table...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
<placidite1@.yahoo.com> wrote in message news:1178732983.525139.93780@.u30g2000hsc.googlegroups.com...
> Hi all,
> SQL 2000
> I am doing :
> SELECT *
> INTO NewTable
> FROM OldTable
> WHERE 1 =0
> The NewTable has the same :
> column names, Data Type and Length BUT the column DEFAULT VALUES
> don't get transferred , I always have te reenter them manually.
> Does any one have a quick solution? Thanks a million
>|||Thanks Mr Tibor Karaszi
I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
formation
and it doesn't carry over the Default Constraint either...I have the
CREATE TABLE script, but
no default values.
Is there any tool within SQL 2000 that will do it (ie carry over the
default values)?
Thanks a million.
On May 9, 1:54 pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> Defaults is a type of constraint, and those are not carried over with SELECT INTO. For this, you
> have to script thetable...
> --
> Tibor Karaszi,SQLServer MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
>
> <placidi...@.yahoo.com> wrote in messagenews:1178732983.525139.93780@.u30g2000hsc.googlegroups.com...
> > Hi all,
>
> >SQL2000
> > I am doing :
> > SELECT *
> > INTO NewTable
> > FROM OldTable
> > WHERE 1 =0
> > The NewTable has the same :
> >columnnames, Data Type and Length BUT thecolumnDEFAULTVALUES
> > don't get transferred , I always have te reenter them manually.
> > Does any one have a quick solution? Thanks a million- Hide quoted text -
> - Show quoted text -|||> I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
> formation
You need to configure this to include constraints.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<placidite1@.yahoo.com> wrote in message
news:1178748995.880148.288630@.e65g2000hsc.googlegroups.com...
> Thanks Mr Tibor Karaszi
> I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
> formation
> and it doesn't carry over the Default Constraint either...I have the
> CREATE TABLE script, but
> no default values.
> Is there any tool within SQL 2000 that will do it (ie carry over the
> default values)?
> Thanks a million.
>
> On May 9, 1:54 pm, "Tibor Karaszi"
> <tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
>> Defaults is a type of constraint, and those are not carried over with SELECT INTO. For this, you
>> have to script thetable...
>> --
>> Tibor Karaszi,SQLServer
>> MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
>>
>> <placidi...@.yahoo.com> wrote in
>> messagenews:1178732983.525139.93780@.u30g2000hsc.googlegroups.com...
>> > Hi all,
>> >SQL2000
>> > I am doing :
>> > SELECT *
>> > INTO NewTable
>> > FROM OldTable
>> > WHERE 1 =0
>> > The NewTable has the same :
>> >columnnames, Data Type and Length BUT thecolumnDEFAULTVALUES
>> > don't get transferred , I always have te reenter them manually.
>> > Does any one have a quick solution? Thanks a million- Hide quoted text -
>> - Show quoted text -
>

I cannot transfer column DEFAULT values from old table to new table

Hi all,
SQL 2000
I am doing :
SELECT *
INTO NewTable
FROM OldTable
WHERE 1 =0
The NewTable has the same :
column names, Data Type and Length BUT the column DEFAULT VALUES
don't get transferred , I always have te reenter them manually.
Does any one have a quick solution? Thanks a million
Defaults is a type of constraint, and those are not carried over with SELECT INTO. For this, you
have to script the table...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
<placidite1@.yahoo.com> wrote in message news:1178732983.525139.93780@.u30g2000hsc.googlegro ups.com...
> Hi all,
> SQL 2000
> I am doing :
> SELECT *
> INTO NewTable
> FROM OldTable
> WHERE 1 =0
> The NewTable has the same :
> column names, Data Type and Length BUT the column DEFAULT VALUES
> don't get transferred , I always have te reenter them manually.
> Does any one have a quick solution? Thanks a million
>
|||Thanks Mr Tibor Karaszi
I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
formation
and it doesn't carry over the Default Constraint either...I have the
CREATE TABLE script, but
no default values.
Is there any tool within SQL 2000 that will do it (ie carry over the
default values)?
Thanks a million.
On May 9, 1:54 pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> Defaults is a type of constraint, and those are not carried over with SELECT INTO. For this, you
> have to script thetable...
> --
> Tibor Karaszi,SQLServer MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
>
> <placidi...@.yahoo.com> wrote in messagenews:1178732983.525139.93780@.u30g2000hsc.go oglegroups.com...
>

>
> - Show quoted text -
|||> I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
> formation
You need to configure this to include constraints.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<placidite1@.yahoo.com> wrote in message
news:1178748995.880148.288630@.e65g2000hsc.googlegr oups.com...
> Thanks Mr Tibor Karaszi
> I tried the SQL 2000 -> All Tasks -> Generate SQL Script on the table
> formation
> and it doesn't carry over the Default Constraint either...I have the
> CREATE TABLE script, but
> no default values.
> Is there any tool within SQL 2000 that will do it (ie carry over the
> default values)?
> Thanks a million.
>
> On May 9, 1:54 pm, "Tibor Karaszi"
> <tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
>
>