Loading ...
Sorry, an error occurred while loading the content.

RE: [SQLQueriesNoCode] SQl Server trigger to query Pervasive?

Expand Messages
  • John Warner
    Thanks. Long time no see your posts. Hope you are well and enjoying the summer. John Warner ... the ... seem ... the ... away ... database, ... under ... name
    Message 1 of 9 , Jul 8, 2009
    View Source
    • 0 Attachment
      Thanks.
      Long time no see your posts. Hope you are well and enjoying the summer.

      John Warner


      > -----Original Message-----
      > From: SQLQueriesNoCode@yahoogroups.com
      > [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of Arnie Rowland
      > Sent: Wednesday, July 08, 2009 10:10 AM
      > To: SQLQueriesNoCode@yahoogroups.com
      > Subject: RE: [SQLQueriesNoCode] SQl Server trigger to query Pervasive?
      >
      > Hi John,
      >
      > Using sp_addlinedserver places the remote server connection details into
      the
      > system view (table) sys.servers, that is persisted in master.
      >
      > Using SSMS, you can access the connection details in the object browser
      > under [Server Objects]/[Linked Servers].
      >
      >
      > Regards,
      >
      > Arnie Rowland, MVP (SQL Server)
      >
      > "Fortune favors the prepared mind." Louis Pasteur
      >
      >
      >
      >
      > -----Original Message-----
      > From: SQLQueriesNoCode@yahoogroups.com
      > [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of John Warner
      > Sent: Wednesday, July 08, 2009 6:50 AM
      > To: Arnie
      > Subject: RE: [SQLQueriesNoCode] SQl Server trigger to query Pervasive?
      >
      > Paul, thanks again for the help here. One more question that does not
      seem
      > clear from my reading on the web.
      > When using sp_addlinkedserver is the connection/link permanent or does
      the
      > proc need to be re-run every time Pervasive will need to be queried?
      > I guess really what I need to know is the 'scope' of this, does it go
      away
      > with a reboot/restart of SQL Server or Pervasive? Does it die at the end
      > of the current session?
      >
      > Thanks again for your help here, I wouldn't even be able to ask this
      > question without your assistance.
      >
      > John Warner
      >
      >
      > > -----Original Message-----
      > > From: SQLQueriesNoCode@yahoogroups.com
      > > [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of Paul
      > Livengood
      > > Sent: Friday, June 26, 2009 9:45 AM
      > > To: SQLQueriesNoCode@yahoogroups.com
      > > Subject: Re: [SQLQueriesNoCode] SQl Server trigger to query Pervasive?
      > >
      > > Sure it can
      > > You can setup a linked server to your odbc database (any odbc
      database,
      > > even Excel, Access, Oracle, DB2, etc). Then you just need to use the
      > fully
      > > qualified name to reference it.
      > >
      > > For example. If you have an external database called
      > MyExternalDatabase.
      > > You would setup a linked server (usually easier via the GUID (look
      under
      > > Server Objects>>Linked Servers)) called MyExternalDatabase. Then you
      > can
      > > perform normal SQL Functions against it by using a fully qualified
      name
      > (select
      > > * from ServerName.Database.Owner.Table)
      > >
      > > As for preventing circular triggers you want to check the
      > > RECURSIVE_TRIGGERS setting (just Google SQL 2005 and
      > > RECURSIVE_TRIGGERS).
      > >
      > > Those are the two main topics ("SQL 2005 Linked Servers" and "SQL 2005
      > > RECURSIVE_TRIGGERS).
      > >
      > > Note; If this is your first time with a Linked server then can be a
      > little tricky, just
      > > be paitient and don't hesitate to ask questions.
      > >
      > > HTH
      > > Paul
      > >
      > >
      > >
      > >
      > > ________________________________
      > > From: John Warner <john@...>
      > > To: SQLQueriesNoCode@yahoogroups.com
      > > Sent: Friday, June 26, 2009 7:29:52 AM
      > > Subject: [SQLQueriesNoCode] SQl Server trigger to query Pervasive?
      > >
      > >
      > >
      > >
      > >
      > > I have a sort of unusual 'requirement' . I need to code a trigger (not
      > the
      > > main issue) in SQL Server Express 2005 that when a table is updated
      goes
      > > out and queries a Pervasive database (ODBC) for some data and then
      adds
      > > that data to the SQL Server table. My question is can such a trigger
      be
      > > written that can run queries to an ODBC data source and my other
      concern
      > > is that I don't create a trigger that of course fires itself.
      > >
      > > Just about everyone on this list is smarter than I am and so I turn to
      > the
      > > collective knowledge base.
      > > Can what I want be done?
      > > Any suggestions on avoiding the 'circular' trigger?
      > >
      > > Thanks
      > >
      > > John Warner
      > >
      > >
      > >
      > >
      > > [Non-text portions of this message have been removed]
      > >
      > >
      > >
      > > ------------------------------------
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > >
      >
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      > Disclaimer - July 8, 2009
      > This email and any files transmitted with it are confidential and
      intended solely
      > for SQLQueriesNoCode@yahoogroups.com. If you are not the named
      > addressee you should not disseminate, distribute, copy or alter this
      email. Any
      > views or opinions presented in this email are solely those of the author
      and
      > might not represent those of Westwood Consulting, Inc. Warning: Although
      > Westwood Consulting, Inc has taken reasonable precautions to ensure no
      > viruses are present in this email, the company cannot accept
      responsibility for
      > any loss or damage arising from the use of this email or attachments.
      > This disclaimer was added by Policy Patrol: http://www.policypatrol.com/
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.