Showing posts with label below. Show all posts
Showing posts with label below. Show all posts

Thursday, March 29, 2012

Error Reporting: Installation on SQL 2005 on x64

I installed SQL 2005 on x64 machine and notice that my Y: drive (data drive) has these additional directories (shown below). I know those files are components of “Microsoft Application Error Reporting”. They are shared among multiple applications, hence them being in “common files”. After disabling the error reporting using Microsoft SQL Server 2005->Configuration Tools->Error and Usage Reporting, can I get rid of those directories or specify which directory that it should go to? Has anyone seen this before? Thanks.

The following had been installed to the drive that we did not specify in the installation of SQL 2005. Is there any way to redirect these file back the window directory?

Volume in drive Y is New Volume
Volume Serial Number is 882B-9F43
NULL
Directory of y:\program files\common files\microsoft shared\dw
NULL
06/01/2006 11:26 AM <DIR> .
06/01/2006 11:26 AM <DIR> ..
06/01/2006 11:26 AM <DIR> 1028
06/01/2006 11:26 AM <DIR> 1031
06/01/2006 11:26 AM <DIR> 1033
06/01/2006 11:26 AM <DIR> 1036
06/01/2006 11:26 AM <DIR> 1040
06/01/2006 11:26 AM <DIR> 1041
06/01/2006 11:26 AM <DIR> 1042
06/01/2006 11:26 AM <DIR> 2052
06/01/2006 11:26 AM <DIR> 3082
04/25/2005 01:44 PM 1,030,336 DW20.EXE
04/25/2005 01:44 PM 496,328 DWDCW20.DLL
04/25/2005 01:44 PM 489,672 DWTRIG20.EXE
3 File(s) 2,016,336 bytes
11 Dir(s) 85,983,068,160 bytes free
NULL

I'm pretty sure this is a setup bug where some components are not defaulting to the system drive, or sql drive, but to the drive where you launched setup from. I'm guessing you launched setup from the Y: drive. Don't know if there's a simple way to move them, but you can always uninstall, then reinstall, but this time launch setup from the drive you want these components installed on.sql

Error reporting from SP to .NET code, how?

Hey

ASP.NET 2.0 + MS Sql Server 2005 Express (that version which comes with VS2005)

This code below fails. The Delete method executes a stored procedure, but somehow this SP fails. The SP shown here is a short version of the actual SP. As you see from the code below, there are no way the Delete method can know if SP executed successfully. I assume I just could have returned @.@.error, but that just gives an error number, and not the description of the error??.. And how should I capture exceptions like these?? How should code this SP so it report the error??

Any suggestions??

