[dba-SQLServer]Linking to Local Table

Djabarov, Robert Robert.Djabarov at usaa.com
Wed Oct 29 19:27:01 CST 2003


I don't think Hostname() is a valid function.  There is a global
variable that'll return the computer name of the server where SQL Server
is installed, also known as an instance name (due to multi-instance
capabilities of 2K), - @@SERVERNAME.

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stuart
McLachlan
Sent: Wednesday, October 29, 2003 7:20 PM
To: David Emerson; dba-sqlserver at databaseadvisors.com
Subject: Re: [dba-SQLServer]Linking to Local Table


On 30 Oct 2003 at 11:41, David Emerson wrote:

> At 30/10/2003, you wrote:
> >On 30 Oct 2003 at 7:22, David Emerson wrote:
> >
> > > Thanks for your suggestions Stuart and Paul,
> > >
> > > To avoid needing to maintain a large number of users we have just 
> > > set up half a dozen generic users.  This means that 2 people could

> > > be logged
> > on to
> > > the database with the same user name.  In fact, in my problem
> > situation, it
> > > is only one 'user name' that uses the temptable.
> > >
> >Bad security design from the start :-(
> >What do you do if one user leaves/changes position and you have to 
> >prevent their further access to the system?
> 
> If they leave they no longer have access to the server.
> 
> If they change position they will be promoted (no demotions - just out

> the
> door) giving them access to all previous areas plus the new ones.
> 
> 
> >OK, use the PCs network name as the identifier.
> 
> Ah, now there is a thought.  Is there a function that returns this?
> 
> 

In SQL Server use Hostname()

In Access use a call to the API function GetComputerName()


-- 
Stuart McLachlan
Lexacorp Ltd
Application Development,  IT Consultancy http://www.lexacorp.com.pg

_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com



More information about the dba-SQLServer mailing list