Minggu, 05 Maret 2023

SSIS Setup ODBC Connector With queue name

1. Configure Your Host 
2. Klik Advanced Options


3. Click “Server Side Properties” in the lower-left corner of the Advanced Options window:


4. In the Properties window, click “Add..” on the right side to create a new property:


5. Add any properties required by your Hive instance, including the mapreduce queue name if
needed. You may have to ask your administrator what the name of this property is – some
servers use “mapreduce.job.queuename” by default, and one server I use has this defined as “mapred.job.queue.name“, so you’ll need to confirm your server’s value. Once you know what it is, create it and click OK, and then it should look like this:


6. That’s it! Go ahead and click “OK” and save the data source name settings, then you should be good to go!

If you have the need to use different queues for different purposes (or any other settings change based on your work), you can create multiple versions of your ODBC DSN and connect to whichever one is appropriate for the work you’re currently doing.










Senin, 07 Mei 2018

Kill Running Packets SSIS

Find operation_id With Running Status

SELECT * FROM SSISDB.catalog.executions WHERE status = 2

The statement below stops the execution of the SSIS package with operation_id=65

EXEC SSISDB.catalog.stop_operation @operation_id =  65

Kamis, 15 Maret 2018

How To Give Single User To Execute Spesific Store Procedure

Grant Execution on Stored Procedure Object to Role or User

USE SomeDatabase
GRANT EXECUTE ON [Database].[Scheme].[NameStoreProcedure] TO [Username_login]

Selasa, 09 Januari 2018

SSIS Log Transaction Based Query

SELECT project_name
,a.package_name
,cast(start_time as smalldatetime) as StartTime
,cast(end_time as smalldatetime) as EndTime
,CAST(DATEDIFF(MINUTE, cast(start_time as smalldatetime), cast(end_time as smalldatetime))/60 AS VARCHAR(10))+':' + CAST(DATEDIFF(MINUTE, cast(start_time as smalldatetime), cast(end_time as smalldatetime)) % 60 AS VARCHAR(2)) AS [TimeProccess]
--,MESSAGE --> IF You Want To Know Massage In Packet SSIS
,CASE WHEN status = 1 THEN 'created'
WHEN status = 2 THEN 'running'
WHEN status = 3 THEN 'canceled'
WHEN status = 4 THEN 'failed'
WHEN status = 5 THEN 'pending'
WHEN status = 6 THEN 'ended unexpectedly'
WHEN status = 7 THEN 'succeeded'
WHEN status = 8 THEN 'stopping'
WHEN status = 9 THEN 'completed'
ELSE 'Not Active' END AS [Status]
,COUNT(*) AS [Count]
FROM SSISDB.catalog.executions a
--JOIN SSISDB.catalog.event_messages c ON a.execution_id = c.operation_id --> IF You Want To Know Massage In Packet SSIS
WHERE cast(start_time as smalldatetime) >= ( SELECT DATEADD(d,DATEDIFF(d,0,getdate()),0) ) --> This Show You Latest Packet Run Daily
GROUP BY a.package_name,cast(start_time as smalldatetime),cast(end_time as smalldatetime),status,project_name--,MESSAGE
ORDER BY StartTime DESC,package_name

Selasa, 20 Januari 2015

Install Microsoft's SQL Server Driver for PHP

Instruction notes:

  1. Microsoft's PHP driver for SQL Server only runs with PHP 32-bit builds (as standard from http://windows.php.net/download).
  2. These instructions are only for PHP 5.2, 5.3 or 5.4. (5.5 and 5.6 supported with custom build.)
  3. I am pretending that PHP is installed into folder C:\PHP.  Replace the term C:\PHP in the instructions with whatever folder your PHP is installed into.
  4. See orange text for PHP 5.5 and 5.6 support in 32 and 64 bits.  If you do not know whether you have 64-bit PHP 5.5/5.6, start the instructions at step 5, note the orange comment in 5.3, then return to step 1 of the instructions below.
Instructions:
Download Microsoft's PHP drivers. Open page: http://www.microsoft.com/en-us/download/details.aspx?id=20098
If you have Windows Vista, Server 2008 or above, download SQLSRV30.EXE.
If you have Server 2003/Windows XP or below, download SQLSRV20.EXE

Extract the entire contents of the file downloaded in (1.) to your PHP extensions folder.  This is usually a sub-folder of the location where php is installed, named 'ext', e.g. C:\PHP\ext.
Note that you can use WinRAR to open the .exe file and extract the files, if you want.

Install the SQL Server Native Client downloaded from the previous step (3.) on the same computer that runs PHP.