public override void Delete(System.Guid id, int user)
{
using (SqlConnection cn = new SqlConnection(this.ConnectionString))
{
SqlCommand cmd = new SqlCommand("SendMessage", cn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("@.id", SqlDbType.UniqueIdentifier).Value = id;
cmd.Parameters.Add("@.user", SqlDbType.Int).Value = user;
}
}

ALTER PROCEDURE dbo.DeleteMessage @.id uniqueidentifier, @.user int
AS
BEGIN
UPDATE table_A set column_A = 1 WHERE Id = @.id;
DELETE FROM table_B WHERE Id = @.id;
IF (@.@.error = 0)
COMMIT TRAN;
ELSE
ROLLBACK TRAN;
END

there is a couple of way to report that what happened, you can use execute nonquery to get number of rows affected by last SQL command, you can return from your procedure single cell using SELECT with value 0 for success and 1 for error and finally you can use output parameters and read its values after procedure executes. See T-SQL help in SQL management studio express which is very good and you can find everything you wont.

Error registering a Third Party assembly

Help.

When I try to CREATE/Register a third party assembly (dtsearchNetApi2) within SQL server I am getting an error (see below). I have the source code for dtsearchNetApi2 but it is in C++ and I would like to avoid having to extend/modify it if that is avoidable. I have written a 'wrapper' class in C# but sine it references dtsearchNetApi2.dll I can't register that dll either.

CREATE ASSEMBLY DBSEARCHNETAPI

FROM 'C:\Temp\dtsearchNetApi2.dll'

WITH PERMISSION_SET = UNSAFE

Msg 6218, Level 16, State 3, Line 2

CREATE ASSEMBLY for assembly 'dtSearchNetApi2' failed because assembly 'dtSearchNetApi2' failed verification. Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database. CLR Verifier error messages if any will follow this message

dtsearchNetApi2 has references to unmanaged code. The dtSearchNetApi2.dll is a .NET 2.0 wrapper around C++ objects exported in dten600.dll. It is implemented in MSVC++ with Managed Extensions is implemented in C++/CLI 2.0.

You can't load an unmanaged assembly into Sql Server, which means you can't have a direct reference to it from your managed assembly either. To correctly access your unmanaged assembly from within Sql Clr, you need to use P/Invoke (through DllImport) instead.

Steven

|||

Thanks for the reply Steven.

Too bad the support folks in the SQL Server 2005 support group didn't know that would have saved me a few days. :)

Burke

sql

Monday, March 26, 2012

error parsing the query

hi all

I try to run the query below it throw me an exception, error parsing , is there anywat to resolve it?

SELECT TYPE2.list_price as 'TYPE2'
FROM TBL_MST_PRICE TYPE2
WHERE
price_grp_code = (SELECT price_grp_code FROM TBL_MST_PRICE_GRP WHERE prd_code = '' AND cust_code = '')

Sub-selects (nested select statements) are not supported by SQL CE. You will have to rephrase your query to use a join or use 2 select statements.

Error Parsing Name String

I''m reposting this problem because I may not have explained it well enough
before. in example 1 below, i've successfully extracted the last name from a
full name field, although I've hard-coded the fullname or userName.
Example 2 gives the listed error when i run it on my table with data in the
userName field. What I can't figure is Example 2 will work if I don't
include the "-1" part, buh returns the lastname and it's trailing comma.
What am I doing wrong? My data looks like the DATA section below.
--EXAMPLE 1: works , hard-coded name
SELECT 'Miles, Michael L' as userName,
LEFT('Miles, Michael L',CHARINDEX(',','Miles, Michael L')-1) as userLast
-- EXAMPLE 2
-- Error Msg 536, Level 16, State 3, Line 1
-- Invalid length parameter passed to the substring function.
SELECT name as userName,
LEFT(name,CHARINDEX(',',name)-1) as userLast
FROM sc_employee
DATA Table***********************************
****************
USERNAME
Smith, John R
Walker, L.T.
Adams, Charles
Weathersby, D.J.On Sun, 2 Apr 2006 17:56:42 -0500, scott wrote:
(snip)
>-- EXAMPLE 2
>-- Error Msg 536, Level 16, State 3, Line 1
>-- Invalid length parameter passed to the substring function.
>SELECT name as userName,
>LEFT(name,CHARINDEX(',',name)-1) as userLast
>FROM sc_employee
Hi Scott,
You probably have at least one row where there is no comma in the Name
column. To find the offenders, use
SELECT name
FROM sc_employee
WHERE name NOT LIKE '%,%'
And to exclude the offending rows from your query, change it to
SELECT name as userName,
LEFT(name,CHARINDEX(',',name)-1) as userLast
FROM sc_employee
WHERE name LIKE '%,%'
Hugo Kornelis, SQL Server MVP|||I found a null record. thanks.
"Hugo Kornelis" <hugo@.perFact.REMOVETHIS.info.INVALID> wrote in message
news:6nm0321acbpk9am57qii9nk8p23dinp6a3@.
4ax.com...
> On Sun, 2 Apr 2006 17:56:42 -0500, scott wrote:
> (snip)
> Hi Scott,
> You probably have at least one row where there is no comma in the Name
> column. To find the offenders, use
> SELECT name
> FROM sc_employee
> WHERE name NOT LIKE '%,%'
> And to exclude the offending rows from your query, change it to
> SELECT name as userName,
> LEFT(name,CHARINDEX(',',name)-1) as userLast
> FROM sc_employee
> WHERE name LIKE '%,%'
> --
> Hugo Kornelis, SQL Server MVP

Friday, March 23, 2012

Error on reporting service

I got a error like below.
Anyone has any idea?
================================== An unexpected error occurred in Report Processing.
(rsInternalError) Get Online Help
For more information about this error navigate to the
report server on the local server machine, or enable remote errorsOn Apr 20, 9:25 am, "Ken" <k...@.jeromegroup.com> wrote:
> I got a error like below.
> Anyone has any idea?
> ==================================> An unexpected error occurred in Report Processing.
> (rsInternalError) Get Online Help
> For more information about this error navigate to the
> report server on the local server machine, or enable remote errors
This is kind-of a vague error. To check the SSRS log file for possible
error reasons or descriptions, go to the following location (normally,
may vary slightly):
C:\Program Files\Microsoft SQL Server\MSSQL.2(it may be MSSQL.3 (etc),
depending on the number of services installed)\Reporting Services
\LogFiles.
and see if the log file around the time of the error explains the
problem any better. Hope this is helpful.
Regards,
Enrique Martinez
Sr. Software Consultantsql

Wednesday, March 21, 2012

Error on Named Calculation

When I creat a Named Calculation with the following code:

case

when [Sales]<1000 then 'Below'

when [Sales]<2000 then 'O.K.'

when [Sales]>=2000 then 'Good'

else 'None'

end

I get error on save:

IErrorInfo.GetDescription failed with E_FAIL(0x80004005).

Thanks.

Joe.

What database are you connecting to? SQL Server? Access? If you are using Access, it doesn't support CASE - you would have to use IIF|||Thanks Jamie. You are right. I am using Access.sql

Error on link Servers

Hi,
I am getting below error on link server and the performance between the link
server looks pathetic. Kindly suggest.
Executed as user: NT AUTHORITY\SYSTEM. OLE DB provider 'SQLOLEDB' reported
an error. Execution terminated by the provider because a resource limit was
reached. [SQLSTATE 42000] (Error 7399) [SQLSTATE 01000] (Error 7312) OLE
DB error trace [OLE/DB Provider 'SQLOLEDB' ICommandText::Execute returned
0x80040e31: Execution terminated by the provider because a resource limit
was reached.]. [SQLSTATE 01000] (Error 7300).
Hi
"Execution terminated by the provider because a resource limit was reached"
is a good indication. Check the destination server has enough connections and
resources. Check the SQL event logs on both servers.
Regards
Mike
"smiley" wrote:

> Hi,
> I am getting below error on link server and the performance between the link
> server looks pathetic. Kindly suggest.
> Executed as user: NT AUTHORITY\SYSTEM. OLE DB provider 'SQLOLEDB' reported
> an error. Execution terminated by the provider because a resource limit was
> reached. [SQLSTATE 42000] (Error 7399) [SQLSTATE 01000] (Error 7312) OLE
> DB error trace [OLE/DB Provider 'SQLOLEDB' ICommandText::Execute returned
> 0x80040e31: Execution terminated by the provider because a resource limit
> was reached.]. [SQLSTATE 01000] (Error 7300).
>
sql

Error on link Servers

Hi,
I am getting below error on link server and the performance between the link
server looks pathetic. Kindly suggest.
Executed as user: NT AUTHORITY\SYSTEM. OLE DB provider 'SQLOLEDB' reported
an error. Execution terminated by the provider because a resource limit was
reached. [SQLSTATE 42000] (Error 7399) [SQLSTATE 01000] (Error 731
2) OLE
DB error trace [OLE/DB Provider 'SQLOLEDB' ICommandText::Execute returne
d
0x80040e31: Execution terminated by the provider because a resource limit
was reached.]. [SQLSTATE 01000] (Error 7300).Hi
"Execution terminated by the provider because a resource limit was reached"
is a good indication. Check the destination server has enough connections an
d
resources. Check the SQL event logs on both servers.
Regards
Mike
"smiley" wrote:

> Hi,
> I am getting below error on link server and the performance between the li
nk
> server looks pathetic. Kindly suggest.
> Executed as user: NT AUTHORITY\SYSTEM. OLE DB provider 'SQLOLEDB' reported
> an error. Execution terminated by the provider because a resource limit wa
s
> reached. [SQLSTATE 42000] (Error 7399) [SQLSTATE 01000] (Error 7
312) OLE
> DB error trace [OLE/DB Provider 'SQLOLEDB' ICommandText::Execute retur
ned
> 0x80040e31: Execution terminated by the provider because a resource limit
> was reached.]. [SQLSTATE 01000] (Error 7300).
>

Error on link Servers

Hi,
I am getting below error on link server and the performance between the link
server looks pathetic. Kindly suggest.
Executed as user: NT AUTHORITY\SYSTEM. OLE DB provider 'SQLOLEDB' reported
an error. Execution terminated by the provider because a resource limit was
reached. [SQLSTATE 42000] (Error 7399) [SQLSTATE 01000] (Error 7312) OLE
DB error trace [OLE/DB Provider 'SQLOLEDB' ICommandText::Execute returned
0x80040e31: Execution terminated by the provider because a resource limit
was reached.]. [SQLSTATE 01000] (Error 7300).Hi
"Execution terminated by the provider because a resource limit was reached"
is a good indication. Check the destination server has enough connections and
resources. Check the SQL event logs on both servers.
Regards
Mike
"smiley" wrote:
> Hi,
> I am getting below error on link server and the performance between the link
> server looks pathetic. Kindly suggest.
> Executed as user: NT AUTHORITY\SYSTEM. OLE DB provider 'SQLOLEDB' reported
> an error. Execution terminated by the provider because a resource limit was
> reached. [SQLSTATE 42000] (Error 7399) [SQLSTATE 01000] (Error 7312) OLE
> DB error trace [OLE/DB Provider 'SQLOLEDB' ICommandText::Execute returned
> 0x80040e31: Execution terminated by the provider because a resource limit
> was reached.]. [SQLSTATE 01000] (Error 7300).
>

Error on link Servere

HI,
I am getting below error on link server. And the performance between
link server is really pathatic.

Executed as user: NT AUTHORITY\SYSTEM. OLE DB provider 'SQLOLEDB'
reported an error. Execution terminated by the provider because a
resource limit was reached. [SQLSTATE 42000] (Error 7399) [SQLSTATE
01000] (Error 7312) OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
ICommandText::Execute returned 0x80040e31: Execution terminated by the
provider because a resource limit was reached.]. [SQLSTATE 01000]
(Error 7300).Hi,

