Showing posts with label case. Show all posts
Showing posts with label case. Show all posts

Friday, March 23, 2012

relating tables from different databases

Hi,

I am trying to relate two tables but both are from different databases. I have a database 'Current' which has a table 'case' and another database 'Org' which has a table 'employee'. I want to establish a one-to-many relationship between employee and case. I created a coulmn 'employee_key' in the case table & entered values matching the pkey of the employee table. Then I wrote a query using joins to access the table records.

select Org..employee.pkey, Current..case.assignedengineer, Current..case.pkey from Current..case join Org..employee on Current..request.employee_key=Org..employee.pkey

Although the above query works fine, there is no relation between the two tables of the two databases, I wanted to know if this is the right way to achieve what i want to or is there a way in which i can actually create a relationship between tables of two different datbases. Can anyone suggest/help?
Also, I wanted to know if i can relate 1 table of SQL Server db with another table of Oracle DB. Please help .........
Thankssql server does not support RI between databases out of the box. You could enforce it yourself using triggers however. there are also 3rd party products that do it for you:

http://www.remote-keys.com/

I have not used this product however, I just ran across it the other day.

EDIT: maybe you can be a beta tester for it: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.sqlserver.server&tid=28c33f5c-8ae1-4f67-975a-3d002fd4d8e3&p=1sql

Friday, March 9, 2012

Reindex systems tables

Hi All
Just want to know, How can we reindex systems table? i.e
syscolumns, sysdepends, sysusers etc.
In case it can be done automatically, How can we let it
reindex by itself?
The problem is sp_help_fulltext_columns issue in nearly
the same database but generate totally different execution
plan. One execute for 1.23 minutes and another for 0.01
minutes.
I still think about the systems table because it use
only systems table concern, may be I wrong. Any recommend
will be very appreciate.
Thanks you in advance.
James Jarupan
How do the execution plans differ?
Do the system tables have the same number of rows in? Differening numbers of
rows can generate different execution plans.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"James Jarupan" <anonymous@.discussions.microsoft.com> wrote in message
news:9b7001c478cb$82022790$a301280a@.phx.gbl...
> Hi All
> Just want to know, How can we reindex systems table? i.e
> syscolumns, sysdepends, sysusers etc.
> In case it can be done automatically, How can we let it
> reindex by itself?
> The problem is sp_help_fulltext_columns issue in nearly
> the same database but generate totally different execution
> plan. One execute for 1.23 minutes and another for 0.01
> minutes.
> I still think about the systems table because it use
> only systems table concern, may be I wrong. Any recommend
> will be very appreciate.
> Thanks you in advance.
> James Jarupan
|||Something strange with this Stored Procedure,
sp_help_fulltext_columns. I test with different databases
in different computers it show the same execution plan.
The reason may be this stored procedure is in Master
Database.
So the rows in system tables should not have the effect
but I will check all again.
Can you provide the second point that I should pay
attention.
Thanks you.
James Jarupan

>--Original Message--
>How do the execution plans differ?
>Do the system tables have the same number of rows in?
Differening numbers of
>rows can generate different execution plans.
>--
>Hilary Cotter
>Looking for a book on SQL Server replication?
>http://www.nwsu.com/0974973602.html
>
>"James Jarupan" <anonymous@.discussions.microsoft.com>
wrote in message[vbcol=seagreen]
>news:9b7001c478cb$82022790$a301280a@.phx.gbl...
i.e[vbcol=seagreen]
it[vbcol=seagreen]
nearly[vbcol=seagreen]
execution[vbcol=seagreen]
recommend
>
>.
>
|||Something strange with this Stored Procedure,
sp_help_fulltext_columns. I test with different databases
in different computers it show the same execution plan.
The reason may be this stored procedure is in Master
Database.
So the rows in system tables should not have the effect
but I will check all again.
Can you provide the second point that I should pay
attention.
Thanks you.
James Jarupan

>--Original Message--
>How do the execution plans differ?
>Do the system tables have the same number of rows in?
Differening numbers of
>rows can generate different execution plans.
>--
>Hilary Cotter
>Looking for a book on SQL Server replication?
>http://www.nwsu.com/0974973602.html
>
>"James Jarupan" <anonymous@.discussions.microsoft.com>
wrote in message[vbcol=seagreen]
>news:9b7001c478cb$82022790$a301280a@.phx.gbl...
i.e[vbcol=seagreen]
it[vbcol=seagreen]
nearly[vbcol=seagreen]
execution[vbcol=seagreen]
recommend
>
>.
>

