|
Please rename your message title to something with meaning. Please read the forum guidelines. Messages with 'urgent' or 'please help' are considered rude and may not get you any help.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
did you try to make a GOOGLE[^]search?
I Love SQL
|
|
|
|
|
rajesh rajbhar wrote: SQL Server does not exist or access denied
It means that it either cannot access SQL Server via a TCP connection (you gave it a network address in the connection string) or you have not supplied the correct credentials to gain access.
Also, why are you using an ODBC connection to conned to a SQL Server database? Why aren't you using the SQL Provider built in to .NET?
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
I don't think he knows what he's using, because that's an OLE DB connection string (Provider= is a dead giveaway, ODBC uses Driver).
|
|
|
|
|
|
First of all, don't put urgent in your thread subject line. It just pisses people off.
rajesh rajbhar wrote: SQL Server does not exist or access denied
Check that the service is running and you don't have a firewall blocking it or something silly like that.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Please tell me that you aren't connecting with the sa account. This is extremely bad practice. sa has access to pretty much everything in SQL Server and you are basically opening up your dataaccess code to the point where your attack surface is too large. Use a limited access account only.
And, as others have stated, don't use urgent in your title. Just because you think it's urgent it doesn't mean that anybody else will care.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O'Hanlon wrote: tell me that you aren't connecting with the sa account.
By the looks of his connection string, I'd say so. Even the password is the same as username. That is really, really bad...
"It's only that urgent if you have to pee.." - Dave Kreskowiak
|
|
|
|
|
SQL 2005 installs with Network connections disabled by default. Only the local shared memory connection library is enabled. Since the error is coming from DBNETLIB, you are trying to connect with a network connection (most likely because of the reference to localhost (a TCP-IP network name). You must use the client configuration utility to enable the TCP connection. (or change your code to use the SQL Native client classes instead of OleDb).
And avoid using "urgent" in you post topics, it is rude.
|
|
|
|
|
I have tried to approach this from all angles except the working ones. Please help me if you have any idea what I'm doing wrong.
* I have a database, let's say "myDB"
* In myDB I have a stored procedure called myDB..procStartJob
* When I created this procedure I was logged in as the sysadmin (sa)
* I created this sp and used the "With Execute As OWNER" clause
This procStartJob has code inside it which executes msdb.dbo.sp_start_job
My problem is that whenever I execute myDB..procStartJob I get the following message:
EXECUTE permission denied on object 'sp_start_job'
But I specified that the procedure should "EXECUTE AS OWNER" which according to me is the sysadmin. In books online sp_start_job's documentation specifies that members of the sysadmin fixed server role can execute this sp. So why can't I?
Thank you in advance!
_______________________________________________________________________
http://www.readytogiveup.com/[ ^]
"you can't forget something you never knew..." M. Du Toit
|
|
|
|
|
The problem is that after reducing MSDTC security to "No Authentication", it mostly seems to work correctly, except that after a brief period of inactivity (a few minutes), the first attempt to use DTC fails, but subsequent attempts are successful, until inactivity again.
The original environment was a single machine with SQL Server installed and a service on another machine that would connect to the same SQL Server but utilizing different connections concurrently within the same transaction (using TransactionScope). This configuration worked fine.
The single machine with SQL Server installed has been changed to a cluster of two machines. Otherwise the configuration is the same. The "Distributed Transaction Coordinator" service is running as the Network Service account in all cases. Now the following error is generated when the second connection is made in the transaction (presumably promoting the transaction to DTC):
System.Transactions.TransactionManagerCommunicationException
Communication with the underlying transaction manager has failed.
All of these machines are running Win2003 SP1. I've also tried using my local machine (which is XP Pro SP2) as the service machine with the same results. The current solution is to modify the MSDTC tab in Component Services from "Mutual Authentication Required" to "No Authentication Required". This isn't an ideal solution, but seems to work...somewhat. After about 15 minutes of inactivity, the first attempt to connect to SQL Server in the transaction generates the same error as above. Also, the following entry now appears about 5 times in a row in the Security event log. Any subsequent connections seem to work fine until another period of inactivity.
Logon Failure:
Reason: Unknown user name or bad password
User Name: SQLMACHINE$
Domain: MYDOMAIN
Logon Type: 3
Logon Process: NtLmSsp
Authentication Package: NTLM
Workstation Name: SQLMACHINE
Caller User Name: -
Caller Domain: -
Caller Logon ID: -
Caller Process ID: -
Transited Services: -
Source Network Address: xxx.xxx.xxx.xxx
Source Port: 1623
A Google search yielded few results about NtLmSsp and the error. One solution I've found to prevent the initial failure is to run ipconfig /flushdns prior to the first call and that seems to prevent it. However, after the 15 minute period of inactivity, it seems to start again.
I've also tried the recommendations from the following links with no success.
http://blogs.msdn.com/florinlazar/archive/2004/06/18/159127.aspx
http://blogs.msdn.com/florinlazar/archive/2004/03/02/82916.aspx
http://technet.microsoft.com/en-us/library/bb457156.aspx#EGAA
The ideal solution would be to use the "Incoming Caller Authentication Required" or stronger and to prevent the initial connection failure. Any suggestions on the cause of this or what might be done to fix it?
Thanks
|
|
|
|
|
how to retrieve the last 4 or 5 records from a database table, i want to retrive the latest recirds which are entered not all or old records
|
|
|
|
|
If you have some way of determining the time (or sequence) the rows were inserted in the table (e.g. a date stamp column, of an incremental sequence number or id) then this is quite easy.
SELECT TOP 5 * FROM MyTable ORDER BY TimeStamp DESC
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
hi,
is there any query to check whether a database exits or not ?
thank ..
|
|
|
|
|
|
I think based on some of his other questions in the past, he might be doing homework. Why bother doing your own work?
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
uh huh.
Unless someone seems to have done a decent amount of investigation and research and is stuck on a specific problem I'll always put in the same amount of effort they've put into asking the question and just post a google link.
|
|
|
|
|
Any specific guidelines when we should go for return/output wrt SQL Server stored procedures.
If i have only one output to return?
Thanks,
Amit
|
|
|
|
|
Does your app need to work with the returned value?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
|
Ummm, does your app do anything with the returned value? E.g. report the row count, put the returned values in a datagrid, etc?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I tend to reserve the return value for succeeded/failed notifications, where I haven't used RAISERROR (which throws a SqlException in .NET client code). The return value can only be an integer, while output parameters can be any type.
I rarely use output parameters unless it's an out-of-band value, not associated with the other data in a result set, and I don't want to return an extra result set just containing that data.
|
|
|
|
|
Hi,
In my form I have so many textboxes and check boxes and Gridview, When the user clicks on a button I need to insert those data into different tables in Oracle database.
Can anyone tell me the best way to do the multiple inserts in to different tables in Oracle database.
Thanks in advance
|
|
|
|
|
I haven't worked with Oracle in a few years, so bear with me. You could try doing the inserts through a stored procedure.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I believe Oracle supports multiple statements in one batch. Ultimately you will have to write one insert statement per table, whether you do that as multiple statements in one batch or in a stored procedure.
SQL Server allows you to update a view if you supply an INSTEAD OF trigger which redirects the updates to the appropriate base tables. I don't know whether Oracle has a similar feature.
|
|
|
|