It looks like that's a generic error. Pretty hard to troubleshoot..

Please read the following for more info on this.. Also, if/when you've
got more details (using the trace) and you're still experiencing issues
please post the query you're executing and the volume of data being
transferred between the servers..

http://support.microsoft.com/default.aspx?scid=314530

Greg

Error on Executing SSIS packages on a remote machine using code

Hello all,

I am trying to execute the ssis packages using code.These packages are hosted on remote server under MSDB in local Network.

Below is the code tried to Execute
--

DTSExecResult execRslt = _dtsxPackage.Execute();

foreach (DtsError dtserr in _dtsxPackage.Errors)
{
Console.WriteLine("Source: " + dtserr.Source + ", Description: " + dtserr.Description);
}


I get hte following Error
--

"Dupaco Load MMAs"-"An OLE DB error has occurred. Error code: 0x80004005.\r\nAn OLE DB record is available. Source: \"Microsoft OLE DB Provider for SQL Server\" Hresult: 0x80004005 Description: \"[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.\".\r\n"

"Data Flow Task" -"The AcquireConnection method call to the connection manager \"Dupaco\" failed with error code 0xC0202009.\r\n"

"Data Flow Task" -"component \"OLE DB Destination\" (119) failed validation and returned error code 0xC020801C.\r\n"

