Langsung ke konten utama

Postingan

Menampilkan postingan dari 2017

ZTW H108N Access Point

1.       Klik menu " LAN " dan masuk pada tampilan tersebut. 2.       Ganti IP nya supaya tidak berbenturan dengan " IP Gateway ". 3.       Direction pilih pengaturan " None " 4.       Multicast ganti menjadi " Disable " 5.       IGMP Snoop menjadi " Disable " 6.       DHCP menjadi " Relay " (Ini hal yang penting) 7.       Mneu DHCP Server IP for Relay Agent sesuai dengan  IP Gateway  modem yang aktif internetnya.  Klik " Save " untuk menyimpan pengaturan kamu.

Backup of particular tables in SQL Server using T-SQL Script

Questions I want to take a backup of particular tables available in my database in .bak file And all these should be done using T-SQL script Answers Backup Types are dependent on SQL Server Recovery Model. Every recovery model lets you back up whole or partial SQL Server database or individual files or filegroups of the database. Table-level backup cannot be created, there is no such option. But there is a workaround for this

How to swap the camera so Opera 12 uses front camera for getUserMedia()

Essentially you only need to swap the tags 'front' and 'back' in the file /etc/nvcamera.conf The change is permanent across reboots, but messes the orientation/mirror image of the cameras, so the rear camera becomes a mirror image, not the front. This messes all portrait shots as the camera pic becomes upside down. Device needs to be rooted.

CARA MEMBUAT FORM LOGIN SEDERHANA DENGAN KONEKSI DATABASE PADA C#

Pertama yaitu buat kelas Koneksi.cs dengan klik kanan pada project Anda => Pilih Add Class => Beri nama dengan Koneksi dan ketikkan kode berikut nama databasenya disesuaikan : [csharp] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.SqlClient; namespace KeretaApi { class Koneksi { static string conn; public static SqlConnection Conn { get { return new SqlConnection(conn); } } static Koneksi() { string connStr = "server=localhost;" + "database=KeretaApi;" + "Integrated Security=TRUE"; conn = connStr; } } } [/csharp]

Add, Edit, and Delete in DataGridView with Paging

Introduction The article, or rather code snippet, demonstrates a simple application to insert, update, and delete using a DataGridView. The application uses an asynchronous architecture for most of the calls to the database. This is to show that without a hanging UI, we can allow the user to continue with his tasks. The application has the following outline: Get all SQL Server instances from the network. Get all databases from the selected instance. If the user provides an empty user name or password, or a wrong user name or password, the same list of SQL Server instances will be returned. The code is available here[^]. Get all tables from the selected database. Get all records from selected table. Add, edit, delete records from the DataGridView. A paging feature with number of records per page is also provided. source here  

Web Real-Time Communications (RTC)

WebRTC is a free, open project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose. Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols. The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others. This page is maintained by the Google Chrome team. source

EXCEPT Operator Sql Server

This SQL Server tutorial explains how to use the EXCEPT operator in SQL Server (Transact-SQL) with syntax and examples. Description The SQL Server (Transact-SQL) EXCEPT operator is used to return all rows in the first SELECT statement that are not returned by the second SELECT statement. Each SELECT statement will define a dataset. The EXCEPT operator will retrieve all records from the first dataset and then remove from the results all records from the second dataset.

Comparison of NULLIF and ISNULL Sql Server

NULLIF Returns a null value if the two specified expressions are equal. Syntax : NULLIF ( expression , expression ) Arguments : expression :Is any valid scalar expression. ISNULL Replaces NULL with the specified replacement value. Syntax : ISNULL ( check_expression , replacement_value ) Arguments : check_expression : Is the expression to be checked for NULL. check_expression can be of any type.

Kode Error eFaktur, Penyebab dan Solusinya

Kumpulan Kode Error eFaktur, Penyebab dan Solusi ETAX-10001 : Error Database Terjadi Kesalahan, tidak dapat membentuk header lampiran Penyebab : Posting SPT di database selain ETaxInvoice Solusi : ETAX-10001 : Error Database Penyebab : [1] File di dalam folder db ada yang corrupt atau hilang (misal : corrupt karena mengcopy data base saat aplikasi menyala) [2] Di dalam folder db tidak terdapat folder ETaxInvoice atau terdapat folder selain folder ETaxInvoice yang bukan tercreate dari proses tambah database [3] Versi aplikasi tidak sama dengan versi db [4] PC server PKP mati / Database belum distart sebagai server (dalam hal menggunakan konfigurasi network db)  

