Showing posts with label relationships. Show all posts
Showing posts with label relationships. Show all posts

Friday, March 23, 2012

odbc connection multi domain no trust

If you have one domain of application servers running win2000 and seperate
user domains with no trust relationships accessing sql databases on the
application domain what needs to be done rights wise and is this possible
without connectivity issues. Currently these servers are standalone not in a
domain and users can currenlty access this through local logon sql rights on
the stand alone servers. Thanks.
If there is no domain trust then you will either need to use SQL
authentication or create NT accounts on the SQL Server machines that mirror
the accounts that the users logon to their client machines with. The
accounts will have to have the same name and password. Using this method
you can use NT authentication to SQL Server.
Rand
This posting is provided "as is" with no warranties and confers no rights.

odbc connection multi domain no trust

If you have one domain of application servers running win2000 and seperate
user domains with no trust relationships accessing sql databases on the
application domain what needs to be done rights wise and is this possible
without connectivity issues. Currently these servers are standalone not in
a
domain and users can currenlty access this through local logon sql rights on
the stand alone servers. Thanks.If there is no domain trust then you will either need to use SQL
authentication or create NT accounts on the SQL Server machines that mirror
the accounts that the users logon to their client machines with. The
accounts will have to have the same name and password. Using this method
you can use NT authentication to SQL Server.
Rand
This posting is provided "as is" with no warranties and confers no rights.sql

Wednesday, March 7, 2012

Obtaining foreing keys dependences

I want to know how to obtain the relationships of foreing keys when they have diferent names in diferent tables using SQL querys from VB.net in SQL Server 2000.

Example:

Table Person
----
IDPerson
Name
Address

Table Customer
-----
IDCustomer
.
.
.

Table Employee
-----
IDEmployee
.
.
.

The dependencies are:

IDPerson-->IDCustomer
IDPerson-->IDEmployeeI think you need to query sysforiegnkeys, syscolumns and sysobjects|||Thanks, it wasnt easy but it's done.

Rodrigo

Obtaining data from different tables in the same database

Hi

I've been doing a website with ajax controls and I have tables that has foreign key relationships and hence the main page requires the data from the tables from the foreign keys stored in a separate table. Can anyone help me out with the proper way of querying the tables. Am not able to work out the way with the joins that SQL express provides.

Thanks

Here's a sample query:

TableA contains 3 columns: Data1, Data2, ForeignKey
TableB contains 2 columns: RecordId, SomeOtherData

The RecordId value from TableB has been stored in the ForeignKey column of TableA

SELECT TableA.Data1, TableA.Data2, TableB.SomeOtherDataFROM TableAINNERJOIN TableBON TableA.ForeignKey = TableB.RecordId

Each row of data that is retrieved will look like:

Data1,Data2, [ForeignKey] <--> [RecordId],SomeOtherData