Go To php.ini and add below lines
  • For SQLSRV30.EXE (or the custom drivers), PHP 5.4, NTS, VC9 add lines:
    extension=php_sqlsrv_54_nts.dll
    extension=php_pdo_sqlsrv_54_nts.dll
  • For SQLSRV30.EXE (or the custom drivers), PHP 5.4, TS, VC9 add lines:
    extension=php_sqlsrv_54_ts.dll
    extension=php_pdo_sqlsrv_54_ts.dll
  • For SQLSRV30.EXE (or the custom drivers), PHP 5.3, NTS, VC9 add lines:
    extension=php_sqlsrv_53_nts.dll
    extension=php_pdo_sqlsrv_53_nts.dll
  • For SQLSRV30.EXE (or the custom drivers), PHP 5.3, TS, VC9 add lines:
    extension=php_sqlsrv_53_ts.dll
    extension=php_pdo_sqlsrv_53_ts.dll
  • For SQLSRV20.EXE, PHP 5.3, NTS, VC9 add lines:
    extension=php_sqlsrv_53_nts_vc9.dll
    extension=php_pdo_sqlsrv_53_nts_vc9.dll
  • For SQLSRV20.EXE, PHP 5.3, NTS, VC6 add lines:
    extension=php_sqlsrv_53_nts_vc6.dll
    extension=php_pdo_sqlsrv_53_nts_vc6.dll
  • For SQLSRV20.EXE, PHP 5.3, TS, VC9 add lines:
    extension=php_sqlsrv_53_ts_vc9.dll
    extension=php_pdo_sqlsrv_53_ts_vc9.dll
  • For SQLSRV20.EXE, PHP 5.3, TS, VC6 add lines:
    extension=php_sqlsrv_53_ts_vc6.dll
    extension=php_pdo_sqlsrv_53_ts_vc6.dll
  • For SQLSRV20.EXE, PHP 5.2, NTS, VC6 add lines:
    extension=php_sqlsrv_52_nts_vc6.dll
    extension=php_pdo_sqlsrv_52_nts_vc6.dll
  • For SQLSRV20.EXE, PHP 5.2, TS, VC6 add lines:
    extension=php_sqlsrv_52_ts_vc6.dll
    extension=php_pdo_sqlsrv_52_ts_vc6.dll
 

Kamis, 09 Oktober 2014

Understanding Schemas





Skema pada SQL sebagai wadah untuk mengatur objects. Jika Anda melihat di database sampel AdventureWorks2012, Anda akan melihat bahwa tabel yang diatur oleh departemen atau fungsi, seperti "HumanResources" atau "Produksi". Ini terlihat mirip dengan owner concept, namun memiliki banyak keuntungan. Pertama-tama, karena objek yang tidak terikat pada account pengguna, Anda tidak perlu khawatir tentang mengubah pemilik obyek ketika sebuah akun yang akan dihapus. Keuntungan lain adalah bahwa skema dapat digunakan untuk menyederhanakan pengelolaan hak akses pada tabel dan objek lainnya. Skema ini memiliki pemilik, tapi pemilik tidak terikat pada nama. Jadi, jika akun memiliki skema dan akun harus dihapus dari database, pemilik skema dapat diubah tanpa melanggar kode apapun. Jika Anda tidak ingin mengatur objek database Anda ke skema, skema dbo tersedia.

Rabu, 24 September 2014

Membuat Virtual Host Pada Fedora

Buat Folder Directorynya dulu

Code:
mkdir /var/www/html/nama-folder
Ikuti Step dibawah Ini Untuk configure virtual hosts in Apache.

Step 1: Open the Apache configuration file to edit it

Code:
#vi /etc/httpd/conf/httpd.conf
Step 2: Add the below directive to the Apache configuration file since we are using name-based virtual hosts. This directive tells the server to use any and all IP addresses on the machine.

Code:
NameVirtualHost *:80
Step 3: Add the VirtualHost block to each different website in the Apache configuration file

Code:
<VirtualHost *:80>
ServerName website1.example.com
DocumentRoot /var/www/html/website1
</VirtualHost>
The above block tells the server to run website1.example.com using the document root /var/www/html/website1.

Step 4: Add as many virtual hosts as you want using VirtualHost blocks like below:

Code:
<VirtualHost *:80>
ServerName website2.example.com
DocumentRoot /var/www/html/website2
</VirtualHost>
Save the file and exit.

Step 5: Restart Apache

Code:
#/etc/init.d/httpd restart
The virtual host configuration is done. If the hostnames are fictitious like this example,you have to add the hostnames in your network configuration.

Step 6: Open /etc/hosts
Code:
#vi /etc/hosts
Step 7: Add the host names
PHP Code:
127.0.0.1    website1.example.com
127.0.0.1    website2
.example.com 

save the file and exit.

You will now be able to access
Code:
 http://website1.example.com
at you browser

jng lupa configure AllowOverride none -> MENJADI AllowOverride All


Code:
#sudo vi /etc/httpd/conf/httpd.conff
Berikan ownership pada folder directory
Code:
#chown -R namauser.namagrup /letak-folder/
100 tested work untuk save pada editor vi gunakan perintah :wq