Showing posts with label selected. Show all posts
Showing posts with label selected. Show all posts

Monday, March 19, 2012

create relationship with tables in a linked server

I need to create a relationship between a local table and tables on a
linked server. I used the design table wizard and selected the
relationship property wizard. In the reslationship property wizard,
the tables that I need to get the keys from in the linked server do not
show up. Is there a way to do this, or I simply don't have enough
permission to tables in the linked server. On the local server, the
Security tab of linked server property has Local Loging "sa", Remote
User "sa" and Remote Password "****". Thanks for your help.Hi

You can not create a relationship in this way, you are restricted to
definining FKs to tables in the same database. If you wish to force a
constraint between the local table and the remote one, you can write a
function that can be used in a check constraint or enforce it through
writing a trigger (which may be the faster and easier solution to
implement).

John

"js" <androidsun@.yahoo.com> wrote in message
news:1102725393.883680.211450@.z14g2000cwz.googlegr oups.com...
>I need to create a relationship between a local table and tables on a
> linked server. I used the design table wizard and selected the
> relationship property wizard. In the reslationship property wizard,
> the tables that I need to get the keys from in the linked server do not
> show up. Is there a way to do this, or I simply don't have enough
> permission to tables in the linked server. On the local server, the
> Security tab of linked server property has Local Loging "sa", Remote
> User "sa" and Remote Password "****". Thanks for your help.

Wednesday, March 7, 2012

Create login problem in SQL Server 2005

Hey guys,

I'm having a problem making a new login inside the sql management studio, the problem is, when i create a new login, i selected SQL Authentication, then type a password, then uncheck Enforce password policy.

i then select the database i want the login to be associated with, but once i click ok i get this exception:
Create failed for Login ''. (Microsoft.SqlServer.Smo)

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
"An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Add a name or single space as the alias name. (Microsoft SQL Server, Error: 1038)

I even tried with Northwind and a brand new database with a table and 2 columns but it's the same story every time.
Any ideas?

Thanks a bunchMake sure you have entered "Login Name" in the text box provided at the top of the window

thanks
Anoop

Sunday, February 19, 2012

Create DTS with two databases

Hi,
I need to get some selected columns of two tables in TWO DATABASES , AND get those data to an excel file. Think the best way is to create a DTS. But dont know how to create it for this situation (having two databases) . Please help me to solve this problem.

ThanksNot sure if it is 2 databases on one server or two servers and need to be linked first but anyway create a view with all data you need in one databases and then use this view as a source for your data.

Good Luck.|||Hi,

Thanks a lot for your advice. Yes that method works fine.

Sudantha