Solved

SQL Server 2012 Auditing

Posted on 2013-02-01
4
288 Views
Last Modified: 2013-02-09
I am trying to see what is causing an application connection to switch databases once connected. The custom app I have is to write to any database that I type into it with the designated credentials. When I connect to the SQL Server instance, I have a db1 and a db1_dev. I want to write to the db1_dev when connecting with the app, and the app does successfully connect, but then it writes to table1. I tested the app by entering a database name that doesn't exist and then it doesn't connect....so that indicates to me that the app is initially passing in the database name value that I am giving it, however somewhere in SQLServer 2012, it is defaulting back to db1. What can be done to troubleshoot the SQL Server to see what is causing the issue?
0
Comment
Question by:DB-aha
  • 2
4 Comments
 
LVL 51

Accepted Solution

by:
Mark Wills earned 250 total points
ID: 38846065
Sounds a bit like the remnants of a previous connection has become hard coded.

What language are you using and we can add those Topic Areas to your question and get some developer help.
0
 
LVL 25

Assisted Solution

by:TempDBA
TempDBA earned 250 total points
ID: 38847515
Check the code what you are using for writing into the table, but not the connection string. I think in the insert statement, you have older database name hardcoded. Or if you are trying to insert via a view\stored procedure which inturn is pointing to the old database.
0
 
LVL 1

Assisted Solution

by:DB-aha
DB-aha earned 0 total points
ID: 38852644
Thanks for the advice, however I had no access to the application to be able to review it myself, I simply had only access to the database. What was required on my end was to open SQL Profiler and view the queries sent by the application. When doing so I was able to identify that the insert statement contained what appeared to be hard coded database. The application developer then looked at the queries and changed the database name in the application into a variable.
0
 
LVL 1

Author Closing Comment

by:DB-aha
ID: 38870834
My comment contains what was actually done to troubleshoot. While the other comments provided did not provide ant SQL Troubleshooting techniques.
0

Featured Post

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
powershell and sql server - alerting 7 77
sql query Help 12 53
testing sql16 on win10 vs OS16 2 35
Getting max record but maybe not use Group BY 2 16
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now