Showing posts with label failed. Show all posts
Showing posts with label failed. Show all posts

Wednesday, March 21, 2012

Drop table issues

Good morning,
I have posted a few messages regarding dropping a table
from a SQL 6.5 database. All the suggestions from you good
people have failed. Allow me to recap:
SAP SQL 6.5 DB, SP 5. Have 4 SAP tables and the
sysprocedures table with various 2543, 2541 and 2504
errors. Wanted to drop the 4 SAP tables and re-create
them. I have tried to drop, truncate (thanks Tom) and even
just re-create the index on one table with 18000 rows,
everything results in a long run time and eventually
overflowing my 4GB log file. I'm assuming that SQL is
getting in some kind of loop and eating up my log
segment...?
Does anyone have any other suggestions before I have to
abandon ship and see if I can swim?
Many thanks for your help!
ChetChet
Sounds like you will have to do it the hard way. Write a
script to delete all the rows in the table. Make it a do
it in transactions and delete something like 100,000 at a
time. (Or whatever your transaction log can cope with)
While it runs keep running this command:
dump tran 'dbname' with no_log
It will take a while but it should work.
Hope that cracks it.
John|||Takes a long time even "truncate table"?....
You may want to change the database recovery mode to simple and then trim
your tables. After you're done, put the flag from simple mode back to what
it was followed by a full db backup.
Richard
"Chet" <chet.hodgins@.verizon.net> wrote in message
news:0bf201c352af$a66a13b0$a101280a@.phx.gbl...
> Good morning,
> I have posted a few messages regarding dropping a table
> from a SQL 6.5 database. All the suggestions from you good
> people have failed. Allow me to recap:
> SAP SQL 6.5 DB, SP 5. Have 4 SAP tables and the
> sysprocedures table with various 2543, 2541 and 2504
> errors. Wanted to drop the 4 SAP tables and re-create
> them. I have tried to drop, truncate (thanks Tom) and even
> just re-create the index on one table with 18000 rows,
> everything results in a long run time and eventually
> overflowing my 4GB log file. I'm assuming that SQL is
> getting in some kind of loop and eating up my log
> segment...?
> Does anyone have any other suggestions before I have to
> abandon ship and see if I can swim?
> Many thanks for your help!
> Chet

DROP TABLE failed

An overnight run failed, and I now regularly get the message:
Could not find row in sysindexes for database ID nn, object ID nnnnnnnnnn,
index ID -1. Run DBCC CHECKTABLE on sysindexes.
It appears that a DROP TABLE failed - the table does not show up in
Enterprise Manager, but a row for the table appears in sysobjects. DBCC
CHECKTABLE did not help.
How can I safely get out of this? Presumably it is not safe to delete the
row from sysobjects?
In future, would it help to put the DROP TABLE instruction within a
transaction?
Thanks.
Peter Hyssett
Yeah, that can happen, here is another post which clearly identifies the
problem and give a hint how to solve it:
http://groups.google.de/group/micros...5b5409616cfed4
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Peter Hyssett" <PeterHyssett@.discussions.microsoft.com> schrieb im
Newsbeitrag news:732EDDE9-15C5-42D4-9A81-F4A80E951320@.microsoft.com...
> An overnight run failed, and I now regularly get the message:
> Could not find row in sysindexes for database ID nn, object ID nnnnnnnnnn,
> index ID -1. Run DBCC CHECKTABLE on sysindexes.
> It appears that a DROP TABLE failed - the table does not show up in
> Enterprise Manager, but a row for the table appears in sysobjects. DBCC
> CHECKTABLE did not help.
> How can I safely get out of this? Presumably it is not safe to delete the
> row from sysobjects?
> In future, would it help to put the DROP TABLE instruction within a
> transaction?
> Thanks.
> --
> Peter Hyssett
sql

DROP TABLE failed

