Welcome to MSDN Blogs Sign in | Join | Help

News

  • The views expressed in this blog are those of the individual and do not necessarily represent those of Microsoft. This information is provided by way of general information only and should not be relied on without obtaining independent expert advice. These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use
Technical Preview of Business Contact Manager for Outlook 2010

If you haven't done so, please checkout the "Office2010 The Movie" trailer at http://www.office2010themovie.com/. You can also sign-up for an Exclusive Ticket to Technical Preview by following the link at the bottom left corner. The 2010 version of Office comes with a new version of Business Contact Manager with many exciting new features.

-Mukesh

Service Pack 2 for Business Contact Manager 2007 Released

We are pleased to announce that Service Pack 2 (SP2) for Business Contact Manager for Outlook 2007 is released. The scope of SP2 was limited to fixing product bugs reported by customers through various channels like this blog, newsgroup and watson.

We have also released Service Pack 2 for Office 2007. Outlook team has done tremendous work to improve the performance. Both BCM and Office service packs will improve overall experience and stability of Outlook + BCM.

You can get SP2 through Windows Update or directly download from the links shown below.

The list of issues fixed in Business Contact Manager SP2 are listed here.  List of Outlook issues fixed in SP2 are listed here.

Other resources:

 

Frequently Asked Questions for Search in Business Contact Manager

Q: How can I search an item in Business Contact Manager?

A: Business Contact Manager provides three different ways for you to search you business data

a)      Windows Desktop Search

You can learn about Windows Desktop Search from:

http://www.microsoft.com/windows/products/winfamily/desktopsearch/default.mspx

 

b)      Search Folders

You can learn about Search Folders from:

http://blogs.msdn.com/bcm/archive/2007/02/14/using-outlook-folder-views-and-search-folders-with-business-contact-manager.aspx#8555568

 

c)       Instant Search in Outlook

You can learn about Instant Search from:

http://office.microsoft.com/training/training.aspx?AssetID=RP100647441033&CTT=6&Origin=RP100647831033

Q: Is Windows Desktop Search the only search product that indexes Business Contact Manager Content?

A: As long as an indexing product can index MAPI data providers, Business Contact Manager Content will be indexed. Windows Desktop Search does the same. In addition to Desktop search Business contents could be searched using Search Folders and Instant search in Outlook.

Q: Is there a way to quickly create an e-mail merge from specific Accounts or Business Contacts?

A: You can use Search Folders to find the Accounts or Business Contacts that you want, and then you can use Outlook Mail Merge to send a personalized e-mail to each recipient. Search folders can also be used to find other types of business data too.

You can learn about Outlook Mail Merge from:

http://blogs.msdn.com/outlook/archive/2008/09/23/mail-merge-how-to-send-a-personalized-e-mail-to-many-people-at-once.aspx

Q: How can I Search more than one folder at time in Business Contact Manager?

A: Search is restricted to the current folder view. For example, to search for a Business Note, switch to the Communication History view and user instant search box to search for your item. To search for a Business Contact, switch to the Business Contact view.  The search from the Business Contacts view doesn't search the Communication history, just the data fields in Business Contacts.

Q: Can I drag and drop items into a Search Folder?

A: No. This is not currently supported.

Q: Does Search Folders include the contents of files or e-mail messages that are included in the Communication History of records?

A: No. You should try Windows Search; this allows you to search the contents of your BCM Communication history just by including the folder in the Windows Search folder index:

http://www.microsoft.com/windows/products/winfamily/desktopsearch/default.mspx

Q: Is it possible to search user -defined fields?

A: In the Instant Search box, type the user -defined field name followed by a colon (:) and the value you are searching for. For example, if you have a user-defined filed called “Contract terms” and you are searching for”4”. You would type:

Contract terms: 4 in the Instant Search box.

Q: How does Search work when users are connected to a Business Contact Manager database that is stored on a remote server?

A: Each user who connects to the Business Contact Manager Database on the remote server must also have Business Contact Manager installed on their local computers. Users can search the database on the remote server, but the search capabilities are determined by the settings on the local computer. For example, one user may have Windows Desktop Search installed and another doesn’t. The user with Windows Desktop Search can search for anything, while the user with the default search can only search by folder.

