Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Friday, March 30, 2012

How can i connect to sql sever 2005 express from the command prompt.

Iam trying to connect to local copy of sql sever express from the command prompt with this command(sqlcmd) but i get the error below. What should i do to overcome the error. Basically what i want to do is to try out some commandline backup utilities and i deadly want to know how to do a backup from the command prompt. Help is greatly appreciated.

HResult 0x2, level 16, state 1

Named pipes provider: could not open a connection to sql sever [2]

sqlcmd: Error: Microsft sql native client: An error has occurred while estarblishing a connection to the sever. When connecting to sql sever 2005, this failure may be caused by the fact that under the default settings SQL sever does not allow remote connections..

Sqlcmd: Error: Microsoft sql native client: Login time out expired.

Assuming you have the server name correct I would check in the control panel --> administrative tools --> Services and make sure that sql express is running|||I got it right. Looks like it was a typing mistake. But i have one question here, backingup a database from the command prompt to me looks tiresome. What is likely to go wrong if i just copied my projects folder from the production sever to a nother machine where i want the backup to be insteady of going through all these good but confusing steps. I i just copied the folder to a nother location or computer, are the end results not the same with if i had follwed all these database backup procedures. Dont laugh at me, iam still new to this stuff.|||

Hi,

This might be caused since SQL Server 2005 does not allow remote connection under default configuration. Please enable this according to the following KB article.

http://support.microsoft.com/kb/914277/en-us

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!

How can i configure sql server2000 with vb.net2003

Hi

I got an exe file of an application with program debug database.

Once i am running that program it is giving an error.

Can anyone suggest me how to configure SQL server2000 database with this application.

I have installed client tool of SQL server2000 on my system.

I am very new in MS platform.

................................................................................................................................

The error is like this

it is showing this error

System.Data.Sql.Client.qlException: SQL server does not exist or access denied.
at DataAccess.DataAccess.ExecuteInsertUpdateDeleteQuery(String prsConnString, String StoredProcName,sqlParameter[]parameterLost)

Thanks

