Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

MS SQL

Posted Aug 24, 1999

SQL Sam and the Phantom Connection - Part 1 (with clues) - Page 3

By Steve Hontz

SQL Sam and the Phantom Connection - Solution!

"What do you mean, Sam?" Jimmy asked. "I don't see any connections..."

"Don't forget, Jimmy, that when you run a scheduled task, the SQL Executive Service makes a connection into SQL Server. And it has to establish a connection to a particular database."

"How does it decide what database to connect to?" asked Jimmy.

"Keep looking," smiled Sam. "You'll see it..."

"Oh!" Jimmy exclaimed. "It's right there, in the task options: Database testDb! I put TestDb as the database name because I figured that was the database where the work should be done."

"Well, that does make sense," admitted Sam. "But in this case, it keeps you from loading the database properly. You'll want to have the connection log into a different database."

Jimmy changed the database the scheduled task used to master, like this:

This time, when Jimmy ran the task, it worked. Jimmy was well on his way to creating a weekly scheduled process to check his databases by using an offline server. SQL Sam cautioned Jimmy that sometimes there are true phantom connections. These seem to be left behind from disconnected applications, and they won't show up in sp_who. They do have an annoying tendency to keep the sa from doing operations that require exclusive database access (like a database load). So far, the only solution to that problem seems to be to stop and restart SQL Server.

Go read more exciting SQL Sam Cases!

See the story behind the story in Behind the SQL: The Making of SQL Sam!


Steve Hontz is President of The Bit Corner, Inc., a Phoenix-based consulting firm specializing in Windows NT, C++, and SQL Server development. You can reach him at steve@bitcorner.com.




MS SQL Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 




Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SQL 2005: SSIS: Error using SQL Server credentials poverty 3 August 17th, 07:43 AM
Need help changing table contents nkawtg 1 August 17th, 03:02 AM
SQL Server Memory confifuration bhosalenarayan 2 August 14th, 05:33 AM
SQL Server Primary Key and a Unique Key katty.jonh 2 July 25th, 10:36 AM


















Thanks for your registration, follow us on our social networks to keep up-to-date