Frequently Asked Questions for Business Contacts

Creating Distribution list shows Business Contacts with Fax numbers, how do I avoid it?

This behavior is due to a feature that Business Contact Manager inherits from Outlook.   
A Fax number is considered an electronic communication number and hence it shows up in the distribution list wizard.

Updating Multiple Contacts at once

There is currently no feature in Business Contact Manager to directly support this.  
But this can still be achieved by changing the “View by” to the field you want to edit and then drag the desired contacts to the group.

Can I delete the Outlook Contact entry from Outlook, and make Business Contact Manager the default Contact Folder?

Folder removal is not supported by Outlook, and hence you will not be able to delete it.

Cloning a Business Contact?

When you try to copy and paste a Business Contact into a folder, Outlook displays an error message, saying

'The folders you are trying to change do not support this operation.
Could not complete the operation because the service provider does not support it”

Currently cut and paste to clone a contact is not supported.
A form of cloning of the Business Contact can still be achieved by copying Business Contact to Outlook Contact, and then copying it back to Business Contacts.   However, some properties, such as History Items associated with the Business Contact, will be lost when it is copied to Outlook Contacts folder.

How can I auto populate some fields in an Account associated with a Business Contact?

With the Business Contact Form open, click on the "Account" button.
This action will open a dialog box, enabling you to create a new Account, or to link an Account to the open Business Contact.
Click on the "New" button on this dialog box and BCM will automatically create a new Account record linked to the Business Contact with most of the data fields populated from the Business Contact's record

 

Can a Business Contact be linked to more than one Account?

No, a Business Contact cannot be linked to more than one Account.  A Business Contact can only be an unlinked stand-alone item, or linked to just one Account.

I mistakenly deleted my Business Contact, how can I retrieve it?

Under you Business Contact Manager Folder, select the Deleted Items folder.
Your deleted Business Contact should be displayed there.
You can right click and move it back to Business Contacts folder.

How do I set Business Contacts to be my default Address List while sending emails?

Under the Tools Menu Item, select Address Book.
Click on the Tools menu and select Options.
There you can control the order of Address list in Outlook.

When receiving an inbound e-mail, what is the difference between using the ‘E-mail Auto link’, and the ‘Link to record’ options?

Once turned on, E-mail Auto Linking should automatically link the e-mail to the contact with that e-mail address as soon as they arrive in the inbox.

How do I copy or move individual Outlook Contacts in to Business Contacts?

Please refer http://office.microsoft.com/en-us/outlook/hp011455511033.aspx for more information.

Why can’t I right click an e-mail address in an e-mail and create a Business Contact?

This is currently not supported, but may be considered for a future release.

Frequently asked questions for Database Admin Tool

Can I set up a BCM database on SQL 2005 64-bit edition?

Database Tool is not supported on 64-bit SQL 2005.  However you can try a manual workaround by following the instructions in the document given bleow.

http://sharepoint.microsoft.com/innovateon/officedeveloper/Developer%20Documents/Outlook2007BusinessContactManager.doc

After deploying the database, how do I add and remove users?

The BCM database sharing wizard handles adding and removing users.

On the client side, BCM installs SQL Express even if you have no
 intention of using it. Is it necessary?  

It's not necessary to have sql installed on a client that will only
ever connect to a shared database on a server, but it is recommended to have it installed.

On our SBS server, I would like to change the location of the BCM database
files (MDF, LDF, BAK) to something other than the default "Application Data"
folder in "Documents and Settings".

Download SQL Management Studio from Microsoft Website (if it's not already on your SBS
server)Open SQL Management Studio, expand the Databases section in the left navigation   bar, right click on your database, choose Tasks > Detach.  To ReAttach, right click on Databases and choose Attach, then browse to the location of  the MDF file on your hard drive..

Need to setup Accounting 2008 Pro and Office 2007 Pro linked to
Business Contact Manager on Small Business Server.

Database Admin tool can help you setup database on your SBS server. Also you do not need Office installed on the SBS server.

Frequently asked Questions for ACT-to-BCM

I am switching from ACT 6.0 to BCM 2007. During the importing process I get the error message "Some errors occurred while your data was being imported. Wrong file version”