"One or more component failed validation.\r\n"

"There were errors during task validation.\r\n"

When i try to execute the same code on the server where all the package are hosted. It is working fine.

More Info:

In thepackage we are using one "Source Flat file connection" and one "Oledb Destination connection"

Please help me to solve this problem, as my client needs it very badly


Thanks
Subin

Subin wrote:

"Dupaco Load MMAs"-"An OLE DB error has occurred. Error code: 0x80004005.\r\nAn OLE DB record is available. Source: \"Microsoft OLE DB Provider for SQL Server\" Hresult: 0x80004005 Description: \"[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.\".\r\n"

The problem appears to be that whatever address or alias was used to create the OLE DB connection can't be resolved from where the package is executing. Maybe it was set up using (local) or something. Maybe the server doesn't allow TCP/IP connections (the default for SQL Server 2005).
|||

Hi Jay,

Earlier We were using sql server name now we have changes that to IP address,

we have saved the password in the "Oledb Destination connection" by checking in the checkbox to save the password.

now we are getting the following Error

"An OLE DB error has occurred. Error code: 0x80040E4D.\r\nAn OLE DB record is available. Source: \"Microsoft OLE DB Provider for SQL Server\" Hresult: 0x80040E4D Description: \"Login failed for user 'sa'.\".\r\n"

|||

Subin wrote:

"An OLE DB error has occurred. Error code: 0x80040E4D.\r\nAn OLE DB record is available. Source: \"Microsoft OLE DB Provider for SQL Server\" Hresult: 0x80040E4D Description: \"Login failed for user 'sa'.\".\r\n"

I've already answered that one today, so all you get is a link.

See if this helps.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1453667&SiteID=1
|||

Subin wrote:

"An OLE DB error has occurred. Error code: 0x80040E4D.\r\nAn OLE DB record is available. Source: \"Microsoft OLE DB Provider for SQL Server\" Hresult: 0x80040E4D Description: \"Login failed for user 'sa'.\".\r\n"

Are you intending to be logging in as the user 'sa'?|||

Subin wrote:

Hello all,

I am trying to execute the ssis packages using code.These packages are hosted on remote server under MSDB in local Network.

...

To clarify possible confusion: you are not executing the package on a remote machine (as the title of your question suggests).

You are loading package from a remote machine and running it locally (where your application runs).

http://blogs.msdn.com/michen/archive/2006/08/11/package-exec-location.aspx

Michael.

|||

Hello Michael,

You are absolutely correct. Sorry for confusion.

I am not executing the package on a remote machine (as the title of question suggests),loading package from a remote machine and running it locally (where my application runs).

Thanks

Subin

|||

Hello All,

Thank you all for help.

I have solved the problem.

The package which i had tried to execute was a password protected package and I was not setting the PackagePassword property of Application class before loading package from remote machine. So that the loaded package does not have sensitive information. That was the problem.

Application app = new Application();

app.PackagePassword = "test";

Package package = app.LoadFromSqlServer(@."PackTest", "Circle-DotNet57", "ssisdeveloper", "circle_123", null);

//package.ProtectionLevel = DTSProtectionLevel.EncryptSensitiveWithPassword;

//package.PackagePassword = "test";

DTSExecResult result = package.Execute();

Thank you

Subin

Error on Executing SSIS packages on a remote machine using code

Hello all,

I am trying to execute the ssis packages using code.These packages are hosted on remote server under MSDB in local Network.

Below is the code tried to Execute
--

DTSExecResult execRslt = _dtsxPackage.Execute();

foreach (DtsError dtserr in _dtsxPackage.Errors)
{
Console.WriteLine("Source: " + dtserr.Source + ", Description: " + dtserr.Description);
}


I get hte following Error
--

"Dupaco Load MMAs"-"An OLE DB error has occurred. Error code: 0x80004005.\r\nAn OLE DB record is available. Source: \"Microsoft OLE DB Provider for SQL Server\" Hresult: 0x80004005 Description: \"[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.\".\r\n"

"Data Flow Task" -"The AcquireConnection method call to the connection manager \"Dupaco\" failed with error code 0xC0202009.\r\n"

"Data Flow Task" -"component \"OLE DB Destination\" (119) failed validation and returned error code 0xC020801C.\r\n"

"One or more component failed validation.\r\n"

"There were errors during task validation.\r\n"

When i try to execute the same code on the server where all the package are hosted. It is working fine.

More Info:

In thepackage we are using one "Source Flat file connection" and one "Oledb Destination connection"

Please help me to solve this problem, as my client needs it very badly


Thanks
Subin

Subin wrote:

"Dupaco Load MMAs"-"An OLE DB error has occurred. Error code: 0x80004005.\r\nAn OLE DB record is available. Source: \"Microsoft OLE DB Provider for SQL Server\" Hresult: 0x80004005 Description: \"[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.\".\r\n"

The problem appears to be that whatever address or alias was used to create the OLE DB connection can't be resolved from where the package is executing. Maybe it was set up using (local) or something. Maybe the server doesn't allow TCP/IP connections (the default for SQL Server 2005).
|||

Hi Jay,

Earlier We were using sql server name now we have changes that to IP address,

we have saved the password in the "Oledb Destination connection" by checking in the checkbox to save the password.

now we are getting the following Error