The Dark Side of NVARCHAR

Introduction In this article, we are going to talk about using the nvarchar data type. We will explore how SQL Server stores this data type on the disk and how it is processed in the RAM. We will also examine how the size of nvarchar may affect performance.

Primary and Foreign Keys and Relationships

Keys Primary and Foreign Keys   Relationships One-to-Many and Many-to-Many Relationships

Sql Server Profiler

Simple configuration Sql Server Profiler Create New Trace --> Trace Propertis Server Profiler. Trace Propertis --> view tap Events Selection Check in Stored Procedures and TSQL

Call Back Ext JS (hide,show)

Cara hide,show,set value ExtJs Call Back Get ID Componen Callback and hide [java] if(docflow_seq==5) { Ext.getCmp('button-1031').hide(); } Ext.getCmp('buttonsavedetailsform').hide(); try{ _COM_btnprint.setDisabled(false); }catch(e){} [/java]

How to execute multiple long running SQL Statements Asynchronously in small chunks

Introduction Completing task  Asynchronously in case of long running query processing is very helpful in some scenario. It ensures maximum use of hardware resources as well. In case of non set based modern high level programming language such as C# or Java has versatile facilities, libraries and patterns  for asynchronous programming. But what about SET based language such as SQL? There is no straight forward way to execute SQL statements  in parallel mode. In SQL Server there some way to do such stuff like using SQL Server Service Broker or through CLR stored procedure. Service Broker actually is a process of sending and receiving messages which can be sent to same or any remote database of another SQL Server instance. Whereas CLR needs different set of programming expertise, it also has some deployment issue. Today I am going to show you the same implementation using SQL Server Agent Job. In this article you also came to know, how huge number of long running SQL statements will be ex...

Cara mudah menginstall ZeosLib di Lazarus

ZeosLib menurut pembuatnya adalah komponen database (meliputi MySQL, Postgresql, MSSQL, Firebird, Sybase, Oracle dan SQLite) populer, gratis dan opensource yang dapat digunakan di Freepascal/Lazarus, Delphi, Kylix dan C++ Builder. Berikut ini adalah cara mudah untuk menginstall ZeosLib di Lazarus, saya coba di Lazarus 1.x dan Freepascal 2.6.2.

Laravel 5 example

Laravel 5 example For Laravel 5.3 improved version look at this repository . Laravel 5 example is a tutorial application for Laravel 5.2 (in french there ). Installation git clone https://github.com/bestmomo/laravel5-example.git projectname cd projectname composer install php artisan key:generate Create a database and inform .env php artisan migrate --seed to create and populate tables Inform config/mail.php for email sends php artisan vendor:publish to publish filemanager php artisan serve to start the app on http://localhost:8000/ [java]composer create-project laravel/laravel laravelapp --prefer-dist[/java]

Format Number with commas in T-SQL Sql Server

Demo 1 Demonstrates adding commas: [sql] PRINT FORMATMESSAGE('The number is: %s', format(5000000, '#,##0')) [/sql] -- Output The number is: 5,000,000 Demo 2 Demonstrates commas and decimal points. Observe that it rounds the last digit if necessary. [sql] PRINT FORMATMESSAGE('The number is: %s', format(5000000.759145678, '#,##0.00')) [/sql] -- Output The number is: 5,000,000.76 Compatibility SQL Server 2012+.

Git Hub

GIT merupakan sebuah Version Control System (VCS) yang digunakan dalam tim pengembangan perangkat lunak untuk bekerja bersama. Version Control maksudnya sistem Git akan mencatat setiap perubahan yang terjadi pada source code kita sehingga memungkinkan untuk mengambil kembali source code lama jika suatu saat kita ingin kembali ke versi berapapun dari aplikasi yang pernah kita tulis.

ApexSQL Refactor SQL Server

Features ApexSQL Refactor Format SQL with over 160 options Qualify objects and expand wildcards Encapsulate SQL into procedures Add surrogate keys Replace one-to-many relationships Change procedure parameters Safely rename SQL objects Locate & highlight unused variables Format SQL objects Obfuscate SQL Link ApexSQL Refactor :  apexsql_refactor My Template xml ApexSQL Refactor

Easily Create Trigger Delete Protection SQL Server