I'm not exactly sure what it is you're trying to do, but if you want to set up replication using Enterprise Manager (are these the tools you're referring to?) then you should start by reading Replication topic in Books Online.sql

Wednesday, March 28, 2012

How can I check if table already exists in a DB?

How can I check if table already exists in a DB?
Today I just create my table at startup, if it exist I get a error telling
me that the table already exist, ignoring the error message.
But this is a dirty way of doing it. Any other idea.
It must be quick and clean.Hi !
quote:

> How can I check if table already exists in a DB?

If you generate sql script for table and check "generate drop object" on ,
you will see in generated scipt something like this :
if exists (select * from dbo.sysobjects where id = object_id(N'[accounts]')
and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [accounts]
where 'accounts' is my tablename.
You can use this approach or , using odbc API , try to get table metadata,
i'm sure it should be way to get it, just never tried it.
Regards,Alexander|||use SQLTables function
"GTi" <nospam@.online.com> wrote in message
news:PUsQb.1148$O41.64225@.amstwist00...
quote:

> How can I check if table already exists in a DB?
> Today I just create my table at startup, if it exist I get a error telling
> me that the table already exist, ignoring the error message.
> But this is a dirty way of doing it. Any other idea.
> It must be quick and clean.
>
|||Or try this:
USE [YourDB]
IF EXISTS (
SELECT name
FROM sysobjects
WHERE type = 'u' AND
name = N'YourTable' -- Remove N if not using unicode
)
BEGIN
-- Do action
END
Regards,
Johan
"Furer Alexander" <alex_f@.sentry-com.co.il> wrote in message
news:OLebgPN6DHA.1636@.TK2MSFTNGP12.phx.gbl...
use SQLTables function
"GTi" <nospam@.online.com> wrote in message
news:PUsQb.1148$O41.64225@.amstwist00...
quote:

> How can I check if table already exists in a DB?
> Today I just create my table at startup, if it exist I get a error telling
> me that the table already exist, ignoring the error message.
> But this is a dirty way of doing it. Any other idea.
> It must be quick and clean.
|||Thanks to you all...
"GTi" <nospam@.online.com> wrote in message
news:PUsQb.1148$O41.64225@.amstwist00...
quote:

> How can I check if table already exists in a DB?
> Today I just create my table at startup, if it exist I get a error telling
> me that the table already exist, ignoring the error message.
> But this is a dirty way of doing it. Any other idea.
> It must be quick and clean.
>
|||IF OBJECTPROPERTY ( object_id('authors'),'ISTABLE') = 1
print 'Authors is a table'
"GTi" <nospam@.online.com> wrote in message
news:PUsQb.1148$O41.64225@.amstwist00...
quote:

> How can I check if table already exists in a DB?
> Today I just create my table at startup, if it exist I get a error telling
> me that the table already exist, ignoring the error message.
> But this is a dirty way of doing it. Any other idea.
> It must be quick and clean.
>

Monday, March 26, 2012

How can I change the CommandTimeout value?

When I try to execute a query and after 30 seconds the program sends me error :

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Exception Detail: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Source error:

Line 550 Dim myDataSet as Dataset = New DataSet

Line 551 myDataSet = db.ExecuteDataSet(System.Data.CommanType.Text,NewSql) <== Error line

Line 552 i=myDataSet.Tables(0).Rows.Count

In my connection string I set the parameter "Connection Timeout" = 360 but it not works. ( In debug mode the value for db.GetConnection.ConnectionTimeout is the same(360) like the parameter timeout connection.

After many searchs I found the default value for CommandTimeout is 30 secs. Can I change this value ?

Any suggestion will be welcome.

I'm using FrameWork 1.1.

create a SqlCommand object and set the CommandTimeout on that.

Hope it helps

|||

Klaus,

Do you have an example or reference in order to get the code?

Thanks in advance,

Juan Carlos

|||

YesOk. I found the example and the solution for my case is :

Dim myDataSet as Dataset = New DataSet

Dim cmd as DbCommandWrapper = db.GetSqlStringCommandWrapper(NewSql)

cmd.CommandTimeout = 180 (seconds) ==> 0 (zero) in order to wait for ever.

myDataSet = db.ExecuteDataSet(cmdl)

i=myDataSet.Tables(0).Rows.Count

If you want to review more of thishttp://msdn.microsoft.com/msdnmag/issues/05/08/DataPoints/

Klaus, I appreciate a lot your help.

Thanks

sql

How can I catch all errors of the stored at the same time?

I have a stored prcedure . In the stored I wrote 3 SQL statements, one is OK but 2 other statements have error as:

1. Invalid column name 'F2'

2. Invalid object name '##_152008049'.

I put the stored inside try block and catch error in catch block as the following. But I always catch only the first error : invalid column name F2 . How about the second statement?

How can I catch all the errors when I put the stored in try block. Now I don't want to add try..catch inside the store for each statement.

Begin try

exec mystored

End try

begin catch

ERROR_NUMBER() AS ErrorNumber,

ERROR_SEVERITY() AS ErrorSeverity,

ERROR_STATE() as ErrorState,

ERROR_PROCEDURE() as ErrorProcedure,

ERROR_LINE() as ErrorLine,

ERROR_MESSAGE() as ErrorMessage,

end catch

You are only getting the first one, because when you encounter the first error, it will fall through to the catch block. Any statements after the error don't even get executed.|||Not all errors are of the same kind, there is a difference between statement abort and batch abort errors. But as the previous poster already said, there is no way to return to the next statement after the catch block was handled.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Friday, March 23, 2012

How can I avoid that the OLEDB Provider intercepts the error?

I have an stored procedure which is called by using ADO and OLEDB. I wish that when an error occurs (such as when a contraint is violated or trying to insert NULL in a not-null column) the error message is stored on an output parameter and returned to the client, without the error being raised by the OLEDB Provider.

How can I do that?

Thanks a lot in advance.For it is a lot of ways... true way and another ones...
Check inserted(input) data before ... insert update delete through sp... Using "INSTEAD OF
" triggers for checking yours data... client side errors handling ... ADO have got Errors collection...

http://msdn.microsoft.com/
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_errorformats_0tpv.asp

MSDN
Handling Errors in Visual C++
In COM, most operations return an HRESULT return code that indicates whether a function completed successfully. The #import directive generates wrapper code around each "raw" method or property and checks the returned HRESULT. If the HRESULT indicates failure, the wrapper code throws a COM error by calling _com_issue_errorex() with the HRESULT return code as an argument. COM error objects can be caught in a try-catch block. (For efficiency's sake, catch a reference to a _com_error object.)
Remember, these are ADO errors: they result from the ADO operation failing. Errors returned by the underlying provider appear as Error objects in the Connection object's Errors collection.
The #import directive only creates error-handling routines for methods and properties declared in the ADO .dll. However, you can take advantage of this same error-handling mechanism by writing your own error-checking macro or inline function. See the topic Visual C++ Extensions for examples.

MSDN
How Does ADO Report Errors?
ADO notifies you about errors in several ways:
ADO errors generate a run-time error. Handle an ADO error the same way you would any other run-time error, such as using an On Error statement in Visual Basic.
Your program can receive errors from OLE DB. An OLE DB error generates a run-time error as well.
If the error is specific to your data provider, one or more Error objects are placed in the Errors collection of the Connection object that was used to access the data store when the error occurred.
If the process that raised an event also produced an error, error information is placed in an Error object and passed as a parameter to the event. See Chapter 7: Handling ADO Events <pg_ado_eventhandling.htm> for more information about events.
Problems that occur when processing batch updates or other bulk operations involving a Recordset can be indicated by the Status property of the Recordset. For example, schema constraint violations or insufficient permissions can be specified by RecordStatusEnum values.
Problems that occur involving a particular Field in the current record are also indicated by the Status property of each Field in the Fields collection of the Record or Recordset. For example, updates that could not be completed or incompatible data types can be specified by FieldStatusEnum values.

Monday, March 19, 2012

How can connect SSAS w/o domain trusted connection?

I got error: An existing connection was forcibly closed by the remote host!!

string connstr = "Provider=MSOLAP.3;Data Source=amsserver;Password=;User ID=administrator;Initial Catalog=MIP2ASProject";

Client in XP, with AS9.0 provider installed, server is sqlserver 2005 in win2003 xp1.

Both machines are not under domain controller...

Moving to SQL Server Analysis Services forum.|||

Analysis Services does not support non-Windows authentication when connecting through TCP/IP.

You should be able to setup HTTP connectivity to SSAS.
See following:
http://www.microsoft.com/technet/prodtechnol/sql/2005/httpasws.mspx

And then use different type of authentication avaliable in IIS to connect to Analysis Server.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.


How can a SP to handle a "TempDB Full" error ?

I always need to create a temporary table and insert a large amount of
records into it within a stored procedure, my problem is : even I have
already set the growth rate of the TempDB to 100%, but once all the free
TempDB disk space is used up, the stored procedure will fail and terminated
no matter how much free hard disk space outside the TempDB is.
Could anybody tell me is it possible to handle this error within a stored
procedure ?
For example, will the SP generate an error code for such a suitation ? Or
can I add some commands with a SP so that the SP can increase or shrink the
TempDB dynamically ?stuff I can recommend:
1. find out what has caused the tempdb to grow so much? uncommitted
transactions during a long period of time? try to reduce the transaction
size.
2. Alter the tempdb to larger size so that when it gets recreated upon
server restart, it doesn't have to grow as much.
3. don't set autogrowth by 100%. That may take too long to expand and cause
procs to time out.
4. Set up an alert on tempdb size exceeding a threshold. Run dbcc
shrinkdatabase or dbcc shrinkfile to reduce tempdb.
richard
"cpchan" <cpchaney@.netvigator.com> wrote in message
news:c60sfj$ns41@.imsp212.netvigator.com...
> I always need to create a temporary table and insert a large amount of
> records into it within a stored procedure, my problem is : even I have
> already set the growth rate of the TempDB to 100%, but once all the free
> TempDB disk space is used up, the stored procedure will fail and
terminated
> no matter how much free hard disk space outside the TempDB is.
> Could anybody tell me is it possible to handle this error within a stored
> procedure ?
> For example, will the SP generate an error code for such a suitation ? Or
> can I add some commands with a SP so that the SP can increase or shrink
the
> TempDB dynamically ?
>
>

How can a SP to handle a "TempDB Full" error ?

I always need to create a temporary table and insert a large amount of
records into it within a stored procedure, my problem is : even I have
already set the growth rate of the TempDB to 100%, but once all the free
TempDB disk space is used up, the stored procedure will fail and terminated
no matter how much free hard disk space outside the TempDB is.
Could anybody tell me is it possible to handle this error within a stored
procedure ?
For example, will the SP generate an error code for such a suitation ? Or
can I add some commands with a SP so that the SP can increase or shrink the
TempDB dynamically ?
stuff I can recommend:
1. find out what has caused the tempdb to grow so much? uncommitted
transactions during a long period of time? try to reduce the transaction
size.
2. Alter the tempdb to larger size so that when it gets recreated upon
server restart, it doesn't have to grow as much.
3. don't set autogrowth by 100%. That may take too long to expand and cause
procs to time out.
4. Set up an alert on tempdb size exceeding a threshold. Run dbcc
shrinkdatabase or dbcc shrinkfile to reduce tempdb.
richard
"cpchan" <cpchaney@.netvigator.com> wrote in message
news:c60sfj$ns41@.imsp212.netvigator.com...
> I always need to create a temporary table and insert a large amount of
> records into it within a stored procedure, my problem is : even I have
> already set the growth rate of the TempDB to 100%, but once all the free
> TempDB disk space is used up, the stored procedure will fail and
terminated
> no matter how much free hard disk space outside the TempDB is.
> Could anybody tell me is it possible to handle this error within a stored
> procedure ?
> For example, will the SP generate an error code for such a suitation ? Or
> can I add some commands with a SP so that the SP can increase or shrink
the
> TempDB dynamically ?
>
>

How can a SP to handle a "TempDB Full" error ?

I always need to create a temporary table and insert a large amount of
records into it within a stored procedure, my problem is : even I have
already set the growth rate of the TempDB to 100%, but once all the free
TempDB disk space is used up, the stored procedure will fail and terminated
no matter how much free hard disk space outside the TempDB is.
Could anybody tell me is it possible to handle this error within a stored
procedure ?
For example, will the SP generate an error code for such a suitation ? Or
can I add some commands with a SP so that the SP can increase or shrink the
TempDB dynamically ?stuff I can recommend:
1. find out what has caused the tempdb to grow so much? uncommitted
transactions during a long period of time? try to reduce the transaction
size.
2. Alter the tempdb to larger size so that when it gets recreated upon
server restart, it doesn't have to grow as much.
3. don't set autogrowth by 100%. That may take too long to expand and cause
procs to time out.
4. Set up an alert on tempdb size exceeding a threshold. Run dbcc
shrinkdatabase or dbcc shrinkfile to reduce tempdb.
richard
"cpchan" <cpchaney@.netvigator.com> wrote in message
news:c60sfj$ns41@.imsp212.netvigator.com...
> I always need to create a temporary table and insert a large amount of
> records into it within a stored procedure, my problem is : even I have
> already set the growth rate of the TempDB to 100%, but once all the free
> TempDB disk space is used up, the stored procedure will fail and
terminated
> no matter how much free hard disk space outside the TempDB is.
> Could anybody tell me is it possible to handle this error within a stored
> procedure ?
> For example, will the SP generate an error code for such a suitation ? Or
> can I add some commands with a SP so that the SP can increase or shrink
the
> TempDB dynamically ?
>
>

Monday, March 12, 2012

how best to replace a corrupt user table

Hello,
I must have a corrupt user table in my user database. If I try to get
a count of rows, I get the following error:
Could not open FCB for invalid file ID 18 in database
And if I run "DBCC CHECKTABLE ('myTable')" in QA, I get this message:
Server: Msg 7965, Level 16, State 2, Line 1
Table error: Could not check object ID 220579874, index ID 0 due to
invalid allocation (IAM) page(s).
Server: Msg 8946, Level 16, State 1, Line 1
Table error: Allocation page (1:23417559) has invalid IAM_PAGE page
header values. Type is 1. Check type, object ID and page ID on the
page.
DBCC results for 'myTable'.
There are 0 rows in 0 pages for object 'myTable'.
CHECKTABLE found 0 allocation errors and 2 consistency errors in table
'myTable'(object ID 220579874).
repair_allow_data_loss is the minimum repair level for the errors
found by DBCC CHECKTABLE (myDatabase.dbo.myTable).
A little background: we recently went through a server crash and lost
our transaction log, but we were able to rebuild the transaction log
and get the database back online. Also, the data files for this
database are over 420 GB in size. This is all SQL2000.
In the case of "myTable," it's only the table that's important, not
the data. So assuming I can recreate the table correctly, what is the
proper way to go about fixing this problem? I haven't tried dropping
myTable yet because this is a new situation for me and I don't want to
mess up.
Thanks as always,
EricIf I read it correctly you don't worry about the lost data. Instead you want
the table schema back?
do you have a source control where you can retrieve SQL scripts? if not, do
you have last known good backup to restore and get the schema retrieved?
"Eric Bragas" <ericbragas@.yahoo.com> wrote in message
news:4bf75b52-f331-4712-b80b-219798cee653@.m34g2000hsf.googlegroups.com...
> Hello,
> I must have a corrupt user table in my user database. If I try to get
> a count of rows, I get the following error:
> Could not open FCB for invalid file ID 18 in database
> And if I run "DBCC CHECKTABLE ('myTable')" in QA, I get this message:
> Server: Msg 7965, Level 16, State 2, Line 1
> Table error: Could not check object ID 220579874, index ID 0 due to
> invalid allocation (IAM) page(s).
> Server: Msg 8946, Level 16, State 1, Line 1
> Table error: Allocation page (1:23417559) has invalid IAM_PAGE page
> header values. Type is 1. Check type, object ID and page ID on the
> page.
> DBCC results for 'myTable'.
> There are 0 rows in 0 pages for object 'myTable'.
> CHECKTABLE found 0 allocation errors and 2 consistency errors in table
> 'myTable'(object ID 220579874).
> repair_allow_data_loss is the minimum repair level for the errors
> found by DBCC CHECKTABLE (myDatabase.dbo.myTable).
> A little background: we recently went through a server crash and lost
> our transaction log, but we were able to rebuild the transaction log
> and get the database back online. Also, the data files for this
> database are over 420 GB in size. This is all SQL2000.
> In the case of "myTable," it's only the table that's important, not
> the data. So assuming I can recreate the table correctly, what is the
> proper way to go about fixing this problem? I haven't tried dropping
> myTable yet because this is a new situation for me and I don't want to
> mess up.
> Thanks as always,
> Eric|||Hi, Rick, and thanks. That's correct, I only need the table schema
back. No, there is no source control here on staging servers. Yes, I
have a backup, but I would need a new server just to restore a
database of that size. We simply don't have the space available.
Can you tell me (in theory and/or in actuality) what is the best way
to resolve this situation without a backup or source control? I don't
want to adjust all my scripts, etc. that use this table by switching
them to point to another table. I want to fix this correctly, but
don't know what is correct.|||How about renaming the table and then creating a new one with the old name?
"Eric Bragas" <ericbragas@.yahoo.com> wrote in message
news:4bf75b52-f331-4712-b80b-219798cee653@.m34g2000hsf.googlegroups.com...
> Hello,
> I must have a corrupt user table in my user database. If I try to get
> a count of rows, I get the following error:
> Could not open FCB for invalid file ID 18 in database
> And if I run "DBCC CHECKTABLE ('myTable')" in QA, I get this message:
> Server: Msg 7965, Level 16, State 2, Line 1
> Table error: Could not check object ID 220579874, index ID 0 due to
> invalid allocation (IAM) page(s).
> Server: Msg 8946, Level 16, State 1, Line 1
> Table error: Allocation page (1:23417559) has invalid IAM_PAGE page
> header values. Type is 1. Check type, object ID and page ID on the
> page.
> DBCC results for 'myTable'.
> There are 0 rows in 0 pages for object 'myTable'.
> CHECKTABLE found 0 allocation errors and 2 consistency errors in table
> 'myTable'(object ID 220579874).
> repair_allow_data_loss is the minimum repair level for the errors
> found by DBCC CHECKTABLE (myDatabase.dbo.myTable).
> A little background: we recently went through a server crash and lost
> our transaction log, but we were able to rebuild the transaction log
> and get the database back online. Also, the data files for this
> database are over 420 GB in size. This is all SQL2000.
> In the case of "myTable," it's only the table that's important, not
> the data. So assuming I can recreate the table correctly, what is the
> proper way to go about fixing this problem? I haven't tried dropping
> myTable yet because this is a new situation for me and I don't want to
> mess up.
> Thanks as always,
> Eric|||Thanks, Aaron, that much worked. But now what do I do with the
"myTable_backup" table? Is there some way to drop it? If I try now,
I get the following error message:
Server: Msg 5180, Level 22, State 1, Line 1
Could not open FCB for invalid file ID 18 in database 'myDatabase'.
Connection Broken
Seems like there's still something wrong with my database that needs
to be fixed. Any ideas?|||If I were to play it safe, I would create a new database, transfer all the
*good* objects and data there, drop the old database and rename the new one.
(You might now want to consider investing in a backup/recovery plan.)
"Eric Bragas" <ericbragas@.yahoo.com> wrote in message
news:f4e3dfc4-d6d4-4e08-9de4-a0bd93856b74@.e25g2000prg.googlegroups.com...
> Thanks, Aaron, that much worked. But now what do I do with the
> "myTable_backup" table? Is there some way to drop it? If I try now,
> I get the following error message:
> Server: Msg 5180, Level 22, State 1, Line 1
> Could not open FCB for invalid file ID 18 in database 'myDatabase'.
> Connection Broken
>
> Seems like there's still something wrong with my database that needs
> to be fixed. Any ideas?|||Thanks, Aaron, I like that idea about moving the good objects to
another database. Seems like there must be a way to "fix" the
existing database, but perhaps not. I'm going to take your advice.
About the backup/recovery necessity, I have a hard time getting the
managers to recognize the possibility of a problem and dealing with it
before it happens. We have no space left on the HDD, very strange
database config's, and no written backup policy in place that I know
of, but we shove on like Stampeders. But hey, thanks for the advice!
Eric Bragas|||> About the backup/recovery necessity, I have a hard time getting the
> managers to recognize the possibility of a problem and dealing with it
> before it happens.
Do they know what you're spending your time on right now?
A

How bad is this??

After detaching a database and deleting the logfile, I use
sp_attach_single_file_db to attach the database and get the following error:
Could not open new database 'Orders'. CREATE DATABASE is aborted.
Device activation error. The physical file name 'F:\'Orders' may be
incorrect.
Is there any way to recover without the log file now?> After detaching a database and deleting the logfile
Can I ask why you would ever do this?
--
http://www.aspfaq.com/
(Reverse address to reply.)|||You have any backups of the database or database files?
"Bryan" <bryan.charlton@.api-wi.com> wrote in message
news:%23IVTepRZEHA.3016@.tk2msftngp13.phx.gbl...
> After detaching a database and deleting the logfile, I use
> sp_attach_single_file_db to attach the database and get the following
error:
> Could not open new database 'Orders'. CREATE DATABASE is aborted.
> Device activation error. The physical file name 'F:\'Orders' may be
> incorrect.
> Is there any way to recover without the log file now?
>
>
>
>
>|||Also, is your Resume up to date?
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"Joe" <JoeD777@.lycos.com> wrote in message
news:uZ7y3yRZEHA.3420@.TK2MSFTNGP12.phx.gbl...
> You have any backups of the database or database files?
>
> "Bryan" <bryan.charlton@.api-wi.com> wrote in message
> news:%23IVTepRZEHA.3016@.tk2msftngp13.phx.gbl...
> > After detaching a database and deleting the logfile, I use
> > sp_attach_single_file_db to attach the database and get the following
> error:
> >
> > Could not open new database 'Orders'. CREATE DATABASE is aborted.
> > Device activation error. The physical file name 'F:\'Orders' may be
> > incorrect.
> >
> > Is there any way to recover without the log file now?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>|||Yes, I have a backup that I can restore from. This is my only option I take
it?
"Joe" <JoeD777@.lycos.com> wrote in message
news:uZ7y3yRZEHA.3420@.TK2MSFTNGP12.phx.gbl...
> You have any backups of the database or database files?
>
> "Bryan" <bryan.charlton@.api-wi.com> wrote in message
> news:%23IVTepRZEHA.3016@.tk2msftngp13.phx.gbl...
>> After detaching a database and deleting the logfile, I use
>> sp_attach_single_file_db to attach the database and get the following
> error:
>> Could not open new database 'Orders'. CREATE DATABASE is aborted.
>> Device activation error. The physical file name 'F:\'Orders' may be
>> incorrect.
>> Is there any way to recover without the log file now?
>>
>>
>>
>>
>>
>|||I have actually done this more times than I can count when moving
development databases from server to server and have never had a problem
(until now).
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:OQl33yRZEHA.716@.TK2MSFTNGP11.phx.gbl...
>> After detaching a database and deleting the logfile
> Can I ask why you would ever do this?
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>|||> I have actually done this more times than I can count
Move the data and the log file. Or, backup and restore. What you're doing
is quite similar roulette, and you've merely been on a lucky roll until this
spin.
--
http://www.aspfaq.com/
(Reverse address to reply.)|||> Yes, I have a backup that I can restore from. This is my only option I
take
> it?
Or, you can call PSS.|||Isn't it possible that the physical file name really is incorrect, as the
error says? Are you sure it isn't 'F:\'Orders.mdf' instead of 'F:\'Orders'?
You don't need the log file to attach the DB.
-John Oakes
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:Omp91KSZEHA.1048@.tk2msftngp13.phx.gbl...
> > I have actually done this more times than I can count
> Move the data and the log file. Or, backup and restore. What you're
doing
> is quite similar roulette, and you've merely been on a lucky roll until
this
> spin.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>|||theoretically he should have been alright
Inside SQL 2000 "One benefit of using the sp_detach_db procedure is that SQL
Server will know that the database was cleanly shut down, and the log file
does not have to be available to attach the database. SQL will build a new
log file for you. This can be a quick way to shrink a log file that has
become much larger than you would like, because the new log file that
sp_attach_db creates for you will be the minimum size?less than 1 MB. Note
that this trick for shrinking the log will not work if the database has more
than one log file."
But you're right he should have been a bit more careful on a production
server. P45 time!
--
Br,
Mark Broadbent
mcdba , mcse+i
============="Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:Omp91KSZEHA.1048@.tk2msftngp13.phx.gbl...
> > I have actually done this more times than I can count
> Move the data and the log file. Or, backup and restore. What you're
doing
> is quite similar roulette, and you've merely been on a lucky roll until
this
> spin.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>|||Bryan old chap try this see if you get any joy and let me know :)
http://www.spaceprogram.com/knowledge/sqlserver_recover_from_deleted_log.html
--
Br,
Mark Broadbent
mcdba , mcse+i
============="Bryan" <bryan.charlton@.api-wi.com> wrote in message
news:%23IVTepRZEHA.3016@.tk2msftngp13.phx.gbl...
> After detaching a database and deleting the logfile, I use
> sp_attach_single_file_db to attach the database and get the following
error:
> Could not open new database 'Orders'. CREATE DATABASE is aborted.
> Device activation error. The physical file name 'F:\'Orders' may be
> incorrect.
> Is there any way to recover without the log file now?
>
>
>
>
>|||P45 time' Punt'
-- George Hester
__________________________________
"Mark Broadbent" <no-spam-please@.no-spam-please.com> wrote in message =news:etZkUVTZEHA.3304@.TK2MSFTNGP09.phx.gbl...
> theoretically he should have been alright
> Inside SQL 2000 "One benefit of using the sp_detach_db procedure is =that SQL
> Server will know that the database was cleanly shut down, and the log =file
> does not have to be available to attach the database. SQL will build a =new
> log file for you. This can be a quick way to shrink a log file that =has
> become much larger than you would like, because the new log file that
> sp_attach_db creates for you will be the minimum size-less than 1 MB. =Note
> that this trick for shrinking the log will not work if the database =has more
> than one log file."
> > But you're right he should have been a bit more careful on a =production
> server. P45 time!
> > -- > > > Br,
> Mark Broadbent
> mcdba , mcse+i
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:Omp91KSZEHA.1048@.tk2msftngp13.phx.gbl...
> > > I have actually done this more times than I can count
> >
> > Move the data and the log file. Or, backup and restore. What =you're
> doing
> > is quite similar roulette, and you've merely been on a lucky roll =until
> this
> > spin.
> >
> > -- > > http://www.aspfaq.com/
> > (Reverse address to reply.)
> >
> >
> >|||Are you sure you are providing the proper data file name?
F:\Orders ? with no extension...
If the filename or directory is inaccurate you will get the same message you
are now seeing.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Bryan" <bryan.charlton@.api-wi.com> wrote in message
news:%23IVTepRZEHA.3016@.tk2msftngp13.phx.gbl...
> After detaching a database and deleting the logfile, I use
> sp_attach_single_file_db to attach the database and get the following
error:
> Could not open new database 'Orders'. CREATE DATABASE is aborted.
> Device activation error. The physical file name 'F:\'Orders' may be
> incorrect.
> Is there any way to recover without the log file now?
>
>
>
>
>|||"P45 time" is a common UK expression meaning it is time to get a new job.
P45 is the number on the standard UK form that states your tax details that
an emploer is obliged to give you when you leave their employment!
Mike John
"George Hester" <hesterloli@.hotmail.com> wrote in message
news:uxQ2fhUZEHA.3432@.TK2MSFTNGP10.phx.gbl...
P45 time' Punt'
--
George Hester
__________________________________
"Mark Broadbent" <no-spam-please@.no-spam-please.com> wrote in message
news:etZkUVTZEHA.3304@.TK2MSFTNGP09.phx.gbl...
> theoretically he should have been alright
> Inside SQL 2000 "One benefit of using the sp_detach_db procedure is that
SQL
> Server will know that the database was cleanly shut down, and the log file
> does not have to be available to attach the database. SQL will build a new
> log file for you. This can be a quick way to shrink a log file that has
> become much larger than you would like, because the new log file that
> sp_attach_db creates for you will be the minimum size-less than 1 MB. Note
> that this trick for shrinking the log will not work if the database has
more
> than one log file."
> But you're right he should have been a bit more careful on a production
> server. P45 time!
> --
>
> Br,
> Mark Broadbent
> mcdba , mcse+i
> =============> "Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
> news:Omp91KSZEHA.1048@.tk2msftngp13.phx.gbl...
> > > I have actually done this more times than I can count
> >
> > Move the data and the log file. Or, backup and restore. What you're
> doing
> > is quite similar roulette, and you've merely been on a lucky roll until
> this
> > spin.
> >
> > --
> > http://www.aspfaq.com/
> > (Reverse address to reply.)
> >
> >
>

Friday, March 9, 2012

how assign value to cursor using sp_executesql procedure

What is error here when i declare cursor ?

declare curQueryVehicleHave cursor for
exec sp_executesql @.strQueryVehicleHave

@.strQueryVehicleHave this string contain a queryMaybe someone can offer a better alternative, but as far as I know you can't do it that way. You will need to place the results of the EXEC into a #temp table and then use the #temp table as the source of your cursor.

At the risk of looking like an idiot, this is my testing code:


DECLARE @.myQuery nvarchar(800)
SET @.myQuery = 'select div_code from division'
DECLARE @.div_code varchar(10)
CREATE Table #Temp (div_code varchar(10))

INSERT INTO #Temp (div_code) EXECUTE sp_executesql @.myQuery -- note that a table variable will not work here

DECLARE curQueryVehicleHave CURSOR FOR SELECT * FROM #TEMP

OPEN curQueryVehicleHave

FETCH NEXT FROM curQueryVehicleHave INTO @.div_code

WHILE @.@.FETCH_STATUS = 0
BEGIN
PRINT @.div_code
FETCH NEXT FROM curQueryVehicleHave INTO @.div_code
END

CLOSE curQueryVehicleHave
DEALLOCATE curQueryVehicleHave
DROP TABLE #Temp

Terri|||I hate this about SQL Server. I'd like to see a syntax like

insert into TableName (Columns, ...)
select Columns, ...
from
exec StoredProc

Please SQL Server people?

Monday, February 27, 2012

Hotfix for article 831997

How can I obtain the Hotfix noted in Article 831997.
After I applied 8.00.0859, I am now getting the
error "Invalid Cursor State" when in design mode of the
Enterprise Manager.
Thanks!Did you actually need to apply 8.00.859? I've found that in most cases
people applied this hotfix merely because it was available to the general
public. The reason hotfixes aren't announced and made more readily
accessible is because they aren't fully regression tested, and aren't immune
to issues like this one.
In any case, you can get 878 from http://support.microsoft.com/?kbid=838166
...
Also, see http://www.aspfaq.com/2515 ... if you stop using Enterprise
Manager for data/schema manipulation, amazingly, the invalid cursor state
error goes away.
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Troy Anderson" <tanderso@.sonoma-county.org> wrote in message
news:2817301c46384$d0604720$a301280a@.phx.gbl...
> How can I obtain the Hotfix noted in Article 831997.
> After I applied 8.00.0859, I am now getting the
> error "Invalid Cursor State" when in design mode of the
> Enterprise Manager.
> Thanks!|||If you are needing a hotfix, you'd best contact Microsoft PSS Support and
ask for the hotfix. Hotfixes are grace (free) cases.
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

Friday, February 24, 2012

Hotfix fixed my SQL Server

I've applied "Hotfix 8.00.0859", which I downloaded from the Microsoft site,
and now I get the "Invalid cursor state" error described here
http://support.microsoft.com/?kbid=831997
The article says there is another hotfix that fixes what the previous hotfix
screwed up, and one should contact "Microsoft Product Support Services" to
get the new hotfix, and give a hyperlink to support where you can pay to
call MS, etc, which I don't really intend to do.
Anyone knows of a better way to get this new hotfix, have a link to it
maybe? I've downloaded the previous one, don't understand why this one is so
special.
Thanks.> give a hyperlink to support where you can pay to
> call MS, etc, which I don't really intend to do.
I suppose you've never done this before. If it's a bug in the product, and
they provide you with a fix, you are not charged for the call. In any
case...

> maybe? I've downloaded the previous one, don't understand why this one is
> so special.
Most hotfixes are not freely available because, as the article always
states, it is only intended to fix the specific problem for those sites that
are having the problem (e.g., not everyone and their brother). The reason
the hotfixes aren't handed out to everyone is because they are not fully
regression tested, and could possibly introduce other problems (e.g.
"Invalid Cursor State").
In your case, there is a newer hotfix that is publicly available. See the
end of http://www.aspfaq.com/2515
I would *STRONGLY* recommend, in the future, that you do not apply hotfixes
just because they are available to download from the Microsoft web site.
http://www.aspfaq.com/
(Reverse address to reply.)|||Aaron, thanks for the link, I am going to give the hotfix a shot.
> I would *STRONGLY* recommend, in the future, that you do not apply
hotfixes
> just because they are available to download from the Microsoft web site.
Actually I've been programming with SQL Server for 10 years now and this was
my first hotfix ever, applied last Sunday after fighting a Report Server
install for about six hours, and someone that had the problem gave the
advice. In the end it was something else, but after six hours you don't ask
questions any more, I was ready for a total SQL Server re-install.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:unm3O0wXEHA.3156@.TK2MSFTNGP12.phx.gbl...
> I suppose you've never done this before. If it's a bug in the product,
and
> they provide you with a fix, you are not charged for the call. In any
> case...
>
is[vbcol=seagreen]
> Most hotfixes are not freely available because, as the article always
> states, it is only intended to fix the specific problem for those sites
that
> are having the problem (e.g., not everyone and their brother). The reason
> the hotfixes aren't handed out to everyone is because they are not fully
> regression tested, and could possibly introduce other problems (e.g.
> "Invalid Cursor State").
> In your case, there is a newer hotfix that is publicly available. See the
> end of http://www.aspfaq.com/2515
> I would *STRONGLY* recommend, in the future, that you do not apply
hotfixes
> just because they are available to download from the Microsoft web site.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>|||Hi Aaron,
The link you gave me to the hotfix fixed the problem, thanks.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:unm3O0wXEHA.3156@.TK2MSFTNGP12.phx.gbl...
> I suppose you've never done this before. If it's a bug in the product,
and
> they provide you with a fix, you are not charged for the call. In any
> case...
>
is[vbcol=seagreen]
> Most hotfixes are not freely available because, as the article always
> states, it is only intended to fix the specific problem for those sites
that
> are having the problem (e.g., not everyone and their brother). The reason
> the hotfixes aren't handed out to everyone is because they are not fully
> regression tested, and could possibly introduce other problems (e.g.
> "Invalid Cursor State").
> In your case, there is a newer hotfix that is publicly available. See the
> end of http://www.aspfaq.com/2515
> I would *STRONGLY* recommend, in the future, that you do not apply
hotfixes
> just because they are available to download from the Microsoft web site.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>

Hotfix fixed my SQL Server

I've applied "Hotfix 8.00.0859", which I downloaded from the Microsoft site,
and now I get the "Invalid cursor state" error described here
http://support.microsoft.com/?kbid=831997
The article says there is another hotfix that fixes what the previous hotfix
screwed up, and one should contact "Microsoft Product Support Services" to
get the new hotfix, and give a hyperlink to support where you can pay to
call MS, etc, which I don't really intend to do.
Anyone knows of a better way to get this new hotfix, have a link to it
maybe? I've downloaded the previous one, don't understand why this one is so
special.
Thanks.
> give a hyperlink to support where you can pay to
> call MS, etc, which I don't really intend to do.
I suppose you've never done this before. If it's a bug in the product, and
they provide you with a fix, you are not charged for the call. In any
case...

> maybe? I've downloaded the previous one, don't understand why this one is
> so special.
Most hotfixes are not freely available because, as the article always
states, it is only intended to fix the specific problem for those sites that
are having the problem (e.g., not everyone and their brother). The reason
the hotfixes aren't handed out to everyone is because they are not fully
regression tested, and could possibly introduce other problems (e.g.
"Invalid Cursor State").
In your case, there is a newer hotfix that is publicly available. See the
end of http://www.aspfaq.com/2515
I would *STRONGLY* recommend, in the future, that you do not apply hotfixes
just because they are available to download from the Microsoft web site.
http://www.aspfaq.com/
(Reverse address to reply.)
|||Aaron, thanks for the link, I am going to give the hotfix a shot.
> I would *STRONGLY* recommend, in the future, that you do not apply
hotfixes
> just because they are available to download from the Microsoft web site.
Actually I've been programming with SQL Server for 10 years now and this was
my first hotfix ever, applied last Sunday after fighting a Report Server
install for about six hours, and someone that had the problem gave the
advice. In the end it was something else, but after six hours you don't ask
questions any more, I was ready for a total SQL Server re-install.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:unm3O0wXEHA.3156@.TK2MSFTNGP12.phx.gbl...
> I suppose you've never done this before. If it's a bug in the product,
and[vbcol=seagreen]
> they provide you with a fix, you are not charged for the call. In any
> case...
is
> Most hotfixes are not freely available because, as the article always
> states, it is only intended to fix the specific problem for those sites
that
> are having the problem (e.g., not everyone and their brother). The reason
> the hotfixes aren't handed out to everyone is because they are not fully
> regression tested, and could possibly introduce other problems (e.g.
> "Invalid Cursor State").
> In your case, there is a newer hotfix that is publicly available. See the
> end of http://www.aspfaq.com/2515
> I would *STRONGLY* recommend, in the future, that you do not apply
hotfixes
> just because they are available to download from the Microsoft web site.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
|||Hi Aaron,
The link you gave me to the hotfix fixed the problem, thanks.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:unm3O0wXEHA.3156@.TK2MSFTNGP12.phx.gbl...
> I suppose you've never done this before. If it's a bug in the product,
and[vbcol=seagreen]
> they provide you with a fix, you are not charged for the call. In any
> case...
is
> Most hotfixes are not freely available because, as the article always
> states, it is only intended to fix the specific problem for those sites
that
> are having the problem (e.g., not everyone and their brother). The reason
> the hotfixes aren't handed out to everyone is because they are not fully
> regression tested, and could possibly introduce other problems (e.g.
> "Invalid Cursor State").
> In your case, there is a newer hotfix that is publicly available. See the
> end of http://www.aspfaq.com/2515
> I would *STRONGLY* recommend, in the future, that you do not apply
hotfixes
> just because they are available to download from the Microsoft web site.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>

Hotfix fixed my SQL Server

I've applied "Hotfix 8.00.0859", which I downloaded from the Microsoft site,
and now I get the "Invalid cursor state" error described here
http://support.microsoft.com/?kbid=831997
The article says there is another hotfix that fixes what the previous hotfix
screwed up, and one should contact "Microsoft Product Support Services" to
get the new hotfix, and give a hyperlink to support where you can pay to
call MS, etc, which I don't really intend to do.
Anyone knows of a better way to get this new hotfix, have a link to it
maybe? I've downloaded the previous one, don't understand why this one is so
special.
Thanks.> give a hyperlink to support where you can pay to
> call MS, etc, which I don't really intend to do.
I suppose you've never done this before. If it's a bug in the product, and
they provide you with a fix, you are not charged for the call. In any
case...
> maybe? I've downloaded the previous one, don't understand why this one is
> so special.
Most hotfixes are not freely available because, as the article always
states, it is only intended to fix the specific problem for those sites that
are having the problem (e.g., not everyone and their brother). The reason
the hotfixes aren't handed out to everyone is because they are not fully
regression tested, and could possibly introduce other problems (e.g.
"Invalid Cursor State").
In your case, there is a newer hotfix that is publicly available. See the
end of http://www.aspfaq.com/2515
I would *STRONGLY* recommend, in the future, that you do not apply hotfixes
just because they are available to download from the Microsoft web site.
--
http://www.aspfaq.com/
(Reverse address to reply.)|||Aaron, thanks for the link, I am going to give the hotfix a shot.
> I would *STRONGLY* recommend, in the future, that you do not apply
hotfixes
> just because they are available to download from the Microsoft web site.
Actually I've been programming with SQL Server for 10 years now and this was
my first hotfix ever, applied last Sunday after fighting a Report Server
install for about six hours, and someone that had the problem gave the
advice. In the end it was something else, but after six hours you don't ask
questions any more, I was ready for a total SQL Server re-install.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:unm3O0wXEHA.3156@.TK2MSFTNGP12.phx.gbl...
> > give a hyperlink to support where you can pay to
> > call MS, etc, which I don't really intend to do.
> I suppose you've never done this before. If it's a bug in the product,
and
> they provide you with a fix, you are not charged for the call. In any
> case...
> > maybe? I've downloaded the previous one, don't understand why this one
is
> > so special.
> Most hotfixes are not freely available because, as the article always
> states, it is only intended to fix the specific problem for those sites
that
> are having the problem (e.g., not everyone and their brother). The reason
> the hotfixes aren't handed out to everyone is because they are not fully
> regression tested, and could possibly introduce other problems (e.g.
> "Invalid Cursor State").
> In your case, there is a newer hotfix that is publicly available. See the
> end of http://www.aspfaq.com/2515
> I would *STRONGLY* recommend, in the future, that you do not apply
hotfixes
> just because they are available to download from the Microsoft web site.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>|||Hi Aaron,
The link you gave me to the hotfix fixed the problem, thanks.
"Aaron [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:unm3O0wXEHA.3156@.TK2MSFTNGP12.phx.gbl...
> > give a hyperlink to support where you can pay to
> > call MS, etc, which I don't really intend to do.
> I suppose you've never done this before. If it's a bug in the product,
and
> they provide you with a fix, you are not charged for the call. In any
> case...
> > maybe? I've downloaded the previous one, don't understand why this one
is
> > so special.
> Most hotfixes are not freely available because, as the article always
> states, it is only intended to fix the specific problem for those sites
that
> are having the problem (e.g., not everyone and their brother). The reason
> the hotfixes aren't handed out to everyone is because they are not fully
> regression tested, and could possibly introduce other problems (e.g.
> "Invalid Cursor State").
> In your case, there is a newer hotfix that is publicly available. See the
> end of http://www.aspfaq.com/2515
> I would *STRONGLY* recommend, in the future, that you do not apply
hotfixes
> just because they are available to download from the Microsoft web site.
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>|||I have the same problem. Did you get a fix?
Thanks!
~ Troy
>--Original Message--
>I've applied "Hotfix 8.00.0859", which I downloaded from
the Microsoft site,
>and now I get the "Invalid cursor state" error described
here
>http://support.microsoft.com/?kbid=831997
>The article says there is another hotfix that fixes what
the previous hotfix
>screwed up, and one should contact "Microsoft Product
Support Services" to
>get the new hotfix, and give a hyperlink to support where
you can pay to
>call MS, etc, which I don't really intend to do.
>Anyone knows of a better way to get this new hotfix, have
a link to it
>maybe? I've downloaded the previous one, don't understand
why this one is so
>special.
>Thanks.
>
>.
>|||> I have the same problem. Did you get a fix?
Did you read the rest of the thread you replied to?|||The direct link to the fix that fixed it for me (thanks to Aaron) is
http://support.microsoft.com/?kbid=838166
"Troy Anderson" <tanderso@.sonoma-county.org> wrote in message
news:322801c46385$3df4f380$3a01280a@.phx.gbl...
> I have the same problem. Did you get a fix?
> Thanks!
> ~ Troy
> >--Original Message--
> >I've applied "Hotfix 8.00.0859", which I downloaded from
> the Microsoft site,
> >and now I get the "Invalid cursor state" error described
> here
> >http://support.microsoft.com/?kbid=831997
> >
> >The article says there is another hotfix that fixes what
> the previous hotfix
> >screwed up, and one should contact "Microsoft Product
> Support Services" to
> >get the new hotfix, and give a hyperlink to support where
> you can pay to
> >call MS, etc, which I don't really intend to do.
> >Anyone knows of a better way to get this new hotfix, have
> a link to it
> >maybe? I've downloaded the previous one, don't understand
> why this one is so
> >special.
> >
> >Thanks.
> >
> >
> >.
> >

Hotfix 934459.

Hi, I have a sql 2005 with Sp2 applied. My Build is 9.0.3054
Now I have the error described in Fix 934459 (The Check Database Integrity
task and the Execute T-SQL Statement task in a maintenance plan may lose
database context in certain circumstances ), but my build 9.0.3054 doesn't
seem to be in the affected ones..
Should I install the hotfix? Which one?
This are the two available
If you are running a build of SQL Server 2005 SP2 between 3150 and 3158
http://support.microsoft.com/kb/934459/
If you are running any build of SQL Server 2005 SP2 between 3042 and 3053
http://support.microsoft.com/kb/934458/
Thanks.
You should get 3200 or, better yet, 3215 instead.
9.0.3200:
http://support.microsoft.com/kb/941450
9.0.3215:
http://support.microsoft.com/kb/943656
"averied" <averied@.discussions.microsoft.com> wrote in message
news:BE40CE77-C3A5-4FF3-AEFA-477950543802@.microsoft.com...
> Hi, I have a sql 2005 with Sp2 applied. My Build is 9.0.3054
> Now I have the error described in Fix 934459 (The Check Database Integrity
> task and the Execute T-SQL Statement task in a maintenance plan may lose
> database context in certain circumstances ), but my build 9.0.3054 doesn't
> seem to be in the affected ones..
> Should I install the hotfix? Which one?
> This are the two available
> If you are running a build of SQL Server 2005 SP2 between 3150 and 3158
> http://support.microsoft.com/kb/934459/
> If you are running any build of SQL Server 2005 SP2 between 3042 and 3053
> http://support.microsoft.com/kb/934458/
>
> Thanks.
>
|||I installed the Cumulative update package 4 for SQL Server 2005 Service Pack
2 and rebooted my machine, yet my version still shows 9.00.3042. The
installation appeared to function properly w/ no errors. How can I tell that
this hot fix did indeed install?
Cordially,
Mark Boettcher
PS, I have just now requested the hotfix for 3215 and should get it tomorrow.
"Aaron Bertrand [SQL Server MVP]" wrote:

> You should get 3200 or, better yet, 3215 instead.
> 9.0.3200:
> http://support.microsoft.com/kb/941450
> 9.0.3215:
> http://support.microsoft.com/kb/943656
>
>
> "averied" <averied@.discussions.microsoft.com> wrote in message
> news:BE40CE77-C3A5-4FF3-AEFA-477950543802@.microsoft.com...
>
>
|||>I installed the Cumulative update package 4 for SQL Server 2005 Service
>Pack
> 2 and rebooted my machine, yet my version still shows 9.00.3042.
Where/how are you checking "my version"?
A
|||In server management studio, I right-clicked on registered server and found
it under properties. If not there, how should I display the sql version?
Mark
"Aaron Bertrand [SQL Server MVP]" wrote:

> Where/how are you checking "my version"?
> A
>
|||That is the version for the tools (Management Studio). Open a query window
connected to the server you updated, and then run:
SELECT @.@.VERSION;
"Mark Boettcher" <MarkBoettcher@.discussions.microsoft.com> wrote in message
news:71D22B9E-5D0B-4B79-8E59-B9067A58EC2C@.microsoft.com...[vbcol=seagreen]
> In server management studio, I right-clicked on registered server and
> found
> it under properties. If not there, how should I display the sql version?
> Mark
> "Aaron Bertrand [SQL Server MVP]" wrote:
|||Since I installed Cumulative update package 4, I requested, received, and
installed Cumulative update package 5. Using the Select @.@.Version command
returns 9.00.3215 now. I assume Cumulative update package 5 includes the
changes in Cumulative update package 4 - correct? After I installed package
4, I did do a select @.@.version and received 9.00.3042 which is why I
questioned whether the package really did install.
Mark
"Aaron Bertrand [SQL Server MVP]" wrote:

> That is the version for the tools (Management Studio). Open a query window
> connected to the server you updated, and then run:
> SELECT @.@.VERSION;
>
> "Mark Boettcher" <MarkBoettcher@.discussions.microsoft.com> wrote in message
> news:71D22B9E-5D0B-4B79-8E59-B9067A58EC2C@.microsoft.com...
>
|||> returns 9.00.3215 now. I assume Cumulative update package 5 includes the
> changes in Cumulative update package 4 - correct?
Yes, each cumulative update page states that cumulative updates are
cumulative -- that's why they're named as such. :-)

> After I installed package
> 4, I did do a select @.@.version and received 9.00.3042
Then the install didn't succeed, or you ran SELECT @.@.VERSION against the
wrong server.
A

Hotfix 934459.

Hi, I have a sql 2005 with Sp2 applied. My Build is 9.0.3054
Now I have the error described in Fix 934459 (The Check Database Integrity
task and the Execute T-SQL Statement task in a maintenance plan may lose
database context in certain circumstances ), but my build 9.0.3054 doesn't
seem to be in the affected ones..
Should I install the hotfix' Which one'
This are the two available
If you are running a build of SQL Server 2005 SP2 between 3150 and 3158
http://support.microsoft.com/kb/934459/
If you are running any build of SQL Server 2005 SP2 between 3042 and 3053
http://support.microsoft.com/kb/934458/
Thanks.You should get 3200 or, better yet, 3215 instead.
9.0.3200:
http://support.microsoft.com/kb/941450
9.0.3215:
http://support.microsoft.com/kb/943656
"averied" <averied@.discussions.microsoft.com> wrote in message
news:BE40CE77-C3A5-4FF3-AEFA-477950543802@.microsoft.com...
> Hi, I have a sql 2005 with Sp2 applied. My Build is 9.0.3054
> Now I have the error described in Fix 934459 (The Check Database Integrity
> task and the Execute T-SQL Statement task in a maintenance plan may lose
> database context in certain circumstances ), but my build 9.0.3054 doesn't
> seem to be in the affected ones..
> Should I install the hotfix' Which one'
> This are the two available
> If you are running a build of SQL Server 2005 SP2 between 3150 and 3158
> http://support.microsoft.com/kb/934459/
> If you are running any build of SQL Server 2005 SP2 between 3042 and 3053
> http://support.microsoft.com/kb/934458/
>
> Thanks.
>|||I installed the Cumulative update package 4 for SQL Server 2005 Service Pack
2 and rebooted my machine, yet my version still shows 9.00.3042. The
installation appeared to function properly w/ no errors. How can I tell that
this hot fix did indeed install?
Cordially,
Mark Boettcher
PS, I have just now requested the hotfix for 3215 and should get it tomorrow.
"Aaron Bertrand [SQL Server MVP]" wrote:
> You should get 3200 or, better yet, 3215 instead.
> 9.0.3200:
> http://support.microsoft.com/kb/941450
> 9.0.3215:
> http://support.microsoft.com/kb/943656
>
>
> "averied" <averied@.discussions.microsoft.com> wrote in message
> news:BE40CE77-C3A5-4FF3-AEFA-477950543802@.microsoft.com...
> > Hi, I have a sql 2005 with Sp2 applied. My Build is 9.0.3054
> >
> > Now I have the error described in Fix 934459 (The Check Database Integrity
> > task and the Execute T-SQL Statement task in a maintenance plan may lose
> > database context in certain circumstances ), but my build 9.0.3054 doesn't
> > seem to be in the affected ones..
> >
> > Should I install the hotfix' Which one'
> >
> > This are the two available
> >
> > If you are running a build of SQL Server 2005 SP2 between 3150 and 3158
> > http://support.microsoft.com/kb/934459/
> >
> > If you are running any build of SQL Server 2005 SP2 between 3042 and 3053
> > http://support.microsoft.com/kb/934458/
> >
> >
> > Thanks.
> >
>
>|||>I installed the Cumulative update package 4 for SQL Server 2005 Service
>Pack
> 2 and rebooted my machine, yet my version still shows 9.00.3042.
Where/how are you checking "my version"?
A|||In server management studio, I right-clicked on registered server and found
it under properties. If not there, how should I display the sql version?
Mark
"Aaron Bertrand [SQL Server MVP]" wrote:
> >I installed the Cumulative update package 4 for SQL Server 2005 Service
> >Pack
> > 2 and rebooted my machine, yet my version still shows 9.00.3042.
> Where/how are you checking "my version"?
> A
>|||That is the version for the tools (Management Studio). Open a query window
connected to the server you updated, and then run:
SELECT @.@.VERSION;
"Mark Boettcher" <MarkBoettcher@.discussions.microsoft.com> wrote in message
news:71D22B9E-5D0B-4B79-8E59-B9067A58EC2C@.microsoft.com...
> In server management studio, I right-clicked on registered server and
> found
> it under properties. If not there, how should I display the sql version?
> Mark
> "Aaron Bertrand [SQL Server MVP]" wrote:
>> >I installed the Cumulative update package 4 for SQL Server 2005 Service
>> >Pack
>> > 2 and rebooted my machine, yet my version still shows 9.00.3042.
>> Where/how are you checking "my version"?
>> A|||Since I installed Cumulative update package 4, I requested, received, and
installed Cumulative update package 5. Using the Select @.@.Version command
returns 9.00.3215 now. I assume Cumulative update package 5 includes the
changes in Cumulative update package 4 - correct? After I installed package
4, I did do a select @.@.version and received 9.00.3042 which is why I
questioned whether the package really did install.
Mark
"Aaron Bertrand [SQL Server MVP]" wrote:
> That is the version for the tools (Management Studio). Open a query window
> connected to the server you updated, and then run:
> SELECT @.@.VERSION;
>
> "Mark Boettcher" <MarkBoettcher@.discussions.microsoft.com> wrote in message
> news:71D22B9E-5D0B-4B79-8E59-B9067A58EC2C@.microsoft.com...
> > In server management studio, I right-clicked on registered server and
> > found
> > it under properties. If not there, how should I display the sql version?
> >
> > Mark
> >
> > "Aaron Bertrand [SQL Server MVP]" wrote:
> >
> >> >I installed the Cumulative update package 4 for SQL Server 2005 Service
> >> >Pack
> >> > 2 and rebooted my machine, yet my version still shows 9.00.3042.
> >>
> >> Where/how are you checking "my version"?
> >>
> >> A
> >>
>|||> returns 9.00.3215 now. I assume Cumulative update package 5 includes the
> changes in Cumulative update package 4 - correct?
Yes, each cumulative update page states that cumulative updates are
cumulative -- that's why they're named as such. :-)
> After I installed package
> 4, I did do a select @.@.version and received 9.00.3042
Then the install didn't succeed, or you ran SELECT @.@.VERSION against the
wrong server.
A

hot to make sure a upgrade from sql 2005 standard to enterprise edition?

Randy,

I did run upgrade advisior to check the existed sql 2005 standard edition to upgrade to enterprise editon. I got the following error message:

SQL Server version: 09.00.1399 is not supported by this release of Upgrade Advisor

Is it means the upgrade advisor can only work on from 7.0, 2000 to 2005? If I need check from standard to enterjprise in 2005, what kind of tool I can use?

One of the SQL Server forums would be a better place to ask this question:

http://forums.microsoft.com/MSDN/default.aspx?ForumGroupID=19&SiteID=1

You'll have better luck finding an answer there.

-Tom