Open the “.bcm” file converted from ACT File, change its header's version from "3.0" to "3,0" (or the correct format according to the Windows locale, you can check that in control panel->regional and language options -> Standards and formats)and try to import that “.bcm” file again.

I would like to convert ACT 9.0 to BCM.

The SP1 release supports conversion of ACT 9.0 to BCM

I have ACT 6.0 on an XP machine. My new Vista 64 computer has BCM 2007 but will not allow me to install ACT. Do you have any ideas on how to migrate to BCM on the new computer?

On the Vista 64 machine, copy the ImportUtility folder from C:\Program Files\Microsoft Small Business\Business Contact Manager and paste it into the XP machine. Run BcmImportUtility.exe on the XP machine, and convert ACT data into a bcm file.  Bring this .bcm file into the Vista 64 machine and convert all your ACT data.

Converting ACT 6.0 gives the choices: Contact, Group, and Product. I would like to convert "Company"(ACT) to Account"(BCM), but it's not listed.

Company Field in ACT started from ACT 7 onwards.  It is not there in ACT 6.

Frequently Asked Questions for Database

I have Business Contact Manager 2007 Integrated with MOA in a sharing scenario on Small business server with SQL 2005. One of the shared user changed windows password and now cannot access the database.

       SQL Database should be set to log on as local system account

In a shared scenario, files that are linked or files part of an email are not being stored in the database?

 

Email and attachments cannot be currently stored in the BCM db to avoid consuming all the database space.

 

SQL Express using lot of memory on my system

Install free download “SQL Server Management Studio Express” for setting Max
Memory
Info on why this is helpful:
http://www.microsoft.com/technet/prodtechnol/sql/2005/mgsqlexpwssmse....

Download Source:  “Managing SQL Server Express”
(SQLServer2005_SSMSEE.msi)
http://www.microsoft.com/downloads/details.aspx?FamilyID=C243A5AE-4BD...

Installs to Program Files/Microsoft SQL Server 2005

User Instructions:
Open SQL Server Management Studio Express
Connect to SQL database
At Object Explorer, right click on Server Name to provide Properties Dialog
box
Select Memory
Enter desired Maximum Server Memory (Recommended not less than 100MB)

Where my database is physically located?

Databases are physically created at

C:\Documents and Settings\{username}\Local Settings\Application
Data\Microsoft\Business Contact Manager

I recently upgraded my machine from XP to vista with office 2007. How do I get my old BCM on office 2007 using my backup files?

You need to back up BCM database on XP and restore it after upgrade to VISTA. If the user accounts are different after upgrade, you need to run Outlook as “Run as Administrator”.

Can I use BCM 2003 to connect to a shared database created by BCM 2007?

All the BCM clients needs to be of same version

 What is SQL server instance Name for BCM 2007?

It’s MSSMLBIZ

What is the difference between “.sbb” and “.msbcm” back up files and SQL “.bak” files?

.sbb” or “.msbcm” files are the compressed version of “.bak” file. “.sbb” file also contains an xml file to keep some generic database information such as language and the version of the database.

 

 

 

Frequently Asked Questions for Business Contact Manager for Pocket PC/SmartPhone

Where to find Business Contacts Application for Pocket PC(touch Screen device) and SmartPhone (Non-Touch Screen device)?

There are two separate applications

Pocket PC- http://www.microsoft.com/downloads/details.aspx?familyid=7BC78C14-7143-41D9-84A9-BD628DB7B6A0&mg_id=10118&displaylang=en

SmartPhone- http://www.microsoft.com/downloads/details.aspx?FamilyID=d9620097-e8f9-41f3-ae66-a7067dac7ace&DisplayLang=en

In order to install BCM mobile, you device should be connected to a computer which has ActiveSync (for Windows XP) or Windows Mobile Device Center (for Vista).

How do I sync my Palm/ Blackberry/ other non-windows mobile devices with Business Contact Manager

Business Contact Manager for PPC/SmartPhone is only compatible with Windows Mobile Devices.

Can I configure how many history items I can sync to the device ?

