Typing in password for every connected table from SQL Server 2008 R2 in Excel 2010 Powerpivot Addin - sql-server-2008-r2

I've got a BI Dashboard in Excel 2010 using Powerpivot, which is connected to a number queried tables on one SQL Server. When the connections were setup, I checked the box to 'save password' on each one. However, whenever my users reopen the document and go to the Powerpivot window and select 'RefreshAll' then they have to type in the password multiple times (once for each table), which is not suitable.
I have looked here and here and seem to be experiencing the same issue as a number of other people. I have started again from scratch, ensuring that the 'save password' box is definitely checked on each connection string.
The only workaround I can think of is by user Windows Authentication, but this document is intended for widespread use, and as such this will require a lot of maintenance, and will really annoy my server admin :)
Does anyone have a workaround, or any way of resolving the problem?

This solution comes close, but doesn't seem to work in my case. Might work for others though...
Solution summary:
In the main Excel window in the Data tab, choose Connections, then select the workbook connection that corresponds to your PowerPivot connection. Click on Properties, switch to the definition tab, and mark “Save password” box.
Source:
http://cpa-it.com/password-not-saved-in-powerpivot-connection-when-using-sql-authentication/#comment-10654

I've found a workaround that works for me, but might not be an ideal solution for others.
In the main Excel window, you can create a new connection using a connection file (.odc). If you create this file on a shared network drive that all users can access, and select to store the password in the connection file, the password is -actually- stored.
You can then go on and use this connection in the PowerPivot window. It will no longer ask for a password when refreshing your tables.
Of course this is only a useful workaround within a company LAN, and if there are no security implications for storing the password on a fileserver in an odc file.

Related

Correcting Crystal Report Data Sources -- Tables not following Server

Been struggling with this on a few Crystal Reports, and it's super evident when testing inside of the CR editor.
My report has one database connection (OLE DB to a a SQL Server). On the vast majority of my CR's, when I hit F5, and log into the SQL server for a data preview, the rest of the report will follow whatever database I select.
On some reports, it does not--and the tables in the underlying connection are stuck to a specific database.
Is this a setting within Crystal Reports for the tables below a connection to have their own "Catalog"?
I've found I'm able to correct this somewhat by changing each of the tables Catalog's manually, but I use these CRs against multiple databases.
Has anyone encountered this, and hopefully found a way to fix it without re-creating the report from scratch?
Try to verify the database. If this doesn't help try to update the connection to ODBC and back to OLDE DB.
Something else to try would be to click on Database in the menu bar, then click "Log On or Off Server". This will allow you to select a database server that the report is connected to and then Log Off from that connection, repeat this for all connected databases. Then click Database on the menu bar again and then click "Set Datasource Location" to update the report with the database you would like to use.
This usually works for me:
right click on database fields and left click on set datasource location.
some times you will need to update every table.
but most of the time - after making the connection to database you can update all tables automatically

Crystal Report ODBC connection only shows "Add command"

I'm supposed to set up a crystal report for something less than exciting. This is my first experience using Crystal Reports (and its been agony).
When I add an ODBC connection, I put in the password (confirmed it works elsewhere) and press all the "Next" there are, and then I end up with this this:
I also am able to use a direct query when I do "add command" and can access the database tables that way, but this is less than ideal.
My understanding is that the tables from the database are supposed to be listed under my connection, but all I see is "add command"
Does this mean I am not connected to the Database?
How do I correct this?
Verify that the user you setup in the ODBC Data Source Administrator has access to those tables in the database.

SQL Server Management Studio - Server Names Disappeared