An overnight run failed, and I now regularly get the message:
Could not find row in sysindexes for database ID nn, object ID nnnnnnnnnn,
index ID -1. Run DBCC CHECKTABLE on sysindexes.
It appears that a DROP TABLE failed - the table does not show up in
Enterprise Manager, but a row for the table appears in sysobjects. DBCC
CHECKTABLE did not help.
How can I safely get out of this? Presumably it is not safe to delete the
row from sysobjects?
In future, would it help to put the DROP TABLE instruction within a
transaction?
Thanks.
--
Peter HyssettYeah, that can happen, here is another post which clearly identifies the
problem and give a hint how to solve it:
e97a7097d5e766ff/db5b5409616cfed4? q=%22Drop+Table%22+%22exists+in+sysobjec
ts%22&rn
um=3&hl=de#db5b5409616cfed4" target="_blank">http://groups.google.de/group/micro...b5b5409616cfed4
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Peter Hyssett" <PeterHyssett@.discussions.microsoft.com> schrieb im
Newsbeitrag news:732EDDE9-15C5-42D4-9A81-F4A80E951320@.microsoft.com...
> An overnight run failed, and I now regularly get the message:
> Could not find row in sysindexes for database ID nn, object ID nnnnnnnnnn,
> index ID -1. Run DBCC CHECKTABLE on sysindexes.
> It appears that a DROP TABLE failed - the table does not show up in
> Enterprise Manager, but a row for the table appears in sysobjects. DBCC
> CHECKTABLE did not help.
> How can I safely get out of this? Presumably it is not safe to delete the
> row from sysobjects?
> In future, would it help to put the DROP TABLE instruction within a
> transaction?
> Thanks.
> --
> Peter Hyssett

DROP TABLE failed

An overnight run failed, and I now regularly get the message:
Could not find row in sysindexes for database ID nn, object ID nnnnnnnnnn,
index ID -1. Run DBCC CHECKTABLE on sysindexes.
It appears that a DROP TABLE failed - the table does not show up in
Enterprise Manager, but a row for the table appears in sysobjects. DBCC
CHECKTABLE did not help.
How can I safely get out of this? Presumably it is not safe to delete the
row from sysobjects?
In future, would it help to put the DROP TABLE instruction within a
transaction?
Thanks.
--
Peter HyssettYeah, that can happen, here is another post which clearly identifies the
problem and give a hint how to solve it:
http://groups.google.de/group/microsoft.public.sqlserver.server/browse_frm/thread/e97a7097d5e766ff/db5b5409616cfed4?q=%22Drop+Table%22+%22exists+in+sysobjects%22&rnum=3&hl=de#db5b5409616cfed4
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Peter Hyssett" <PeterHyssett@.discussions.microsoft.com> schrieb im
Newsbeitrag news:732EDDE9-15C5-42D4-9A81-F4A80E951320@.microsoft.com...
> An overnight run failed, and I now regularly get the message:
> Could not find row in sysindexes for database ID nn, object ID nnnnnnnnnn,
> index ID -1. Run DBCC CHECKTABLE on sysindexes.
> It appears that a DROP TABLE failed - the table does not show up in
> Enterprise Manager, but a row for the table appears in sysobjects. DBCC
> CHECKTABLE did not help.
> How can I safely get out of this? Presumably it is not safe to delete the
> row from sysobjects?
> In future, would it help to put the DROP TABLE instruction within a
> transaction?
> Thanks.
> --
> Peter Hyssett

Sunday, March 11, 2012

Drop failed for table

Hi,
Here is what I have done:
1. I created two tables using:
CREATE TABLE CursorTest
(
RowID INT,
RowText CHAR(4)
)
GO
CREATE TABLE CursorTestOdd
(
RowID INT,
RowText CHAR(4)
)
GO

I then populate the tables using:
SET NOCOUNT ON
DECLARE @.intCounter INT
DECLARE @.chrTextOdd CHAR(4)
DECLARE @.chrTextEven CHAR(4)
SELECT @.intCounter = 1
SELECT @.chrTextOdd = 'Odd'
SELECT @.chrTextEven = 'Even'
WHILE (@.intCounter <= 200000)
BEGIN
IF (@.intCounter % 2) = 0
BEGIN
INSERT INTO CursorTest VALUES (@.intCounter,
@.chrTextEven)
END ELSE
BEGIN
INSERT INTO CursorTest VALUES (@.intCounter,
@.chrTextOdd)
END
SELECT @.intCounter = @.intCounter + 1
END
GO