Yes, you can. Follow these steps:

  1. Make sure that you device is connected to ActiveSync/Windows Mobile Device Center on the computer.
  2. In the application list View , double click on the Business Contacts icon at the bottom. You will notice Business Contact Synchronization Settings dialogue.
  3. Click "History Settings" button that opens up various filter options for you to select.
  4. Configure what history items you want to sync..

My device is connected to the desktop but Business Contacts doesn’t sync?

If you have your device connected to the desktop and it seems to show “Synchronizing” in active sync list view for Business Contacts for ever, please disconnect your device and connect it again.

Can I sync both Business Contacts and Outlook Contacts?

Business Contact Manager for mobile devices only supports syncing Business Contacts. Outlook contacts can be synced independently through ActiveSync/WMDC.

I uninstalled Business Contacts for Pocket PC / SmartPhone from the desktop but why is it still on the device?

Uninstalling Business Contacts for Pocket PC/SmartPhone on the desktop doesn’t uninstall Business Contacts from the device. You have to do it separately by going to Active Sync’s Menu Item Tools | Add/Remove Program. On the dialog window Uncheck the Business Contacts option on the Application List View and follow the instructions on the device.

Why don’t I see caller ID for my Business Contacts on my PPC/Smartphone?

The Caller ID feature is currently not supported. In order to workaround, you can duplicate your Business Contacts with Outlook Contacts, and sync Outlook Contacts to the device. In the future version of Business Contact Manager for mobile we will look at improving this functionality.

What history items get synced to my mobile?

Following items are supported by mobile version of Business Contact Manager.

  • Opportunity Summary
  • Phone Log
  • Business Notes
  • Email
  • Tasks
  • Appointments

Please note that history items can't be modified or created on the device.

Can I store Business Contact Manager data on external device storage such as SD card?

Current version of Business Contact Manager doesn't support external storage.

Get Business Contact Manager with Outlook Standalone

Since we released Business Contact Manager in January 2007, we have constantly received requests from our customers to make BCM available with Outlook standalone. We are pleased to announce that now you can buy Microsoft Office Outlook 2007 with Business Contact Manager. The product is available in major retailers and online stores. The new product offers all the great features that are offered by BCM in Office suite.

Outlook with BCM Box

More information about Outlook with BCM  is available here. You can buy it from Microsoft Online  for $149.95.

BCM is now available in the following retail SKUs.

  1. Microsoft Office Outlook 2007 with Business Contact Manager (New) (Includes Outlook 2007 and Business Contact Manager)
  2. Microsoft Office Professional 2007
  3. Microsoft Office Small Business 2007
  4. Microsoft Office Ultimate 2007
How to Change BCM Polling Interval?

This post explains how one can change the polling interval in BCM. Please note that this is suggested only for advanced users and for the environment where BCM is used in shared mode.

What is Polling Interval?

When BCM is used in shared environment, all BCM clients poll the server machine to see if there are any changes to BCM data. This allows BCM client to display the most up-to-date data. By default, BCM clients polls server every second in order to ensure that any changes to data made by any client are available to all the clients immediately. Although a short polling interval is desirable so that new data are immediately available, server and client machines pay the cost of frequent polling. In certain BCM usage scenarios (for example, many clients are connected to server), you might get improved performance if polling interval is set higher than default of one second. If the polling interval is set too high, clients will process the changes less frequently but they will have to process more changes at a time. So, you might have to experiment with different values and set the one that works for

How to Change Polling Interval?

In BCM SP1, we have added a registry key that you can tweak to increase the polling interval.  Make sure to close Outlook with BCM before changing the registry key value.

The setting is controlled by “HKCU\Software\Microsoft\Business Solutions eCRM\PollingInterval” registry key. The key should be a DWORD (32-bit) value, the number represents the interval in milliseconds.  By default this is 1000 (1sec), changing this to some higher value could help reduce the load on the database.  This reg key needs to be added on each BCM client machine. We don't have any recommendation for what value to use because every user's requirements might be different (For example, one might prefer getting updates more frequently than system overhead). But you could try out with 30 seconds and see if you notice any difference. By default "PollingInterval" key value might not exist. First create a DWORD key in “HKCU\Software\Microsoft\Business Solutions eCRM” and then set its value.

I hope it helps answer some of the comments about polling interval.