"An OLE DB error has occurred. Error code: 0x80040E4D.\r\nAn OLE DB record is available. Source: \"Microsoft OLE DB Provider for SQL Server\" Hresult: 0x80040E4D Description: \"Login failed for user 'sa'.\".\r\n"

|||

Subin wrote:

"An OLE DB error has occurred. Error code: 0x80040E4D.\r\nAn OLE DB record is available. Source: \"Microsoft OLE DB Provider for SQL Server\" Hresult: 0x80040E4D Description: \"Login failed for user 'sa'.\".\r\n"

I've already answered that one today, so all you get is a link.

See if this helps.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1453667&SiteID=1
|||

Subin wrote:

"An OLE DB error has occurred. Error code: 0x80040E4D.\r\nAn OLE DB record is available. Source: \"Microsoft OLE DB Provider for SQL Server\" Hresult: 0x80040E4D Description: \"Login failed for user 'sa'.\".\r\n"

Are you intending to be logging in as the user 'sa'?|||

Subin wrote:

Hello all,

I am trying to execute the ssis packages using code.These packages are hosted on remote server under MSDB in local Network.

...

To clarify possible confusion: you are not executing the package on a remote machine (as the title of your question suggests).

You are loading package from a remote machine and running it locally (where your application runs).

http://blogs.msdn.com/michen/archive/2006/08/11/package-exec-location.aspx

Michael.

|||

Hello Michael,

You are absolutely correct. Sorry for confusion.

I am not executing the package on a remote machine (as the title of question suggests),loading package from a remote machine and running it locally (where my application runs).

Thanks

Subin

|||

Hello All,

Thank you all for help.

I have solved the problem.

The package which i had tried to execute was a password protected package and I was not setting the PackagePassword property of Application class before loading package from remote machine. So that the loaded package does not have sensitive information. That was the problem.

Application app = new Application();

app.PackagePassword = "test";

Package package = app.LoadFromSqlServer(@."PackTest", "Circle-DotNet57", "ssisdeveloper", "circle_123", null);

//package.ProtectionLevel = DTSProtectionLevel.EncryptSensitiveWithPassword;

//package.PackagePassword = "test";

DTSExecResult result = package.Execute();

Thank you

Subin

Monday, March 19, 2012

Error on deleting SQL/MSDE database

Hi,
On calling the source attached below to drop sql database, I get the
following error randomly,
"Cannot detach the database 'DBNAME' because it is currently in use.
[Microsoft OLE DB Provider for SQL Server]"
I am not sure what am I doing wrong here.
Any pointers in this regard will be appreciated.
Regards,
Usman
con.Execute "use master"
' Get list of processes blocking this catalog and try to
kill all them
Set rs = con.Execute("sp_who2", , adCmdStoredProc)
If Err.Number = 0 And Not rs Is Nothing Then
While Not rs.EOF
If StrComp(rs("dbname"), sCatalog, vbTextCompare)
= 0 Then
con.Execute "kill " & rs("spid")
' Ignore errors
Err.Clear
End If
rs.MoveNext
Wend
rs.Close
End If
con.Execute "sp_detach_db('" & sCatalog & "', 'true')", ,
adCmdStoredProc ''''''''$$$$$$$$$$$$$$$
Hello,
Do the below command from ISQL window
USE MASTER
GO
ALTER DATABASE <DBNAME> Set SINGLE_USER with Rollback Immediate
GO
DROP Database <dbname>
Thanks
Hari
"Usman" <khanusman@.gmail.com> wrote in message
news:1170770913.673583.11240@.s48g2000cws.googlegro ups.com...
> Hi,
> On calling the source attached below to drop sql database, I get the
> following error randomly,
> "Cannot detach the database 'DBNAME' because it is currently in use.
> [Microsoft OLE DB Provider for SQL Server]"
> I am not sure what am I doing wrong here.
> Any pointers in this regard will be appreciated.
> Regards,
> Usman
>
> con.Execute "use master"
> ' Get list of processes blocking this catalog and try to
> kill all them
> Set rs = con.Execute("sp_who2", , adCmdStoredProc)
> If Err.Number = 0 And Not rs Is Nothing Then
> While Not rs.EOF
> If StrComp(rs("dbname"), sCatalog, vbTextCompare)
> = 0 Then
> con.Execute "kill " & rs("spid")
> ' Ignore errors
> Err.Clear
> End If
> rs.MoveNext
> Wend
> rs.Close
> End If
> con.Execute "sp_detach_db('" & sCatalog & "', 'true')", ,
> adCmdStoredProc ''''''''$$$$$$$$$$$$$$$
>

Error on Attaching Database

When attaching a database that was detached from another SQL Server instance.

I got the error message below:

Error 602: Could not find row in sysindexes for database ID 25, object ID 1,
index ID 1. Run DBCC CHECKTABLE on sysindexes.

i am using SQL Server 2000

Thanks and Regards

Was the database you attached from a SQL Server 2005 server? I get that error if I attach a 2005 database to a 2000 SQL Server.

I don't know at this time thought if we are suppose to be able to attach a SQL 2005 database to a SQL 2000 server even if we keep it compatable.|||I also get this error when detaching a database from SQL Server 2005 and attaching to SQL Server 2000. Not sure what Microsoft's recommendation is or how to determine what might have changed in the schema to make it no longer compatible with SQL Server 2000.|||