3. I then tried to use cursor to insert and delete rows from the tables
DECLARE @.intRowID INT
DECLARE curOddRows CURSOR FOR
SELECT RowID
FROM CursorTest
WHERE RowID % 2 = 1
OPEN curOddRows
FETCH NEXT FROM curOddRows INTO @.intRowID
WHILE (@.@.FETCH_STATUS <> -1)
BEGIN
BEGIN TRANSACTION
INSERT INTO CursorTestOdd
SELECT *
FROM CursorTest
WHERE RowID = @.intRowID
DELETE CursorTest
WHERE RowID = @.intRowID
COMMIT
FETCH NEXT FROM curOddRows INTO @.intRowID
END
CLOSE curOddRows
DEALLOCATE curOddRows
GO

Here comes the mess:
I have no problem with codes in step 1&2,but when I tried to execute the codes in step3, I got no error, however, when I checked the two tables, nothing has been changed which means that my insert and delete are not working on the two tables. SO I tried to debug the script and found out that the code:
WHERE RowID % 2 = 1
is not working correctly, it seems that the code returns nothing, if I changed it to
WHERE RowID % 2 = 0
it returns the correct answer.
I then tried to execute the modified codes in step3, I got a message saying that
"A cursor with the name 'curOddRows' already exists."
If I changed the name to 'curOddRows1' and execute, it will say:
"The cursor is already open."
But I execute the code again whatever, and it takes a long time for it to finish such that I cannot wait. So I clicked the 'stop' button to cancel the execution.
Now I want to drop the tables and got following error:

**************************
TITLE: Microsoft SQL Server Management Studio
----------

Drop failed for Table 'dbo.CursorTest'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.Exceptio nTemplates.FailedOperationExceptionText&EvtID=Drop+Table&LinkId=20476

----------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

----------

Lock request time out period exceeded. (Microsoft SQL Server, Error: 1222)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=1222&LinkId=20476

----------
BUTTONS:

OK
----------

===================================

Drop failed for Table 'dbo.CursorTest'. (Microsoft.SqlServer.Smo)

----------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.Exceptio nTemplates.FailedOperationExceptionText&EvtID=Drop+Table&LinkId=20476

----------
Program Location:

at Microsoft.SqlServer.Management.Smo.SqlSmoObject.Dr opImpl()
at Microsoft.SqlServer.Management.Smo.Table.Drop()
at Microsoft.SqlServer.Management.SqlManagerUI.DropOb jects.DoDropObject(Int32 objectRowIndex)
at Microsoft.SqlServer.Management.SqlManagerUI.DropOb jects.DropAllObjects(Boolean stopOnError)

===================================

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

----------
Program Location:

at Microsoft.SqlServer.Management.Common.ServerConnec tion.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
at Microsoft.SqlServer.Management.Common.ServerConnec tion.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
at Microsoft.SqlServer.Management.Smo.ExecutionManage r.ExecuteNonQuery(StringCollection queries)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.Ex ecuteNonQuery(StringCollection queries, Boolean includeDbContext)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.Dr opImplWorker(Urn& urn)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.Dr opImpl()

===================================

Lock request time out period exceeded. (.Net SqlClient Data Provider)

----------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=1222&LinkId=20476

----------
Server Name:
Error Number: 1222
Severity: 16
State: 56
Line Number: 2

----------
Program Location:

at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQuer yTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SqlServer.Management.Common.ServerConnec tion.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)

**************************

So how can I drop the table, right now I can not even
view the tables' contents, cannot use 'SELECT' etc.. commands, whenever I tried to access the two tables, the program will be keeping doing the execution without stop.

Your comments and suggestions are greatly appreciated!

Thanks,Are you running this from the same query session window or is the one you ran this in still open?

The clue I see is the message "A cursor with the name 'curOddRows' already exists." which means, because you've stopt the processing the script never comes to deallocating the cursor. When you try to drop the table the cursor still exists and is consequently locking the table (schema lock probably) so it can't be dropped. Close the query window or try to deallocate the cursor.

It's good practice to declare a cursor as LOCAL (you're now implicetly making a global cursor) that way when a cursor ends the cursor is deallocated when the query batch ends. Doing this won't fix this problem when you keep the query window open!

Lex|||Hi Lexiflex:
Thanks for your response. I think it's the blocking problem. Because my cursor runs over the 200K rows, it takes a lot of time to finish it, I did not wait for it to finish and stopped it. As you said, I haven't deallocate the cursor which locked the table and failed my drop action.
You mentioned query batch, what is a query batch?
I used 'GO' to separate query statements, does the statements between 'GO' is a batch?
What is the difference for statements in different query windows?
Can you give me some simple explaination?