-Mukesh

Happy Holidays

Happy holidays from BCM team. Many people in the team are on vacation so we are unable to reply to the post for the next two weeks. I will try to respond to the remaining posts before I take off for the Christmas.

Enjoy the holidays!

 -Mukesh

Business Contact Manager for Outlook 2007 SP1 is Live

We are pleased to announce that Service Pack 1 for BCM is live. This update significantly improves the stability, adds support for ACT! 8 and ACT! 9 migration and fixes several issues reported by our customers. Here is a high-level list of what is included in this service pack:

  • Several fixes to crashes and hangs that were reported by customers like you through crash reporting dialog.
  • Data migration support for newer versions of ACT! (ACT! 8.0 and ACT! 9.0). (Requested here on this blog by you)
  • Fixes for several database issues and improved error handling/troubleshooting for key reported database issues.
  • Custom field support in Mail Merge marketing campaign. (Requested here on this blog by you)
  • Fix to an issue when sending marketing campagin to a large number of recipients.
  • Fixes for follow-up flag related issues.
  • Fixes for Miscellenous bugs reported by our customers through various feedback channels such as this blog, newsgroup, support etc.
  • Ability to change the database polling interval that might give some performance benefits in shared database scenario. (More on this in the next blog post)

We recommend that you get BCM SP1 through Microsoft or Office update site. Alternatively, you can directly download the update from here. The service pack is available for all langagues in which BCM is available.

Thanks for your feedback. We hope that this update will improve your experience with BCM. As always, please keep the feedback coming in. That's what help us improve the quality of our product.

-Mukesh

 

Business Contact Manager Product Update

It's been a while since I posted here. I just wanted to give some update on upcoming service pack. For the last several months team has been busy troubleshooting and fixing the issues in BCM 2007 reported by you. In parallel to this, we have been working on developing exiciting new features for our next big release of BCM. It is too early to talk about what will be in next BCM and when we will release it. However, I can say that we have seriously taken the feedback from our customers and tried to address lot of it by adding exciting new features.

Our upcoming release is Service Pack 1 (SP1) for BCM 2007. Many of you have patiently been waiting for migrating from newer version of ACT! (8.0, 9.0). We have addressed the ACT! data migration issues in SP1. Additionally, we have fixed major functionality issues reported by customers and improved the stability by fixing the issues that you report by submitting those crash reports. We do ananlyze alll that crash data and try to fix 70-80% of the crashes. So keep sending those error reports.

We are hoping to make the service pack publicly available through automatic update before Christmas. Please look out for the post here when we are closer to the release date.

-Mukesh

 

Restoring a BCM database from SQL .mdf and .ldf files (Windows Vista or XP)

If you need to restore a BCM database from the .mdf and .ldf SQL database files, you can use the following script to attach the SQL database.

Be sure to install the latest version of BCM and all service packs before running this script, since BCM will not connect to databases that were created using newer versions of BCM.

Copy the text below into Notepad and follow the instructions.  Let me know if you have any questions about this. 
~ Clinton Ford

@ECHO OFF
REM Restore a BCM database from the SQL .mdf and .ldf files (Windows Vista or XP)
REM --------------------------------------------------------------------------------
REM Instructions
REM 1.) Install and configure BCM on the destination computer.
REM 2.) Copy your backup .mdf and .ldf files into the BCM database folder.
REM      To do this, click Start | Run, then enter the following text into the text box and click "OK":
REM           %LOCALAPPDATA%\Microsoft\Business Contact Manager\
REM     NOTE: You might need to rename your .mdf and .ldf files if a pair of files with the same name already exists
REM 3.) Now, modify this script in Notepad by doing the following:
REM 4.) Press CTRL+H in Notepad to open the Replace dialog
REM 5.) Type <BACKED_UP_DATABASE_NAME> in the "Find what" box
REM 6.) In the "Replace with" box, enter the name of the backed up BCM database (without the .mdf file extension)
REM 7.) Save this script to your Desktop as RestoreDB.cmd
REM 8.) Run this script by double-clicking on the RestoreDB.cmd file on your Desktop
REM 9.) From the main Outlook window, select "Business Contact Manager | Database Tools | Create or Select a Database..."
REM 10.) Select your backed up database from the drop-down list and click "Next"

