Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: connection to DB

by AppleFritter (Vicar)
on Oct 16, 2015 at 20:31 UTC ( [id://1145152]=note: print w/replies, xml ) Need Help??


in reply to connection to DB

You'll need the appropriate database driver (i.e. DBD:: module) installed to access any database. A quick CPAN search indicates that none exists for RainStor, though given that RainStor is apparently part of Teradata these days perhaps the Teradata driver will work. (Only one way to find out - have you tried?)

With the right driver in place, the basic procedure for connecting is the same, with the caveat that the syntax of the connect string itself - the dbi:Teradata:$DSN:1025 bit from your example - is driver-dependent. From the DBI documentation:

There is no standard for the text following the driver name. Each driver is free to use whatever syntax it wants. The only requirement the DBI makes is that all the information is supplied in a single string. You must consult the documentation for the drivers you are using for a description of the syntax they require.

Finally, tdat_lsn appears to be a Teradata-specific attribute, so you may have to read up on what it does and find an equivalent if you're looking to connect to a different type of database. The DBD::Teradata documentation (here, not on CPAN) has this to say:

tdat_lsn

Write-only connect() attribute, Read-only on connection handle.

When specified on connect():

  • if specified with a value of zero, causes the session to allocate an LSN from the DBMS, which can be queried after successful connection using the tdat_lsn attribute.
  • if specified with a non-zero value, causes the session to associate with the provided LSN value.

If not specified during connect(), no LSN action is performed, and querying tdat_lsn after connection will return undef.

After connect(), the LSN value can be queried via the database handle tdat_lsn attribute.

I reckon LSN may stand for "log sequence number", but you'll know better than I do.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1145152]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-26 03:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found