Thursday, June 8, 2023

Search any value in full SQL database

 DECLARE @SearchStr nvarchar(100)

SET @SearchStr = '13DA19BA-FD37-6072-98E5-FF000022C5F7'

 

 

-- Tested on: SQL Server 7.0, SQL Server 2000, SQL Server 2005 and SQL Server 2010

-- Date modified: 08 June 2023 

--CREATE TABLE Results_search (ColumnName nvarchar(370), ColumnValue nvarchar(3630))

 

SET NOCOUNT ON

 

DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110)

SET  @TableName = ''

SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')

 

WHILE @TableName IS NOT NULL

 

BEGIN

    SET @ColumnName = ''

    SET @TableName = 

    (

        SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))

        FROM     INFORMATION_SCHEMA.TABLES

        WHERE         TABLE_TYPE = 'BASE TABLE'

            AND    QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) > @TableName

            AND    OBJECTPROPERTY(

                    OBJECT_ID(

                        QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)

                         ), 'IsMSShipped'

                           ) = 0

    )

 

    WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)

         

    BEGIN

        SET @ColumnName =

        (

            SELECT MIN(QUOTENAME(COLUMN_NAME))

            FROM     INFORMATION_SCHEMA.COLUMNS

            WHERE         TABLE_SCHEMA    = PARSENAME(@TableName, 2)

                AND    TABLE_NAME    = PARSENAME(@TableName, 1)

                AND    DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar', 'int', 'decimal')

                AND    QUOTENAME(COLUMN_NAME) > @ColumnName

        )

 

        IF @ColumnName IS NOT NULL

         

        BEGIN

            INSERT INTO Results_search

            EXEC

            (

                'SELECT ''' + @TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630) FROM ' + @TableName + ' (NOLOCK) ' +

                ' WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2

            )

        END

    END   

END

Thursday, June 1, 2023

How to set up page redirection based on the visitor's country using Akamai?

 To set up page redirection based on the visitor's country using Akamai, you can follow these general steps:

 Step 1: Sign in to your Akamai Control Center

 Access the Akamai Control Center using your credentials.

Step 2: Configure Edge Redirector

 Navigate to the "Property Manager" section in the Akamai Control Center.

Select the property or domain for which you want to set up country-based redirection.

Click on the "Behaviors" tab.

Locate the "Edge Redirector" behavior and click on it to configure it.

Step 3: Add Rules for Country Redirection

In the Edge Redirector configuration, click on the "Add Behavior" button to create a new rule.

Set the rule criteria to target the visitor's country. This can be done using the "Edge Server Variable" option, where you can choose the visitor's country variable provided by Akamai.

Define the action for the rule, which is typically a page redirection. Specify the URL or path where you want visitors from the selected country to be redirected.

Save the rule.



Step 4: Test and Deploy

Test the configuration by accessing your website from different countries and verifying that the redirection behaves as expected.

Once you are satisfied with the configuration, deploy the changes in the Akamai Control Center to make them live.

Step 5: Monitor and Adjust

Monitor the redirection behavior and analyze any feedback or analytics data to ensure it is working as intended.

Make adjustments to the rules or configurations if needed based on user feedback or changes in business requirements.

It's important to note that the specific steps and options in Akamai's Control Center may vary depending on your account configuration and the services you have subscribed to. It's recommended to refer to Akamai's official documentation or consult with their support team for detailed, up-to-date instructions tailored to your specific setup.

Tealium integrations with Salesforce

 

Tealium offers two integrations with Salesforce: Tealium Salesforce Apex and Tealium Salesforce Connector. Here's a breakdown of the two: 

 

Tealium Salesforce Apex 

Tealium Salesforce Connector 

Server-side integration using Salesforce Apex programming language. 

Pre-built integration between Tealium and Salesforce. 

Allows you to send data collected in Tealium to Salesforce. 

Facilitates data exchange between the two platforms without custom code. 

Provides flexibility for custom data processing and business logic within Salesforce. 

Offers configuration options within Tealium's interface. 

Requires development resources to write and maintain Apex code. 

Simplifies the integration process and reduces development effort. 

 

In summary, Tealium Salesforce Apex is a server-side integration that involves writing custom code in Salesforce's Apex language, allowing for more advanced customization and control. Tealium Salesforce Connector, on the other hand, is a pre-built integration that offers a simplified configuration approach without requiring custom development. The choice between the two depends on your specific requirements, resources, and the level of customization you need for your Tealium and Salesforce integration. 

I would suggest utilizing the Tealium Salesforce Connector instead of opting for Tealium Salesforce Apex. The Connector offers a more straightforward and manageable solution with less complexity involved.