"c:\program files\microsoft sql server\90\tools\binn\sqlcmd.exe" -b -E -S .\MSSMLBIZ -Q "EXEC sp_attach_db @dbname = '<BACKED_UP_DATABASE_NAME>', @filename1 = '%LOCALAPPDATA%\Microsoft\Business Contact Manager\<BACKED_UP_DATABASE_NAME>.mdf', @filename2 = '%LOCALAPPDATA%\Microsoft\Business Contact Manager\<BACKED_UP_DATABASE_NAME>.ldf';">>"%LOCALAPPDATA%\Microsoft\Business Contact Manager\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO Attach DB Returned:%ERRORLEVEL%>>"%LOCALAPPDATA%\Microsoft\Business Contact Manager\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO Attach DB Returned:%ERRORLEVEL%

Restoring an Automatic SQL Backup

In my previous post, I explained how to schedule tasks to automatically back up your BCM database using SQL scripts.  Hopefully you will never need to restore one of those backups.  But just in case, below is the script to help you do that in Vista or XP.  Copy the text below into Notepad and follow the instructions.  Let me know if you have any questions about this.  ~ Clinton Ford

@ECHO OFF
REM Restore a BCM database from a SQL Database Backup (.bak file)
REM This script will restore a SQL backup (.bak) file over a new, blank BCM database
REM --------------------------------------------------------------------------------
REM Instructions
REM 1.) Locate the folder where your .bak file resides
REM 2.) Right-click on the folder and select "Properties"
REM 3.) Click the Security tab
REM 4.) In Vista, click the "Edit..." button
REM 5.) Click the "Add..." button
REM 5.) Type NETWORK SERVICE in the text box and click "OK"
REM 6.) Check the Allow "Write" box under Permissions and then "OK"
REM 7.) Click "OK" on the Folder Properties dialog
REM 8.) Start Outlook with BCM
REM 9.) Create a new, blank BCM database by doing the following:
REM 10.) From the main Outlook window, select "Business Contact Manager | Database Tools | Create or Select a Database..."
REM 11.) Select the "Create a new database" option, type a database name, then click "Next"
REM 12.) Write down the name of your blank database, finish the Wizard, close Outlook, and wait for the Outlook process to exit.
REM      Now, modify this script in Notepad by doing the following:
REM 13.) Press CTRL+H in Notepad to open the Replace dialog
REM 14.) Type <BACKED_UP_DATABASE_NAME> in the "Find what" box
REM 15.) In the "Replace with" box, enter the name of the backed up BCM database (without the .bak file extension)
REM      Normally the database name matches the name of the .bak file.
REM      If you are unsure of the database name, use the optional script below from a command prompt.
REM 16.) Click "Replace All" to set the name of the backed up database
REM 17.) Now type <BACKUP_PATH> in the "Find what" box
REM 18.) Type the path to the Backup folder from steps 1 or 2 above
REM 19.) Click "Replace All" to update the folder paths
REM 20.) Now type <BLANK_DATABASE_NAME> in the "Find what" box
REM 21.) In the "Replace with" box, enter the name of the blank BCM database to replace (without the .mdf file extension)
REM 22.) Click "Replace All" to update the destination folder paths
REM 23.) Now type <LOCAL_APP_DATA> in the "Find what" box
REM 24.) In the "Replace with" box, enter one of the following, depending on your operating system:
REM
REM       For Windows Vista:
REM       C:\Users\<USER_NAME>\AppData\Local
REM
REM       For Windows XP:
REM       C:\documents and settings\<USER_NAME>\Local Settings\Application Data
REM
REM 25.) Click "Replace All" to update the folder paths
REM 26.) Now type <USER_NAME> in the "Find what" box
REM 27.) In the "Replace with" box, enter your Windows User Name
REM 28.) Click "Replace All" to update the folder paths
REM 29.) Save this file to your Desktop as RestoreBCM.cmd
REM 30.) Run this script by double-clicking on the RestoreBCM.cmd file on your Desktop
REM
@ECHO WARNING! Restoring this database will overwrite any existing database
@ECHO          named "<BACKED_UP_DATABASE_NAME>".  Also, this script will
@ECHO          overwrite any data in "<BLANK_DATABASE_NAME>".  Please be sure that
@ECHO          you have backed up any existing data before continuing.
@ECHO          Close this window or press CTRL+C to abort this operation.