Regular Disconnection occurs in query analyzer??

Hi,
today we have a strange case, my developpers are disconnected from the
server under query analyzer only from remote stations.
The user must refresh the connection at the higher level to be connected
again.
but every 10 to 15 minutes my users are disconnected again!!!
From what I can see, this event occurs for all clients at the same time.
Any idea?
I'm connected through Terminal server to my server to see if there is any
problem, and I don't see anything wrong.
There is nothing in the event log and nothing in the SQL Server log.
Thanks for your help.
Jerome.
> From: "Jj" <willgart@._A_hAotmail_A_.com>
> Subject: Regular Disconnection occurs in query analyzer?
> Date: Tue, 27 Apr 2004 15:29:43 -0400
> Hi,
> today we have a strange case, my developpers are disconnected from the
> server under query analyzer only from remote stations.
> The user must refresh the connection at the higher level to be connected
> again.
> but every 10 to 15 minutes my users are disconnected again!!!
> From what I can see, this event occurs for all clients at the same time.
> Any idea?
> I'm connected through Terminal server to my server to see if there is any
> problem, and I don't see anything wrong.
> There is nothing in the event log and nothing in the SQL Server log.
> Thanks for your help.
> Jerome.
Hi Jerome,
Check the SQL Server errorlogs for any errors coinciding with the
disconnects. If nothing, you may have to capture a network trace to find
out why users are disconnecting.
Hope this helps,
Eric Crdenas
SQL Server senior support professional

Regular Disconnection occurs in query analyzer??

Hi,
today we have a strange case, my developpers are disconnected from the
server under query analyzer only from remote stations.
The user must refresh the connection at the higher level to be connected
again.
but every 10 to 15 minutes my users are disconnected again!!!
From what I can see, this event occurs for all clients at the same time.
Any idea?
I'm connected through Terminal server to my server to see if there is any
problem, and I don't see anything wrong.
There is nothing in the event log and nothing in the SQL Server log.
Thanks for your help.
Jerome.> From: "Jj" <willgart@._A_hAotmail_A_.com>
> Subject: Regular Disconnection occurs in query analyzer?
> Date: Tue, 27 Apr 2004 15:29:43 -0400
> Hi,
> today we have a strange case, my developpers are disconnected from the
> server under query analyzer only from remote stations.
> The user must refresh the connection at the higher level to be connected
> again.
> but every 10 to 15 minutes my users are disconnected again!!!
> From what I can see, this event occurs for all clients at the same time.
> Any idea?
> I'm connected through Terminal server to my server to see if there is any
> problem, and I don't see anything wrong.
> There is nothing in the event log and nothing in the SQL Server log.
> Thanks for your help.
> Jerome.
--
Hi Jerome,
Check the SQL Server errorlogs for any errors coinciding with the
disconnects. If nothing, you may have to capture a network trace to find
out why users are disconnecting.
Hope this helps,
Eric Crdenas
SQL Server senior support professional

Wednesday, March 7, 2012

Regular Disconnection occurs in query analyzer??

Hi,
today we have a strange case, my developpers are disconnected from the
server under query analyzer only from remote stations.
The user must refresh the connection at the higher level to be connected
again.
but every 10 to 15 minutes my users are disconnected again!!!
From what I can see, this event occurs for all clients at the same time.
Any idea?
I'm connected through Terminal server to my server to see if there is any
problem, and I don't see anything wrong.
There is nothing in the event log and nothing in the SQL Server log.
Thanks for your help.
Jerome.> From: "Jéjé" <willgart@._A_hAotmail_A_.com>
> Subject: Regular Disconnection occurs in query analyzer?
> Date: Tue, 27 Apr 2004 15:29:43 -0400
> Hi,
> today we have a strange case, my developpers are disconnected from the
> server under query analyzer only from remote stations.
> The user must refresh the connection at the higher level to be connected
> again.
> but every 10 to 15 minutes my users are disconnected again!!!
> From what I can see, this event occurs for all clients at the same time.
> Any idea?
> I'm connected through Terminal server to my server to see if there is any
> problem, and I don't see anything wrong.
> There is nothing in the event log and nothing in the SQL Server log.
> Thanks for your help.
> Jerome.
--
Hi Jerome,
Check the SQL Server errorlogs for any errors coinciding with the
disconnects. If nothing, you may have to capture a network trace to find
out why users are disconnecting.
Hope this helps,
--
Eric Cárdenas
SQL Server senior support professional