I just hope somebody would help solve this prob coz i do have the same prob.

I can't attach a database from sql2005 back to sql2000 and it's giving me a lot of headache!

I got loads of work to do and this prob is eating my time.

Help!

|||You can't attach a 2005 database to 2000. The best you can do here is to export the data from the 2005 database and import into a 2000 database.|||It's not possible to take a sql2k5 database and attach it to sql2k. The meta data has changed drasticly on sql2k5. The change cannot be understood by sql2k.

Your only option is to export/import to transfer data between the versions.|||You cannot attach a SQL Server 2005 database to SQL Server 2000 - even if this used to be a SQL Server 2000 database attached to SQL Server 2005 and attaching it back to SQL Server 2000. SQL Server 2005 changes some system objects which SQL Server 2000 does not have.|||If this is the case what is the reason for the compatability level. When I run sp_dbcmptlevel 'database' I get an 80, after I have made changes to the database with 2005 (80 is 2000, 90 is 2005). I was under the impression from a Microsoft person that this was something that could be done. I would like to do this incase we have major problems in Production after the upgrade to 2005. I have a lot of data in 50+ tables. import/Export would not be a good solution. Anyone from Microsoft care to chime in.|||Database compatibility has little to do with the changes in meta data. dbcmptlevel is set to allow sql2k5 to run the database at the current or lower settings.

This issue is very much not isolated. It's the same if you take a Mpeg4 file and try to play it with a Mpeg2 player. It just doesn't work.|||

I think upward compatibility doesn't work.

|||Why would you be passing around databases between in sql2000 and sql2005 in the first place? Detaching, moving, and attaching a database is a fairly rare occurrence to us.|||

JonM wrote:

Why would you be passing around databases between in sql2000 and sql2005 in the first place? Detaching, moving, and attaching a database is a fairly rare occurrence to us.

Jon,

With all due respect, what's it matter the reason for doing so? Whether it's a rare occurance or not, it's still a known issue that obviously many people have a problem with.

Now, you asked for a reason, so here's my scenerio.

I had a database driven website designed by an outside company, to be hosted by myself internally. The company that designed the site designed the DB in 2005 while I have SQL 2000.

Do you have any comments or resolution that may be of assistance to me / us?

Thank you.

Chris

|||

reason 1

because the host provider has stated there is a problem with your database. You do not have a local copy. They take you off line and tell you to fix it and send you a 2005 mbf file.....You only have sql 2003

|||

It sounds like you mainly want to perform maintenance or troubleshoot your sql server 2005 database and then send it back to your webhost that will run in it production. With this in mind I would recommend the following options:

1. Download the SQL Server 2005 Express Edition with Advanced Tools.

It includes the sql management studio which you can use to attach, detach, and manipulate your sql 2005 databases.

2. Buy a copy of SQL Server 2005 Developer Edition

This is a fairly cheap version of SQL Server and it has the functionality of enterprise edition. It is perfect for developing, troubleshooting and testing. It is also available in most MSDN Subscription levels. However, if you are only using the OLTP databse (which many of us are), I would simply recommend Express Edition.

3. Ask your webdesigner to migrate it to SQL Server 2000

If SQL 2000 is a design requirement, ask them if they could convert it over for you. It should not be that difficult, unless we are talking about a massive web application with hundreds of stored procedures.

|||

I've loaded the sql server 2005 express, I do have the sql 2005 server but I have to figure out how to run install with a script as I have 2000 on my machine.....

I can not figure out how to run a maintenance using this express version to save my life....Is anyone willing to give me a hand? I sure would apprieciate it.

Error on Attaching Database

When attaching a database that was detached from another SQL Server instance.

I got the error message below:

Error 602: Could not find row in sysindexes for database ID 25, object ID 1,
index ID 1. Run DBCC CHECKTABLE on sysindexes.

i am using SQL Server 2000

Thanks and Regards

Was the database you attached from a SQL Server 2005 server? I get that error if I attach a 2005 database to a 2000 SQL Server.

I don't know at this time thought if we are suppose to be able to attach a SQL 2005 database to a SQL 2000 server even if we keep it compatable.|||I also get this error when detaching a database from SQL Server 2005 and attaching to SQL Server 2000. Not sure what Microsoft's recommendation is or how to determine what might have changed in the schema to make it no longer compatible with SQL Server 2000.|||

I just hope somebody would help solve this prob coz i do have the same prob.

I can't attach a database from sql2005 back to sql2000 and it's giving me a lot of headache!

I got loads of work to do and this prob is eating my time.

Help!

|||You can't attach a 2005 database to 2000. The best you can do here is to export the data from the 2005 database and import into a 2000 database.|||It's not possible to take a sql2k5 database and attach it to sql2k. The meta data has changed drasticly on sql2k5. The change cannot be understood by sql2k.

Your only option is to export/import to transfer data between the versions.|||You cannot attach a SQL Server 2005 database to SQL Server 2000 - even if this used to be a SQL Server 2000 database attached to SQL Server 2005 and attaching it back to SQL Server 2000. SQL Server 2005 changes some system objects which SQL Server 2000 does not have.|||If this is the case what is the reason for the compatability level. When I run sp_dbcmptlevel 'database' I get an 80, after I have made changes to the database with 2005 (80 is 2000, 90 is 2005). I was under the impression from a Microsoft person that this was something that could be done. I would like to do this incase we have major problems in Production after the upgrade to 2005. I have a lot of data in 50+ tables. import/Export would not be a good solution. Anyone from Microsoft care to chime in.|||Database compatibility has little to do with the changes in meta data. dbcmptlevel is set to allow sql2k5 to run the database at the current or lower settings.