pause
@ECHO Restore started...
REM  If you would like to view the list of files contained in your backup file, use only the first command below:
"c:\program files\microsoft sql server\90\tools\binn\sqlcmd.exe" -b -E -S .\MSSMLBIZ -Q "RESTORE FILELISTONLY FROM DISK = '<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>.bak'">"<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO FileListOnly Returned:%ERRORLEVEL%>>"<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO FileListOnly Returned:%ERRORLEVEL%
IF ERRORLEVEL 1 GOTO END

"c:\program files\microsoft sql server\90\tools\binn\sqlcmd.exe" -b -E -S .\MSSMLBIZ -Q "sp_detach_db '<BLANK_DATABASE_NAME>'">>"<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO Detach DB Returned:%ERRORLEVEL%>>"<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO Detach DB Returned:%ERRORLEVEL%
IF ERRORLEVEL 1 SET ERRORLEVEL=0

"c:\program files\microsoft sql server\90\tools\binn\sqlcmd.exe" -b -E -S .\MSSMLBIZ -Q "RESTORE DATABASE <BACKED_UP_DATABASE_NAME> FROM DISK = '<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>.bak' WITH MOVE '<BACKED_UP_DATABASE_NAME>_dat' TO '<LOCAL_APP_DATA>\Microsoft\Business Contact Manager\<BLANK_DATABASE_NAME>.mdf', MOVE '<BACKED_UP_DATABASE_NAME>_log' TO '<LOCAL_APP_DATA>\Microsoft\Business Contact Manager\<BLANK_DATABASE_NAME>.ldf', REPLACE">>"<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO RESTORE DATABASE Returned:%ERRORLEVEL%>>"<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO RESTORE DATABASE Returned:%ERRORLEVEL%
IF ERRORLEVEL 1 GOTO END

"c:\program files\microsoft sql server\90\tools\binn\sqlcmd.exe" -b -E -S .\MSSMLBIZ -Q "EXEC sp_attach_db @dbname = '<BLANK_DATABASE_NAME>', @filename1 = '<LOCAL_APP_DATA>\Microsoft\Business Contact Manager\<BLANK_DATABASE_NAME>.mdf', @filename2 = '<LOCAL_APP_DATA>\Microsoft\Business Contact Manager\<BLANK_DATABASE_NAME>.ldf';">>"<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO Attach DB Returned:%ERRORLEVEL%>>"<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO Attach DB Returned:%ERRORLEVEL%
IF ERRORLEVEL 1 SET ERRORLEVEL=0

"c:\program files\microsoft sql server\90\tools\binn\sqlcmd.exe" -b -E -S .\MSSMLBIZ -Q "sp_dboption '<BACKED_UP_DATABASE_NAME>', 'single user', 'TRUE'">>"<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO Single User Mode Returned:%ERRORLEVEL%>>"<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO Single User Mode Returned:%ERRORLEVEL%
IF ERRORLEVEL 1 GOTO END

"c:\program files\microsoft sql server\90\tools\binn\sqlcmd.exe" -b -E -S .\MSSMLBIZ -Q "sp_renamedb '<BACKED_UP_DATABASE_NAME>', '<BLANK_DATABASE_NAME>'">>"<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO Rename DB Returned:%ERRORLEVEL%>>"<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO Rename DB Returned:%ERRORLEVEL%
IF ERRORLEVEL 1 SET ERRORLEVEL=0

"c:\program files\microsoft sql server\90\tools\binn\sqlcmd.exe" -b -E -S .\MSSMLBIZ -Q "sp_dboption '<BLANK_DATABASE_NAME>', 'single user', 'FALSE'">>"<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO Multi-User Mode Returned:%ERRORLEVEL%>>"<BACKUP_PATH>\<BACKED_UP_DATABASE_NAME>_RestoreResult.txt"
@ECHO Multi-User Mode Returned:%ERRORLEVEL%
:END

 

More Posts Next page »
Page view tracker