Get SQL Server Connection info from app without debugging? - sql-server

We are troubleshooting a SQL Server 2005 connection issue on a closed-source third-party ASP.NET application. The application is a .NET application and the developing company is using a custom formatted configuration file that stores the SQL Server authentication information.
The application when trying to connect to our SQL Server box is getting a "Cannot open database 'databasename'. Login failed for user 'username'" error. We have tested connecting to the SQL Server box from the web server using SQL Server Management Studio and the login information provided to their app, it works perfectly.
Is there any easy way that we can sniff/determine the SQL Server Connection information they are trying to use inside their SqlCommand? Debugging their code is not an option, as it is compiled in Release Mode, and we don't have source. We simply need something to be able to identify why their app cannot connect.

run profiler and choose Security Audit: Audit Login, Audit Login Failed and Audit Logout events. choose all columns.
from that you'll get the app name, and the user that tries to log in from the login failed event.
once you get that check which database is default for that user in SQL Server users.

I just asked some of the guys here and they both recommended trying reflector. If you had some hard coded values in the library, you should be able to see something there.

Related

Unable to view dashboards on Spotfire Webplayer if connected from database

I'm new with Spotfire and I'm trying to publish my spotfire dashboards. When I use excel and create the dashboards I'm able to view them on webplayer but when I connect spotfire to a database and create dashboards, I'm not able to view it on webplayer as it asks for username and password for the data source. I'm 100% sure I'm entering the correct credentials but it doesn't login and I'm stuck. I'm using MS Sql server studio 2017.
When uploading the data into the database I tried with windows authentication and also sql-server authentication but it doesn't seem to work. When I use windows authentication I used my windows login credentials and when I tried sql-server authentication I entered the same credentials which I used for login into the sql server.
Any help would be appreciated.
Please find attached the image.
I figured out. It was a firewall issue which was blocking me from connecting to the database.

Connection To The Database Failed on install dotnetnuke

I try to install dotnetnuke 7. I created an user that access to dnn database and in properties of sql server set the server authentication to sqlserver and windows authentication .But when browse website show this message :Connection To The Database Failed
Try connecting to the database using SQL Server Management Studio using the same credentials that you specify in DNN. That might help you identify what you are doing wrong.
You'll want to verify that the SQL Server accepts connections from the web server, assuming that they are not on the same machine.

Unable to connect to Integration service through SSMS

I have created a SSIS Package and now want to deploy it, for that I am required to create the Integration Service Catalog,so I have SQL Server Evaluation Set up in that when I m trying to connect the integration service, I am getting following error,
Connecting to the Integration Services service on the computer
"RESHMAJADHAV"
failed with the following error: "Access is denied."
By default, only administrators have access to the Integration Services service.
On Windows Vista and later,
the process must be running with administrative privileges in
order to connect to the Integration Services service.
See the help topic for information on how to configure access to the service.
Also I have observed that my instance for SQL Server Evaluation edition is RESHMAJADHAV\SQL_SERVER_EVALU but when I am trying to connect this server, then this option is not shown under Integration Services as shown below,
.
I am unable to sort this out, since I am entirely new to this, please explain what can be the solution.
Please make a note, I also have sql server express edition ,but since it doesn't support to create the SSIS Integration service catalog then I installed the SQL Server Evaluation edition .
Also when I am trying to connect via SQL Database as shown in below image,
then while creating the integration service catalog, it is given the following error
Password validation failed.
The password doesn't meet the requirements of password of the password filter DLL.
Change database context to SSISDB.
One fact I have observed, I don't know whether it is related or not but when I am trying to enter password for my system, then also it's giving same error that password doesn't meet the requirement and also when while installing the SQL Server edition, it gave the same error, no doubt my password was very strong and fulfill all the requirements of strong password, currently I am trying to run my SQL Server with windows authentication mode and also I have tried to disable the strong password policies from the administrative tools but it's totally futile....any help will be greatly appreciated.
Go to all programs
Click on Microsoft SQL Server 2012 folder
Right click on SQL Server Management Studio
Click on Run as Administrator
This should take care of problem for now. (With this you need to always repeat the same process). To avoid this every time and for a more persistent solution you need to get permission(s). Please do the following process and you should be good.
In previous versions of SQL Server, by default when you installed SQL Server all users in the Users group had access to the Integration Services service. When you install the current release of SQL Server, users do not have access to the Integration Services service. The service is secure by default. After SQL Server is installed, the administrator must grant access to the service.
To grant access to the Integration Services service
Run Dcomcnfg.exe. Dcomcnfg.exe provides a user interface for modifying certain settings in the registry.
In the Component Services dialog, expand the Component Services > Computers > My Computer > DCOM Config node.
Right-click Microsoft SQL Server Integration Services 11.0, and then click Properties.
On the Security tab, click Edit in the Launch and Activation Permissions area.
Add users and assign appropriate permissions, and then click Ok.
Repeat steps 4 - 5 for Access Permissions.
Restart SQL Server Management Studio.
Restart the Integration Services Service.
(Source MSDN)
I hope this will help
I researched little bit and then I came to know it was actually the problem of HP Security Tool Manager service of HP Laptop which was messing with the password of system,SQL Setup and catalog of Integration Service,I uninstalled it from PC and now my problem is resolved..
look like you don't have a admin privilege.
so start->sql server->right click->run as administrator
it might solve !!!
it's not clear whether this is due to your windows password or the SSISDB encryption password http://fendy-huang.blogspot.com.au/2012/01/sql-server-2012-integration-services.html.
I suggest you think of a very long complicated password with a mixture of upper, lower and punctiation like this:
~~AgFcDeUk17aP9%3(5#hY,lTSs9+
and put that into the encryption field when creating the catalog. If that doesn't get around your error, try changing your windows password to that. The only way to solve thedr things is divide and conquer. Once you know which password is the issue you can attack it further.

Unable to connect to SQL Server database

I'm trying to use the ASP.NET Web Site Administration Tool. When I click on the Security, I kept getting this message.
There is a problem with your selected data store. This can be caused
by an invalid server name or credentials, or by insufficient
permission. It can also be caused by the role manager feature not
being enabled. Click the button below to be redirected to a page where
you can choose a new data store.
The following message may help in diagnosing the problem:
Unable to connect to SQL Server database.
First of, which SQL Server does this administration tool trying to connect too? How do I change the "Current User Name" to other user name? It's automatically used my Windows authentication logged on user name. If I can change this and the password, it might just work.
Your web.config has a connection string. See this question for the full details on how to change that:
ASP.NET Website Administration Tool: Unable to connect to SQL Server database

Cannot access the database

I have a small VB.Net 2005 application and MS SQL 2005 database.
It's a small ADO.Net application the thing is surprising me is that I did this project 100%
and it's working fine with me but after I send the project with the database to a friend. It did not work. I send the database as [DB_name].bak, my friend tried to restore it, it gave an error. he tried to create the database in his local machine, when he tried to connect it to the database it gave him a strange error:
(login failed for user 'win7-PC\Win7'), maybe this error occurred'
because there is no (win7-PC\Win7) user in SQL Security
You are getting the error because your app is using windows authentication to connect to the database. Simply add the user (win7-PC\win7) to SQL as a database owner for that database.

Resources