Sponsored Content
Top Forums Shell Programming and Scripting Connection to Microsoft SQL Server Post 302388671 by zaxxon on Thursday 21st of January 2010 05:08:48 AM
Old 01-21-2010
You got a 1st warning and a 2nd warning and both contained a preformatted message from Neo how to use code tags which explains it decent. You also got a PM from me where I stated when to use them.

Also you can just use the edit function on the posts I have edited for you already and check the code.
 

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

(perl) Microsoft SQL Server client for solaris. cant find it...

let me save everyone the pain that it caused me. This is all free. And make sure it is in this order 1) make sure you have the latest version of perl installed 2) make sure you have NET:aemon installed 3) make sure you have RPC::PlServer & PlClient (the bundle has both) 4) make sure... (3 Replies)
Discussion started by: Optimus_P
3 Replies

2. SuSE

Syslog-ng 3.0.7 fails to insert into microsoft sql server

Dear All, Im currently configuring syslog-ng on SUSE Linux 10 SP2 to communicate with microsoft sql server 2005. I have installed freeTds 8.0. Tested TSQL ..works fine ISQL works fine. when testing with syslog-ng destination d_mssql { sql(type(mssql) host("ip address")... (0 Replies)
Discussion started by: SystemEng
0 Replies

3. UNIX for Dummies Questions & Answers

Test new DSN connection to sql server

I installed an odbc driver and created a DSN to connect to a sql server database on AIX 6. I want to know how to test the DSN from the command line. What syntax or commands do I use? ---------- Post updated at 11:44 AM ---------- Previous update was at 08:26 AM ---------- OK I figured out how... (9 Replies)
Discussion started by: Jdbrown239
9 Replies

4. UNIX for Dummies Questions & Answers

UNIX string connection to sql server db

Hi, i have to perform a connection from unix to sql server database, using TCP protocol. I have all connection parameters (user,pwd,server_name,port,db_name). How can i perform this connection, by unix console ? is it available a command similar to this one (for oracle): sqlplus... (1 Reply)
Discussion started by: nash83
1 Replies
DBIx::Class::Storage::DBI::MSSQL(3)			User Contributed Perl Documentation		       DBIx::Class::Storage::DBI::MSSQL(3)

NAME
DBIx::Class::Storage::DBI::MSSQL - Base Class for Microsoft SQL Server support in DBIx::Class SYNOPSIS
This is the base class for Microsoft SQL Server support, used by DBIx::Class::Storage::DBI::ODBC::Microsoft_SQL_Server and DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server. IMPLEMENTATION NOTES
IDENTITY information Microsoft SQL Server supports three methods of retrieving the IDENTITY value for inserted row: IDENT_CURRENT, @@IDENTITY, and SCOPE_IDENTITY(). SCOPE_IDENTITY is used here because it is the safest. However, it must be called is the same execute statement, not just the same connection. So, this implementation appends a SELECT SCOPE_IDENTITY() statement onto each INSERT to accommodate that requirement. "SELECT @@IDENTITY" can also be used by issuing: $self->_identity_method('@@identity'); it will only be used if SCOPE_IDENTITY() fails. This is more dangerous, as inserting into a table with an on insert trigger that inserts into another table with an identity will give erroneous results on recent versions of SQL Server. identity insert Be aware that we have tried to make things as simple as possible for our users. For MSSQL that means that when a user tries to create a row, while supplying an explicit value for an autoincrementing column, we will try to issue the appropriate database call to make this possible, namely "SET IDENTITY_INSERT $table_name ON". Unfortunately this operation in MSSQL requires the "db_ddladmin" privilege, which is normally not included in the standard write-permissions. Ordered Subselects If you attempted the following query (among many others) in Microsoft SQL Server $rs->search ({}, { prefetch => 'relation', rows => 2, offset => 3, }); You may be surprised to receive an exception. The reason for this is a quirk in the MSSQL engine itself, and sadly doesn't have a sensible workaround due to the way DBIC is built. DBIC can do truly wonderful things with the aid of subselects, and does so automatically when necessary. The list of situations when a subselect is necessary is long and still changes often, so it can not be exhaustively enumerated here. The general rule of thumb is a joined has_many relationship with limit/group applied to the left part of the join. In its "pursuit of standards" Microsft SQL Server goes to great lengths to forbid the use of ordered subselects. This breaks a very useful group of searches like "Give me things number 4 to 6 (ordered by name), and prefetch all their relations, no matter how many". While there is a hack which fools the syntax checker, the optimizer may still elect to break the subselect. Testing has determined that while such breakage does occur (the test suite contains an explicit test which demonstrates the problem), it is relative rare. The benefits of ordered subselects are on the other hand too great to be outright disabled for MSSQL. Thus compromise between usability and perfection is the MSSQL-specific resultset attribute "unsafe_subselect_ok". It is deliberately not possible to set this on the Storage level, as the user should inspect (and preferably regression-test) the return of every such ResultSet individually. The example above would work if written like: $rs->search ({}, { unsafe_subselect_ok => 1, prefetch => 'relation', rows => 2, offset => 3, }); If it is possible to rewrite the search() in a way that will avoid the need for this flag - you are urged to do so. If DBIC internals insist that an ordered subselect is necessary for an operation, and you believe there is a different/better way to get the same result - please file a bugreport. AUTHOR
See "AUTHOR" in DBIx::Class and "CONTRIBUTORS" in DBIx::Class. LICENSE
You may distribute this code under the same terms as Perl itself. perl v5.18.2 2014-01-05 DBIx::Class::Storage::DBI::MSSQL(3)
All times are GMT -4. The time now is 01:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy