BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 12-11-2008, 03:32 AM   #1 (permalink)
New Member
 
Join Date: Dec 2008
Model: pearl
PIN: N/A
Carrier: O2UK - Telefonica
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default backing up the BES database to migrate between servers

Please Login to Remove!

Hi,

So I know this topic has been covered many times on this forum already but I have read through a lot of the existing posts and unfrotunately am still not able to back my database up in order to move our BES to another server.

The background to the problem is this: My predecessor set up our BES before I started here and has since left. It's a Windows 2003 Server and an MSDE 2000 Release A engine. Although there is a default BES database (BESMgmt) on the C:Drive the DB that is being used by the BlackBerry Manager is called (3TBES) and is on the server's D:Drive.

The BlackBerry Manager specifies the following:
DB Server name: 3T-AUTO-6\SQLBES
DB Name: 3TBES
Authentication: Windows Authentication

The database itself is saved at the following path:
D:\Program Files\Microsoft SQL Server\MSSQL\MSSQL$SQLBES\Data\3TBES.mdf & .ldf

I have tried to backup the DB using various iterations of the commands mentioned but without any luck. The way I believe I have to do it is by changing the root directory to the D:Drive in the command prompt as I have done below:

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\gibss>d:

D:\>osql -E
1> backup database 3TBES to disk = "C:\3TBES.bak"
2> go
Msg 170, Level 15, State 1, Server 3T-AUTO-6, Line 1
Line 1: Incorrect syntax near '3'.
1>


When I run the same command on the C:Drive with the default DB instance (BESMgmt) the backup runs correctly and a file is created.

I am probably just making a simple error but I can't for the life of me figure out what it is. Can anyone help? The only difference I can think of is that the DB has a name starting with a number but I can't see why this would be a problem?

Thanks in advance for your help,
Steve
Offline  
Old 12-11-2008, 04:43 AM   #2 (permalink)
New Member
 
Join Date: Dec 2008
Model: pearl
PIN: N/A
Carrier: O2UK - Telefonica
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Forgot to add this to the previous post:

The BES version we are using at the moment is 4.1.4.17. I have also tried using the syntax for the named instance backup with no joy.
Offline  
Old 12-11-2008, 09:01 AM   #3 (permalink)
Talking BlackBerry Encyclopedia
 
RadHaz75's Avatar
 
Join Date: Feb 2006
Location: Philadelphia
Model: 9650
OS: 6.0.0.524
PIN: BALL
Carrier: Verizon Wireless
Posts: 456
Post Thanks: 2
Thanked 4 Times in 4 Posts
Default

i'm no sql expert, but maybe try quotes (single or double) around the 3TBES? since it has a number maybe its confusing the process.
__________________
Two months ago, I saw a provocative movie on cable TV. It was called The Net, with that girl from the bus.
Offline  
Old 12-12-2008, 08:47 AM   #4 (permalink)
New Member
 
Join Date: Dec 2008
Model: pearl
PIN: N/A
Carrier: O2UK - Telefonica
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have tried this but it comes back with the same error but rather than the:

Line 1: Incorrect syntax near '3'.

it says: Line 1: Incorrect syntax near '"'.
Offline  
Old 12-12-2008, 09:07 AM   #5 (permalink)
New Member
 
Join Date: Dec 2008
Model: pearl
PIN: N/A
Carrier: O2UK - Telefonica
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

actually I tell a lie. the output when I use the " marks is:

Line 1: Incorrect syntax near '3TBES'
Offline  
Old 12-12-2008, 09:38 AM   #6 (permalink)
BlackBerry Extraordinaire
 
gibson_hg's Avatar
 
Join Date: Dec 2007
Model: NA
PIN: 80081ES
Carrier: NA
Posts: 1,006
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you log into the database from the C: drive? Can you use the database? ie.

1> use 3TBES
2>go

1> select * from userconfig
2>go

Does that work?
Offline  
Old 12-12-2008, 09:39 AM   #7 (permalink)
BlackBerry Extraordinaire
 
gibson_hg's Avatar
 
Join Date: Dec 2007
Model: NA
PIN: 80081ES
Carrier: NA
Posts: 1,006
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are both databases on the same SQL instance? If not, are both instances the same version?
Offline  
Old 12-15-2008, 03:37 AM   #8 (permalink)
New Member
 
Join Date: Dec 2008
Model: pearl
PIN: N/A
Carrier: O2UK - Telefonica
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi gibson_hg,

I have tried the command you have suggested from both the C: and D: and it brings back the same error

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\besadmin>cd \

C:\>osql -E
1> use 3TBES
2> go
Msg 170, Level 15, State 1, Server 3T-AUTO-6, Line 1
Line 1: Incorrect syntax near '3'.
1> quit

C:\>d:

D:\>osql -E
1> use 3TBES
2> go
Msg 170, Level 15, State 1, Server 3T-AUTO-6, Line 1
Line 1: Incorrect syntax near '3'.
1>


I don't think the 2 databases are on the same instance. The default BESMgmt DB is on the C:Drive and 3TBES is on the D:drive. I am not that aux fait with working with SQL DB's so I'm struggling with this.

Thanks for your advice. Does the above information help at all?
Offline  
Old 12-15-2008, 04:57 AM   #9 (permalink)
New Member
 
Join Date: Dec 2008
Model: pearl
PIN: N/A
Carrier: O2UK - Telefonica
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok so I have made some progress this morning. I finally managed to piece together the correct syntax to access the instance.

osql -E -S 3t-auto-6\SQLBES
1>

but then I am still having the incorrect syntax near '3' error when trying to back up the database with this command

backup database 3TBES to disk = "C:\3TBES.bak"

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\besadmin>d:

D:\>osql -E -S 3t-auto-6\SQLBES
1> backup database 3TBES to disk ="C:\3TBES.bak"
2> go
Msg 170, Level 15, State 1, Server 3T-AUTO-6\SQLBES, Line 1
Line 1: Incorrect syntax near '3'.
1>
Offline  
Old 12-15-2008, 09:03 AM   #10 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2007
Location: PA
Model: 8830
Carrier: Sprint
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try SQL Management Studio if you're not real familiar with sql. Makes the whole process alot smoother.

I learned alot by using command line and like to know how, but the sql management software is just down right easy.
Offline  
Old 12-15-2008, 10:37 AM   #11 (permalink)
New Member
 
Join Date: Dec 2008
Model: pearl
PIN: N/A
Carrier: O2UK - Telefonica
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I didnt think you could use the Management Studio with the free MSDE SQL engine. Isn't that why all the instructions on the BlackBerry site are all command prompt oriented?
Offline  
Old 12-15-2008, 10:40 AM   #12 (permalink)
BlackBerry Elite
 
knottyrope's Avatar
 
Join Date: Jan 2008
Location: Massachusetts
Model: Z30
OS: 10.2.1
PIN: t of blood has been taken
Carrier: AT&T-US with I dee ten tee errors
Posts: 6,679
Post Thanks: 270
Thanked 281 Times in 266 Posts
Default

I used it to connect to it and browse the tables before.
__________________
irony : many old timer posters have de-evolved into the trolls they once fought
I am on http://supportforums.blackberry.com
BES 10 running sweet for my Z30, Z10 and Q10
Offline  
Old 05-21-2009, 03:02 PM   #13 (permalink)
New Member
 
Join Date: May 2009
Model: 7100t
PIN: N/A
Carrier: private
Posts: 10
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'd say that you have to specify the named SQL instance in the backup statement.

Just a thought.
Offline  
Old 05-21-2009, 06:31 PM   #14 (permalink)
CrackBerry Addict
 
Join Date: Jan 2008
Model: 9700
PIN: N/A
Carrier: Rogers
Posts: 709
Post Thanks: 0
Thanked 8 Times in 8 Posts
Default

It REALLY doesn't like the fact the name of the database starts with a number - it screws up the parsing in a big way. I bet if you enclosed the database and the instance with quotes, it would take it.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.