The first dialog box you get when opening SSMS (mine is 2008 R2) allows you to choose which server you want to connect to.
I had at least six servers in that list, including a local server called something like MYPC/SQLSERVEREXPRESS
Windows Updates ran last night and rebooted my machine, and now my SSMS list of servers is gone. I can select (local) or (browse for more)
What happened to my previously saved servers and their saved login info?
The file that stores these for 2008 is found at c:\%UserProfile%\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin
My guess is that it is still there, but was overwritten by one of your updates, you can check it to see when it was last modified.
You should make use of registered servers and export the file to save time if this happens again.
As I understand, you want to retrieve your credentials from that file.
There is a way to restore your passwords, if you still have sqlstudio.bin file and you can see "password" entries there.
First, some theory: When SSMS saves connection object it encrypts the password using some encryprion method, that is BOUND to your windows login. If you try to copy the sqlstudio.bin to other machine/user profile, passwords will not be decrypted. So it is important that you do all actions under same windows account, that you have used then sqlstudio.bin was generated. I can not tell you, if you can directly manipulate sqlstudio.bin - I suppose there are some checksums there which will prohibit direct manipulation, but there is another way.
I know the information I written above, because I develop myself an add-in for SSMS - SSMSBoost. I have implemented there the logic to manage preferred connections (so that you actually will not need standard dialogue anymore). I use exactly the same SSMS objects to store connections and serialize then into XML, so it is easier to manipulate.The picture below shows contents of sqlstudio.bin and SSMSBoostSettings.xml for the same connections. You can recognize, that username and password binary data are the same. So, to restore your password you have to:
install ssmsboost
add preferred connection to ANY database with sql server security
open SSMSBoostSettings.xml (you will see the path to that file in settings dialogue, after you have saved settings. Just save, close and re-open it. Path is displayed at the bottom)
Close SSMS, open sqlstudio.bin and ssmsboostsettings.xml in editor
modify entry in ssmsboostsettings.xml - enter data of your server from sqlstudio.bin - adress, database name, username. Carefully copy password data.
save xml and open SSMS - SSMSBoost will now show your connection in preferred connections and you will be able to connect to database. (see second picture)

Import data from an Access database into Word

I have created a program that runs off of an Access database on the company server. The program is running fine and I am about to release it to the office. Before I do this I would like to write a help file in case the users run into issues. However, I am running into problems here. In the program, each user has a security level that is retrieved from the database that allows them to have access to different features in the program. I would prefer that only certain users know about some of the features. In writing a help file for all of the features, I would like to have Microsoft Word read the security level from the database and only display the portions of the help file corresponding to the features the user has access to. I have tried using the following VBA code in the Document_Open event:
Set db = OpenDatabase(databasePath, False, False, databasePassword)
But I get an invalid password error (the database is password protected). I have verified the correct password several times now and still no luck. Does anyone know what I am doing wrong? Is there some other way to connect to an Access database using Word?
Why not include the help in a table with a rich text memo? Each section can be contained in a different record.
When creating such a table I generally have a help button that opens the relevant section and an extra field to allow annotation.

Embed SQL Password into Crystal Reports RPT file?

We are experimenting with Crystal Reports viewers such as this one:
http://www.thereportviewer.com/
... which can actually re-connect to the data source and re-run a Crystal Reports RPT file with live data.
However when running the report the viewer asks for a password to connect to the data source (in this case SQL Server).
Does Crystal Reports have some way of embedding a connection password into a RPT file to avoid this? Or should I be using a System DSN from the Control Panel/ODBC thing to get around this?
I figure someone else must have had this problem.
You can't do that. If possible set the password in the DSN or use a Report Viewer that can store the passwords for you. You can of course also build your own .NET report viewer, which isn't very hard to do if you've got .NET knowledge.
Added on April 29, 2010:
What you can try is doing the following:
Connect to a "ODBC (RDO)" via "Create Connection" in Crystal Reports. At the bottom of the dialog you'll find an option to enter a connection string. A connection string can contain the login info, like the example below.
Example connection string:
DSN=;DB=;UID=;PWD=password
To automatic connect to SQL using user sa and password in Crystal Reports
1) Create File DSN in ODBC Control
2) In Create file DSN add line with SA Password like this:
[ODBC]
DRIVER=SQL Server
UID=sa
PWD=your_pass
DATABASE=Your_Database
WSID=YourServerName
APP=System operacyjny Microsoft® Windows®
SERVER=YourServerName\YourDatabase
Description=YourDescription
3) Connect to SQL in Crystal Report using Your DSN File
You have to remember that your password is easy to find so this is very dangerous.
In newer version of The Report Viewer, you create an override connection, leaving the server and database fields blank, but setting the username and password, and it will work. The software will set the username and password to that value without changing the other connection settings inside the report. This will stop it from prompting you for a username and password.
You could also set the username and password inside the ODBC driver, or other driver settings, but some databases don't allow this for security reason... and you may not be using ODBC.
we had this problem too, but are currently assessing sabrelogic logicity viewer.
It will store the username and password in a separate file, which call up, and runs the report. It has the advantage that I can store the reports in a central location, and just send out the file that calls up each report to each user, simplifying the problem of making changes to a report that has been distributed.
Sabrelogic
The only donwside that I have found with it to date is that it doesn't handle dynamic parameters very well.
I had the same problem with hana studio + crystal report and I solved it with this conection string, I forgot to put the user and password.
DRIVER={yourdriver};SERVERNODE=servername or IP;DATABASE=databaseName;UID=databaseuser;PWD=password