Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry® Enterprise Service 10

Reply
New Contributor
Posts: 2
Registered: ‎07-31-2014
My Device: Q10
My Carrier: Telus

Cannot re-add Q10 to BES following seucirty wipe

Hi everyone,

 

An employee recently left our company, returning her Q10 to us when she left. We wiped the device to start fresh, and then attempted to set it up for another employee. I've created the new user on our BES 10 and created the device activation password. However, this phone is not able to connect to our server when setting up the work space for the new user. It says "Connecting to Server" for about five minutes, then fails out and says "The Server cannot be contacted. Ensure that you are connected to a network." We have tried over both WIFI and LTE, both of which are working properly. I can set up the emails over Active Sync with our Exchange, but for whatever reason this device can no longer communicate with our BES server following the security wipe, therefore we can't provision the Blackberry Balance.

 

Any ideas?

Super Contributor
Posts: 278
Registered: ‎04-01-2008
My Device: Z30

Re: Cannot re-add Q10 to BES following seucirty wipe

Hi,

 

Couple of things here:

 

What do the EMWS logs say for this activation attempt?

If you change to a different device just to test, does it work?

 

I am wondering if the PIN is still present in the database even though the user is no longer present on the BAS. I've seen this happen in older versions of BES 10. What exact version are you running?

Also, is the device OS up to date?

Don't forget to hit like if I resolved your issue! Smiley Happy
New Contributor
Posts: 2
Registered: ‎07-31-2014
My Device: Q10
My Carrier: Telus

Re: Cannot re-add Q10 to BES following seucirty wipe

This has happened with another Q10 that was wiped, so I'm thinking it must be specific to our BES. The OS on both devices were up to date before attempting to add them.

 

I'm new to BES, so I haven't taken a look at those logs, I'll figure out how and get back to you.

 

Our BES is Version 10.1.3.11

If it were the pin, how would I clear that from the database?

Highlighted
Super Contributor
Posts: 278
Registered: ‎04-01-2008
My Device: Z30

Re: Cannot re-add Q10 to BES following seucirty wipe

OK, from your BES version I can tell you that 10.1 is prone to issues with deleting users and pending information not being cleared from the database. I would advise you to update to 10.2 preferably with the latest MR3 on top! 10.2 has addressed lots of bugs...

 

BES 10 database is quite different from BES 5. I can't remember off the top of my head if there is a userconfig table in BES 10...

It's easy in BES 5:

select * from userconfig where PIN=******

 

However, you can use a stored procedure like this one to search all tables in the database to see if you find the affected PIN. Always run this on a test server first and be very careful when running a query on a production database, you should always backup prior to running anything like this. If you're not experienced, ask your SQL DBA to run it.

 

CREATE PROC SearchAllTables
(
        @SearchStr nvarchar(100)
)
AS
BEGIN

       
        CREATE TABLE #Results (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')
                                        AND        QUOTENAME(COLUMN_NAME) > @ColumnName
                        )
       
                        IF @ColumnName IS NOT NULL
                        BEGIN
                                INSERT INTO #Results
                                EXEC
                                (
                                        'SELECT ''' + @TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630)
                                        FROM ' + @TableName + ' (NOLOCK) ' +
                                        ' WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2
                                )
                        END
                END        
        END

        SELECT ColumnName, ColumnValue FROM #Results
END
--------------------------------------------------------------------------------------------------------

After Stored Procedure is created search using the following

EXEC SearchAllTables 'Keyword goes here'
GO

Don't forget to hit like if I resolved your issue! Smiley Happy