This issue is very much not isolated. It's the same if you take a Mpeg4 file and try to play it with a Mpeg2 player. It just doesn't work.|||

I think upward compatibility doesn't work.

|||Why would you be passing around databases between in sql2000 and sql2005 in the first place? Detaching, moving, and attaching a database is a fairly rare occurrence to us.|||

JonM wrote:

Why would you be passing around databases between in sql2000 and sql2005 in the first place? Detaching, moving, and attaching a database is a fairly rare occurrence to us.

Jon,

With all due respect, what's it matter the reason for doing so? Whether it's a rare occurance or not, it's still a known issue that obviously many people have a problem with.

Now, you asked for a reason, so here's my scenerio.

I had a database driven website designed by an outside company, to be hosted by myself internally. The company that designed the site designed the DB in 2005 while I have SQL 2000.

Do you have any comments or resolution that may be of assistance to me / us?

Thank you.

Chris

|||

reason 1

because the host provider has stated there is a problem with your database. You do not have a local copy. They take you off line and tell you to fix it and send you a 2005 mbf file.....You only have sql 2003

|||

It sounds like you mainly want to perform maintenance or troubleshoot your sql server 2005 database and then send it back to your webhost that will run in it production. With this in mind I would recommend the following options:

1. Download the SQL Server 2005 Express Edition with Advanced Tools.

It includes the sql management studio which you can use to attach, detach, and manipulate your sql 2005 databases.

2. Buy a copy of SQL Server 2005 Developer Edition

This is a fairly cheap version of SQL Server and it has the functionality of enterprise edition. It is perfect for developing, troubleshooting and testing. It is also available in most MSDN Subscription levels. However, if you are only using the OLTP databse (which many of us are), I would simply recommend Express Edition.

3. Ask your webdesigner to migrate it to SQL Server 2000

If SQL 2000 is a design requirement, ask them if they could convert it over for you. It should not be that difficult, unless we are talking about a massive web application with hundreds of stored procedures.

|||

I've loaded the sql server 2005 express, I do have the sql 2005 server but I have to figure out how to run install with a script as I have 2000 on my machine.....

I can not figure out how to run a maintenance using this express version to save my life....Is anyone willing to give me a hand? I sure would apprieciate it.

Error on Attaching Database

When attaching a database that was detached from another SQL Server instance.

I got the error message below:

Error 602: Could not find row in sysindexes for database ID 25, object ID 1,
index ID 1. Run DBCC CHECKTABLE on sysindexes.

i am using SQL Server 2000

Thanks and Regards

Was the database you attached from a SQL Server 2005 server? I get that error if I attach a 2005 database to a 2000 SQL Server.

I don't know at this time thought if we are suppose to be able to attach a SQL 2005 database to a SQL 2000 server even if we keep it compatable.|||I also get this error when detaching a database from SQL Server 2005 and attaching to SQL Server 2000. Not sure what Microsoft's recommendation is or how to determine what might have changed in the schema to make it no longer compatible with SQL Server 2000.|||

I just hope somebody would help solve this prob coz i do have the same prob.

I can't attach a database from sql2005 back to sql2000 and it's giving me a lot of headache!

I got loads of work to do and this prob is eating my time.

Help!

|||You can't attach a 2005 database to 2000. The best you can do here is to export the data from the 2005 database and import into a 2000 database.|||It's not possible to take a sql2k5 database and attach it to sql2k. The meta data has changed drasticly on sql2k5. The change cannot be understood by sql2k.

Your only option is to export/import to transfer data between the versions.|||You cannot attach a SQL Server 2005 database to SQL Server 2000 - even if this used to be a SQL Server 2000 database attached to SQL Server 2005 and attaching it back to SQL Server 2000. SQL Server 2005 changes some system objects which SQL Server 2000 does not have.|||If this is the case what is the reason for the compatability level. When I run sp_dbcmptlevel 'database' I get an 80, after I have made changes to the database with 2005 (80 is 2000, 90 is 2005). I was under the impression from a Microsoft person that this was something that could be done. I would like to do this incase we have major problems in Production after the upgrade to 2005. I have a lot of data in 50+ tables. import/Export would not be a good solution. Anyone from Microsoft care to chime in.|||Database compatibility has little to do with the changes in meta data. dbcmptlevel is set to allow sql2k5 to run the database at the current or lower settings.

This issue is very much not isolated. It's the same if you take a Mpeg4 file and try to play it with a Mpeg2 player. It just doesn't work.|||

I think upward compatibility doesn't work.

|||Why would you be passing around databases between in sql2000 and sql2005 in the first place? Detaching, moving, and attaching a database is a fairly rare occurrence to us.|||

JonM wrote:

Why would you be passing around databases between in sql2000 and sql2005 in the first place? Detaching, moving, and attaching a database is a fairly rare occurrence to us.

Jon,

With all due respect, what's it matter the reason for doing so? Whether it's a rare occurance or not, it's still a known issue that obviously many people have a problem with.

Now, you asked for a reason, so here's my scenerio.

