C/C++ API ODBC process ID - c++

I would like to know if it's possible to get the current process id of an SQL connection through ODBC C/C++ API.
Under SqlServer it is ##spid, connection_id() with MySQL.
Cannot find that in ODBC documentation.
Thanks...

You can write a stored procedure to return ##spid on the connection
CREATE PROC
GetSPID
AS
SELECT ##SPID AS 'ID';
Then exec as per usual OBDC API

Related

How to call a stored procedure / macros on teradata from informatica cloud?

I am trying to call a macro on Teradata from Informatica cloud but I was not able to achieve any success I tried SQL transformation, it works only for SQL server and oracle but not for teradata. Anyone has any idea how to call a macro on Teradata from the Informatica cloud.
You'll need to call a pre or post action the runs code on the O/S to trigger the macro. I generally use Python for pre and post actions as it is portable across O/Ss.
in the post sql section of the target, you can call your stored procedure (exec spname)

PowerBI having issue with Access DB having ODBC Connection

I have an accessDB which using ODBC connection to SQL and used in queries.
Tried to use the queries to create a report on PowerBi, Issue is whenever I tried to update the dataset it gives me ODBC--call failed.
Tried created the ODBC connection on gateway machine. they are all 32 bit [ODBC/Power Bi Desktop] etc.
Can someone please help?
had to install office 64bit and access 64bit driver
also had to refresh all the linked tables and views from access to rectify the issue.

Get statistics on data inserts, updates in SAS log using pass through sql connecting to Teradata

I am using SAS EG to connect to teradata to read/write destination tables. I am using pass through sql to connect to teradata. Since , this is explicit sql in SAS, i am not able to see details in logs such as record inserts to a table, updates(how many records got updated etc). Is there a way to get such information in sas logs? I know it is possible in data steps in sas but with above request i am not able to do so. Thanks for your help.
Options SASTRACE helps and you can try
options sastrace=',,,d' sastraceloc=saslog nostsuffix;;
More info what the option logs and how you can effectively use SAS Trace with Teradata connections can be found in "Troubleshooting SAS and Teradata Query Performance Problems", Jeffrey D. Bailey, 2010.
The documentation for SASTRACE option is found at:
http://support.sas.com/documentation/cdl/en/acreldb/63647/HTML/default/viewer.htm#a000433982.htm

Connecting to SAS dataset using OLE DB in QlikView

I'm trying to use an OLEDB connection to connect to my SAS datasets from QlikView.
I am able to set up the connection, but I am not able to load my data. Executing the data import results in the following error: "the local provider does not currently support sql processing"
My loading code looks like this:
LOAD "account",
balance,
"open_closed";
SQL SELECT *
FROM "BASE_DATA";
Is there any way to solve this?
We read SAS data into QlikView using SAS ODBC driver that connects to SAS/SHARE.
This requires that you have one of the following three:
1. SAS/SPD Server
2. SAS/SHARE Server
3. SAS locally on desktop (will not work on server license)

Can you use a SAS dataset as a SSIS data source?

We have a some ETL processes that read CSV files that are output from SAS programs. I'm in the process of upgrading one of these ETLs and was wondering if I could use SSIS to read directly from the SAS dataset.
Has anybody done this successfully?
See here
"You can use SAS Local Data Provider (can be downloaded separately and comes as part of SAS for Windows installation). "
Recently I've moved data from SAS environment:
In connection manager I choose _Native OLE DB\SAS Local Data Provider 9.3_
Enter file name (`\..\dev` before the table name). Click OK
Drag _OLE DB Source_ into the Data Flow
Right click on _OLE DB Source_ and choose _Show advanced editor_
In the first tab (_Connection Manager_) choose _SAS Connection Manager_ from drop down list you created now
In the Component Properties tab in _OpenRowset_ write the name of the table, click OK
If you have `datetime` type transform it using Derived Transformation Editor
For loading SAS XPT or SAS7BDAT data files without having an instance of SAS to connect to via OBDC we used the following
A third party tool (STATTransfer) to read the XPT file
STATTransfer ODBC driver
Setup the connection in SSIS as an ODBC datasource and load into the database for processing.
There are SAS datasource SSIS extension available http://www.cozyroc.com offer a SAS Data connection, but they where outside our price range