First learn :  Tricks For Document Delete Protection On Trigger [sql] CREATE PROCEDURE [System].[Utility.GenerateTriggerDeleteProtect] @TableName NVARCHAR(250) AS BEGIN SET NOCOUNT ON; DECLARE @SQL NVARCHAR(MAX) IF NOT EXISTS ( SELECT TOP 1 name FROM sys.triggers WHERE parent_id = OBJECT_ID(@TableName) ) BEGIN SET @SQL = ' CREATE TRIGGER '+REPLACE(@TableName,']','.DeleteProtect]')+' ON '+@TableName+' Instead of DELETE AS BEGIN SET NOCOUNT ON; delete from '+@TableName+' where doc_id in (select doc_id from deleted where docflow_seq=0) END' EXEC sp_executesql @SQL PRINT 'Create delete protect trigger for '+@TableName END ...

sys.processes Status sp_who2 SQL Server

Taken from the books online reference for sys.processes  and the status column. dormant = SQL Server is resetting the session. running = The session is running one or more batches. When Multiple Active Result Sets (MARS) is enabled, a session can run multiple batches. For more information, see Using Multiple Active Result Sets (MARS). background = The session is running a background task, such as deadlock detection. rollback = The session has a transaction rollback in process. pending = The session is waiting for a worker thread to become available. runnable = The task in the session is in the runnable queue of a scheduler while waiting to get a time quantum. spinloop = The task in the session is waiting for a spinlock to become free. suspended = The session is waiting for an event, such as I/O, to complete.

Sp_who Dynamic Quert SQL Server

View spesifik process wp_who Sql Server   [sql] SELECT spid ,sp.[status] ,loginame [Login] ,hostname ,blocked BlkBy ,sd.name DBName ,cmd Command ,dbo.spidprocess(spid) AS process ,cpu CPUTime ,physical_io DiskIO ,last_batch LastBatch ,program_name AS ProgramName FROM master.dbo.sysprocesses sp JOIN master.dbo.sysdatabases sd ON sp.dbid = sd.dbid ORDER BY spid [/sql]

Find Qery SQL

test from pastebin --All stored procedure and function SELECT DISTINCT o.NAME AS Object_Name ,o.type_desc ,left(m.DEFINITION, 500) AS def FROM sys.sql_modules m INNER JOIN sys.objects o ON m.object_id = o.object_id WHERE m.DEFINITION LIKE '%GETDATE%' ESCAPE '\' --Default value on tables SELECT table_schema ,table_name ,COLUMN_NAME ,column_default FROM INFORMATION_SCHEMA.COLUMNS WHERE column_default LIKE '%GETDATE%' ESCAPE '\' ORDER BY table_schema ,table_name --Computed column formula on tables SELECT a.DEFINITION ,a.NAME ,b.NAME FROM sys.computed_columns a INNER JOIN sys.tables b ON a.object_id = b.object_id WHERE DEFINITION LIKE '%GETDATE%' ESCAPE '\'

SPID PROCESS SQL SERVER

View process in sql server DECLARE @SPID INT ,@SQLScript NVARCHAR(max) SELECT @SQLScript = CAST(TEXT AS NVARCHAR(max)) FROM sys.sysprocesses sp CROSS APPLY sys.dm_exec_sql_text(sp.sql_handle) WHERE sp.spid = @SPID select @SQLScript How to use : Check running process from sp_who2, get sp_id run scrib to view detail process running. select * from [Sales].[Invoice.Vat.UpdateList] where convert(date,update_time)='2017-02-11'

Poor Mans T-SQL formatting add-in for Management Studio 2014

Install Poor Mans T-SQL formatting add-in for Management Studio 2014, Master Poor Mans T-SQL from hire . Install Poor Mans T-SQL Create the folder : % SystemDrive %\ ProgramData \ Microsoft \ SQL Server Management Studio \ 12.0 \ Addins \ If it does not exist. Then just copy the file from: % SystemDrive %\ ProgramData \ Microsoft \ SQL Server Management Studio \ 11.0 \ Addins \ PoorMansTSqlFormatterSSMSAddIn . AddIn To :  % SystemDrive %\ ProgramData \ Microsoft \ SQL Server Management Studio \ 12.0 \ Addins \ PoorMansTSqlFormatterSSMSAddIn . AddIn Add Shortcut TSQL Tool --> TQS Formating Option set SSMS HotKey Global::F2 source : http://stackoverflow.com/questions/23303026/does-the-poor-mans-t-sql-formatting-add-in-for-management-studio-2012-work-in-ma