I had a database driven website designed by an outside company, to be hosted by myself internally. The company that designed the site designed the DB in 2005 while I have SQL 2000.

Do you have any comments or resolution that may be of assistance to me / us?

Thank you.

Chris

|||

reason 1

because the host provider has stated there is a problem with your database. You do not have a local copy. They take you off line and tell you to fix it and send you a 2005 mbf file.....You only have sql 2003

|||

It sounds like you mainly want to perform maintenance or troubleshoot your sql server 2005 database and then send it back to your webhost that will run in it production. With this in mind I would recommend the following options:

1. Download the SQL Server 2005 Express Edition with Advanced Tools.

It includes the sql management studio which you can use to attach, detach, and manipulate your sql 2005 databases.

2. Buy a copy of SQL Server 2005 Developer Edition

This is a fairly cheap version of SQL Server and it has the functionality of enterprise edition. It is perfect for developing, troubleshooting and testing. It is also available in most MSDN Subscription levels. However, if you are only using the OLTP databse (which many of us are), I would simply recommend Express Edition.

3. Ask your webdesigner to migrate it to SQL Server 2000

If SQL 2000 is a design requirement, ask them if they could convert it over for you. It should not be that difficult, unless we are talking about a massive web application with hundreds of stored procedures.

|||

I've loaded the sql server 2005 express, I do have the sql 2005 server but I have to figure out how to run install with a script as I have 2000 on my machine.....

I can not figure out how to run a maintenance using this express version to save my life....Is anyone willing to give me a hand? I sure would apprieciate it.

Error on attaching a database

When attaching a database that was detached from another SQL Server instance(copied raw .mdf and ldf files)..

I got the error message below:

Error 602: Could not find row in sysindexes for database ID 25, object ID 1,
index ID 1. Run DBCC CHECKTABLE on sysindexes.

how can i solve this problem. i am using SQL Server 2000

Thanks and Regards

hi,

Could you be more specific. How did you detached the your database? Did you do it by backup and restore or copy the .mdf and .ldf file and attached.

Michael Castillones

|||

hai oblax77

I copied raw .mdf and ldf files.

Regards

|||

hi,

Maybe your database was corrupted because the errors includes the system indexes already.

Sunday, February 26, 2012

Error Message.....

I am using SQL 2K.
I am calling the below SQL statement as one of the SQL task in one of the
step.
EXEC SP_CYCLE_ERRORLOG
I am getting the attached message.
How to solve it?
Thanks,
Alok
Below is the error message.
"EXCUTE permission denied on object 'sp_cycle_errolog', database
'master',owner 'dbo'"
Alok Choudhary wrote:
> I am using SQL 2K.
> I am calling the below SQL statement as one of the SQL task in one of
> the step.
> EXEC SP_CYCLE_ERRORLOG
> I am getting the attached message.
> How to solve it?
> Thanks,
> Alok
> Below is the error message.
> "EXCUTE permission denied on object 'sp_cycle_errolog', database
> 'master',owner 'dbo'"
Your user id does not have rights to execute that procedure because you
are probably not a system administrator. Admin rights are required.
David Gugick
Imceda Software
www.imceda.com
|||What server roles are you a member of? sp_cycle_errorlog is sysadmin only.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Alok Choudhary" <AC_Ind@.hotmail.com> wrote in message
news:eCsUogNCFHA.1396@.TK2MSFTNGP14.phx.gbl...
> I am using SQL 2K.
> I am calling the below SQL statement as one of the SQL task in one of the
> step.
> EXEC SP_CYCLE_ERRORLOG
> I am getting the attached message.
> How to solve it?
> Thanks,
> Alok
> Below is the error message.
> "EXCUTE permission denied on object 'sp_cycle_errolog', database
> 'master',owner 'dbo'"
>
>

Error Message.....

I am using SQL 2K.
I am calling the below SQL statement as one of the SQL task in one of the
step.
EXEC SP_CYCLE_ERRORLOG
I am getting the attached message.
How to solve it?
Thanks,
Alok
Below is the error message.
"EXCUTE permission denied on object 'sp_cycle_errolog', database
'master',owner 'dbo'"Alok Choudhary wrote:
> I am using SQL 2K.
> I am calling the below SQL statement as one of the SQL task in one of
> the step.
> EXEC SP_CYCLE_ERRORLOG
> I am getting the attached message.
> How to solve it?
> Thanks,
> Alok
> Below is the error message.
> "EXCUTE permission denied on object 'sp_cycle_errolog', database
> 'master',owner 'dbo'"
Your user id does not have rights to execute that procedure because you
are probably not a system administrator. Admin rights are required.
David Gugick
Imceda Software
www.imceda.com|||What server roles are you a member of? sp_cycle_errorlog is sysadmin only.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Alok Choudhary" <AC_Ind@.hotmail.com> wrote in message
news:eCsUogNCFHA.1396@.TK2MSFTNGP14.phx.gbl...
> I am using SQL 2K.
> I am calling the below SQL statement as one of the SQL task in one of the
> step.
> EXEC SP_CYCLE_ERRORLOG
> I am getting the attached message.
> How to solve it?
> Thanks,
> Alok
> Below is the error message.
> "EXCUTE permission denied on object 'sp_cycle_errolog', database
> 'master',owner 'dbo'"
>
>