Thanks,|||You have to distinguish between query batches and sessions. A query batch is, as you guessed, comprised of the statements between two GO's (simply put). A session is opened when you make a connection and is closed when the connection is broken (like opening and closing a query window in Query Analyzer). A session can consist of multiple query batches.

In the case of a cursor, a local cursor exists as long as the query batch and a global cursor as long as the session. Unless you deallocate it explicitedly ofcourse.

Look at this example:
-- This is just a dummy global cursor
DECLARE global_csr CURSOR
FOR SELECT 1

-- The next statement returns -1 which means the cursor is allocated
-- We're still in the query batch
SELECT CURSOR_STATUS('global', 'global_csr')
GO

-- The query batch has ended but the cursor still exists because
-- the next statement returns -1
SELECT CURSOR_STATUS('global', 'global_csr')

-- Now we deallocate the global cursor and the status returns -3
DEALLOCATE global_csr
SELECT CURSOR_STATUS('global', 'global_csr')
GO

-- This is just a dummy local cursor
DECLARE local_csr CURSOR LOCAL
FOR SELECT 1

-- The next statement returns -1 which means the cursor is allocated
SELECT CURSOR_STATUS('local', 'local_csr')
GO

-- The next statement returns -3 which means the cursor is deallocated
-- with the end of the query batch
SELECT CURSOR_STATUS('local', 'local_csr')
GO
Ofcourse this is just the tip of the iceberg. For example a stored procedure acts as a query batch. When you declare variables they live as long as your query batch but temporary tables (#-tables) live as long as your session.

When you want to know more exact details please look in the BOL of any other SQL reference book.

Hope I was of help.

Lex|||Hi Lexiflex:
Thanks a lot for your inputs. They are very clear and helpful for me to understand batch and session. I really appreciate your time and efforts.

Thanks!|||if u r updating/inserting or deleteing from the table , from which u created the cursor , u should create a static cursor.

Friday, March 9, 2012

Drop Database failed as already in use - how do I close existing connections as per Management S

I have some code to delete a database. This allows a user to enum the databases and select one to delete. It the determines the filename, so it can remove the physical files, drops the database and deletes the files. However, it frequently fails saying the database is currently in use....

I noticed the same bahaviour when deleting a database via Management Studio, however checking the box to close active connections does the trick and the db is successfully deleted.

Question: how do I close the active connection in smo ?

Thanks, Nick

Hi,

http://www.sqlserver2005.de/sqlserver2005/MyBlog/tabid/56/EntryID/9/Default.aspx

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||Thanks Jens this is really helpful

Drop Database failed as already in use - how do I close existing connections as per Manageme

I have some code to delete a database. This allows a user to enum the databases and select one to delete. It the determines the filename, so it can remove the physical files, drops the database and deletes the files. However, it frequently fails saying the database is currently in use....

I noticed the same bahaviour when deleting a database via Management Studio, however checking the box to close active connections does the trick and the db is successfully deleted.

Question: how do I close the active connection in smo ?

Thanks, Nick

Hi,

http://www.sqlserver2005.de/sqlserver2005/MyBlog/tabid/56/EntryID/9/Default.aspx

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||Thanks Jens this is really helpful

Drop Database failed as already in use - how do I close existing connections as per Manageme

I have some code to delete a database. This allows a user to enum the databases and select one to delete. It the determines the filename, so it can remove the physical files, drops the database and deletes the files. However, it frequently fails saying the database is currently in use....

I noticed the same bahaviour when deleting a database via Management Studio, however checking the box to close active connections does the trick and the db is successfully deleted.

Question: how do I close the active connection in smo ?

Thanks, Nick

Hi,

http://www.sqlserver2005.de/sqlserver2005/MyBlog/tabid/56/EntryID/9/Default.aspx

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||Thanks Jens this is really helpful

Sunday, February 26, 2012

Driver''s SQLSetConnectAttr failed from script component

Hi

I am currently trying to get a script component to write data into a openedge database.

I am stumped by the below message.

Validation error. Bulk Load ProjPeriod Bplan: Script Component [9378]: System.Data.Odbc.OdbcException:

ERROR [HYC00] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Optional feature not implemented. ERROR [HY000] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Server rejects connection on attach.

ERROR [IM006] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Driver's SQLSetConnectAttr failed. ERROR [HYC00] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Optional feature not implemented. ERROR [HY000] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Server rejects connection on attach.

ERROR [IM006] [DataDirect][ODBC Progress OpenEdge Wire Protocol driver]Driver's SQLSetConnectAttr failed. at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.AcquireConnections(Object transaction) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostAcquireConnections(IDTSManagedComponentWrapper90 wrapper, Object transaction) Package.dtsx 0 0

The two areas’ that I have found that might be causing this is transaction and codepage, however I have tried setting these appropriately with no success.

Any help would be much appreciated.

Cheers,

Ken C

Does the connection work correctly if you use the connection manager from a DataReader source?

|||

Hi jwelch

As far as I can tell, using this connection from connection manager with Datareader does work.

I created the connection and used in a datareader and it displayed the field names from the supplied sql.

Cheers,

Ken

|||

Hi Again

A bit wierd.... I changed the Fetch Array Size, in the odbc connection to 0 .....this seemed to remove the error from ssis. (This seemed to work for somone else connecting to Oracle db)

Since then i have put the value back to 50 and the error messege has not returned ?

Will develop futher and post back

Cheers

driver's sqlallochandle on sql_handle_env failed

i have just installed sql clinet
(Microsoft SQL Enterprise Manager Microsoft Corporation Version: 8.0)
on windows XP sp2 . whenever i try to reg new sql servers through Enterprise
Mgr it gives me this error . it looks like its associated with ODBC . need to
figure out whats the problem
Thanks & Regards
Sid
Try applying SQL Server 2000 SP4 + Cumulative Hotfix Build 2187.
http://www.microsoft.com/downloads/details.aspx?FamilyID=8e2dfc8d-c20e-4446-99a9-b7f0213f8bc5&DisplayLang=en
http://www.microsoft.com/downloads/details.aspx?FamilyID=9c9ab140-bdee-44df-b7a3-e6849297754a&displaylang=en
http://www.microsoft.com/downloads/details.aspx?FamilyID=1705bd2f-1fb8-4ec8-b3db-0935361308c7&displaylang=en
http://www.microsoft.com/downloads/details.aspx?familyid=A643980A-26A4-44C1-9B50-53E20E7210B5&displaylang=en
http://www.microsoft.com/downloads/details.aspx?FamilyId=243A8A89-74D6-48FD-933F-32FF9D8459C2&displaylang=en
http://www.microsoft.com/downloads/details.aspx?FamilyId=2BB62F35-D041-42AC-98DA-6EC97168BE21&displaylang=en
Sincerely,
Anthony Thomas

"moharil" <sid_m15@.yahoo.com> wrote in message
news:DCFB87D2-813A-4707-8D8B-9EDB6E781058@.microsoft.com...
> i have just installed sql clinet
> (Microsoft SQL Enterprise Manager Microsoft Corporation Version: 8.0)
> on windows XP sp2 . whenever i try to reg new sql servers through
Enterprise
> Mgr it gives me this error . it looks like its associated with ODBC . need
to
> figure out whats the problem
> --
> Thanks & Regards
> Sid

Driver's SQLAllocHandle on SQL_HANDLE_DBC failed error

I am seeing a few of the below listed error message on our application
servers that are connecting to our SQL 2005 servers. What do they mean and
how can I resolve them ?
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_DBC
failed
Hi
You can call SQLGetDiagRec with a HandleType of SQL_HANDLE_DBC and a Handle
of you ConnectionHandle to get more information about the error. See
http://msdn2.microsoft.com/en-us/library/ms711810.aspx
John
"Hassan" wrote:

> I am seeing a few of the below listed error message on our application
> servers that are connecting to our SQL 2005 servers. What do they mean and
> how can I resolve them ?
> [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_DBC
> failed
>
>
>

Driver's SQLAllocHandle on SQL_HANDLE_DBC failed error

I am seeing a few of the below listed error message on our application
servers that are connecting to our SQL 2005 servers. What do they mean and
how can I resolve them ?
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HAND
LE_DBC
failedHi
You can call SQLGetDiagRec with a HandleType of SQL_HANDLE_DBC and a Handle
of you ConnectionHandle to get more information about the error. See
http://msdn2.microsoft.com/en-us/library/ms711810.aspx
John
"Hassan" wrote:

> I am seeing a few of the below listed error message on our application
> servers that are connecting to our SQL 2005 servers. What do they mean and
> how can I resolve them ?
> [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HA
NDLE_DBC
> failed
>
>
>

Driver's SQLAllocHandle on SQL_HANDLE_DBC failed error

I am seeing a few of the below listed error message on our application
servers that are connecting to our SQL 2005 servers. What do they mean and
how can I resolve them ?
[Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_DBC
failedHi
You can call SQLGetDiagRec with a HandleType of SQL_HANDLE_DBC and a Handle
of you ConnectionHandle to get more information about the error. See
http://msdn2.microsoft.com/en-us/library/ms711810.aspx
John
"Hassan" wrote:
> I am seeing a few of the below listed error message on our application
> servers that are connecting to our SQL 2005 servers. What do they mean and
> how can I resolve them ?
> [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_DBC
> failed
>
>
>

Friday, February 24, 2012

Drive Failure

I had a drive failure last night. Sql Server was loaded on the drive that
failed (which also contained the OS). Fortunately, the log files were on
another drive and the databases on another and both of these drives are OK.
Does anyone know the correct procedure after reloading the OS and Sql Server
2000 on the new drive, for reattaching the databases to this new instance of
Sql Server.
Thanks for any help.
--
BrianTry to attach the databases again,a dn then check the status of the
database. If its working you gotta be ok, if not you might try to check the
DBCC command to fixed the errors. don´t know how long i will stay on the
wire this evening (yes, i am in europe ;-) ), but i thin if there is an
error all other guys here are able to help you.
If that all doens´t work, i hope for you you gotta working backup :)
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Brian" <Brian@.discussions.microsoft.com> schrieb im Newsbeitrag
news:14C9F68D-E6D1-412D-81A9-8EDFFA42C4B6@.microsoft.com...
>I had a drive failure last night. Sql Server was loaded on the drive that
> failed (which also contained the OS). Fortunately, the log files were on
> another drive and the databases on another and both of these drives are
> OK.
> Does anyone know the correct procedure after reloading the OS and Sql
> Server
> 2000 on the new drive, for reattaching the databases to this new instance
> of
> Sql Server.
> Thanks for any help.
> --
> Brian|||Hi,
Other methodology:- This work good for me once.
Easy way to recover the database after OS crash is,
1. After OS installation, Copy all .MDF and .LDF files to a new folder
(safe location)
2. Install SQL server and same Service packs (as old) in the identical
folder (Same as old installation)
3. Stop the SQL server
4. Copy the .MDF and .LDF files (took in step 1) to the same folders (Same
as old installation).
5. Start SQL server
Now login to query analyzer or enterprise manager and confirm all the
databases are online.
If any of the database is in suspect status, then check the cause for the
error in SQL server Error log. If it is critical you may
need to restore the database from Backup
Thanks
Hari
SQL Server MVP
"Brian" <Brian@.discussions.microsoft.com> wrote in message
news:14C9F68D-E6D1-412D-81A9-8EDFFA42C4B6@.microsoft.com...
>I had a drive failure last night. Sql Server was loaded on the drive that
> failed (which also contained the OS). Fortunately, the log files were on
> another drive and the databases on another and both of these drives are
> OK.
> Does anyone know the correct procedure after reloading the OS and Sql
> Server
> 2000 on the new drive, for reattaching the databases to this new instance
> of
> Sql Server.
> Thanks for any help.
> --
> Brian

Tuesday, February 14, 2012

drill through timeout

In Analysis Manager I have received the message:
Unable to drill through
The operation requested failed due to timeout
This happens when the query takes 30 secons or more to return the result set.
How can I resolve this issue ?
(Analysis Services 8.0 SP2)SP3 for AS fixes quite a few problems, I would reccomend applying sp3 before you try anything else.

HTH|||Originally posted by rhigdon
SP3 for AS fixes quite a few problems, I would reccomend applying sp3 before you try anything else.

HTH
Hi, thans a lot !!! I have tried applying SP3a but the timeout problem were not corrected.
Any other suggestions ?