Sarat1729 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am newbie to this and bear with me while learning. I can connect within the server to the database and fetch the data. Now, I am in need of connecting and fetching data from a SQL Server database present in a Server from the local machine that I am using. Couldn't see how I can make it.

Replies are listed 'Best First'.
Re: Connecting SQL Server DB in a Server
by karlgoethebier (Abbot) on Jun 29, 2017 at 15:55 UTC

    You are talking about MS SQL Server? If so first step in a hurry. Read also DBI and DBD::ODBC.

    Update: This is what i remember: When you set up the ODBC Data Source you need a valid account to the DB. You have two choices: a Windows account and the other. I forgot how they named it. Choose the other. Then you need to assign some role(?) to this user account. Use SQL Server 2016 Developer for this task....

    «The Crux of the Biscuit is the Apostrophe»

    perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

Re: Connecting SQL Server DB in a Server
by 1nickt (Canon) on Jun 29, 2017 at 12:08 UTC

    Hi, please consider reading and following the guidelines in Guide to the Monastery at right. The link is provided to help you as "a newbie to this." Newbies mostly have to read a lot.

    If you think about it you can probably see that your post is not of the type that can elicit a useful answer.

    (From your non-question I can only guess: check the host parameter in your DSN in your DBI connection string. Maybe use the value 'localhost'.)


    The way forward always starts with a minimal test.