Showing posts with label creating. Show all posts
Showing posts with label creating. Show all posts

Tuesday, March 27, 2012

Error installing SQL 2000 on W2k3 cluster

When installing SQL 2000 on a W2K3 cluster, I get the following error: An
error occurred while creating virtual server resources for clustering.
Cluster specific registry entries couldn't be written. I followed the
instructions in KB872931 and I get the same results. Can anyone assist?
Kevin
All,
Never mind. starting the remote registry service on all nodes fixed the
problem.
Kevin
"Kevin Wheeler" <kevin.l.wheeler@.lmco.com> wrote in message
news:OMeIGELyEHA.2192@.TK2MSFTNGP14.phx.gbl...
> When installing SQL 2000 on a W2K3 cluster, I get the following error: An
> error occurred while creating virtual server resources for clustering.
> Cluster specific registry entries couldn't be written. I followed the
> instructions in KB872931 and I get the same results. Can anyone assist?
>
> Kevin
>
|||Kevin,
The error message "An error occurred while creating virtual server resources for clustering. Cluster specific registry entries couldn't be written" occurs when the SQL Server 2000 virtual server Setup program tries to
create the virtual server resources on the remote nodes in the failover cluster.
The KB872931 will be helpful only if your sqlstp.log had the errors as written in the MORE INFORMATION section of the KB.
Give us more information to be able to help you out.
Few qs that comes to mind :
1) Do you have Teminal Services installed on Win2K3 nodes? If yes, the you need to remove it. See KB 301520
2) Are you installing a named instance or a default instance of SQL2K virtual instance? If named instance, have created a named pipe alias for the server name as per KB 815431
3) Do you have mount volumes in the cluster? They are not supported for SQL 2K virtual instance. See KB 819546
4) Paste the sqlstp.log for us to look at
Interested in troubleshooting it yourself
Troubleshooting SQL 2000 Virtual Server and Service Pack Setups for Failover Clustering
http://support.microsoft.com/default...lurb020703.asp
Upcoming Webcast
TechNet Support WebCast: How to install a Microsoft SQL Server 2000 virtual server on a Microsoft Windows Server 2003 cluster
Discusses how to install Microsoft SQL Server 2000 clustering on Microsoft Windows Server 2003 and differences between Microsoft Windows 2000 Server and Windows Server 2003.
http://support.microsoft.com/default...b;en-us;888121
Best Regards,
Uttam Parui
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their Microsoft software to better protect against viruses and security vulnerabilities. The easiest way to do this is to visit the following websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx
|||I understand that. I guess it need access to the remote nodes registry.
When the remote registry service was disabled, the install failed. When I
enabled it, the install completed with no errors.
Kevin
"Uttam Parui[MS]" <uttamkp@.online.microsoft.com> wrote in message
news:tPwDvzMyEHA.3436@.cpmsftngxa10.phx.gbl...
> Kevin,
> The error message "An error occurred while creating virtual server
resources for clustering. Cluster specific registry entries couldn't be
written" occurs when the SQL Server 2000 virtual server Setup program tries
to
> create the virtual server resources on the remote nodes in the failover
cluster.
> The KB872931 will be helpful only if your sqlstp.log had the errors as
written in the MORE INFORMATION section of the KB.
> Give us more information to be able to help you out.
> Few qs that comes to mind :
> 1) Do you have Teminal Services installed on Win2K3 nodes? If yes, the you
need to remove it. See KB 301520
> 2) Are you installing a named instance or a default instance of SQL2K
virtual instance? If named instance, have created a named pipe alias for the
server name as per KB 815431
> 3) Do you have mount volumes in the cluster? They are not supported for
SQL 2K virtual instance. See KB 819546
> 4) Paste the sqlstp.log for us to look at
> Interested in troubleshooting it yourself
> Troubleshooting SQL 2000 Virtual Server and Service Pack Setups for
Failover Clustering
>
http://support.microsoft.com/default...ebcasts/wcd020
703/wcdblurb020703.asp
> Upcoming Webcast
> TechNet Support WebCast: How to install a Microsoft SQL Server 2000
virtual server on a Microsoft Windows Server 2003 cluster
> Discusses how to install Microsoft SQL Server 2000 clustering on
Microsoft Windows Server 2003 and differences between Microsoft Windows 2000
Server and Windows Server 2003.
> http://support.microsoft.com/default...b;en-us;888121
> Best Regards,
> Uttam Parui
> Microsoft Corporation
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
> Microsoft highly recommends that users with Internet access update their
Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
> http://www.microsoft.com/protect
> http://www.microsoft.com/security/guidance/default.mspx
>
|||Glad to hear that you resolved the issue. You are correct. The "Remote Registry" service needs to be running on all cluster nodes during the installation.
Best Regards,
Uttam Parui
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection Program and to order your FREE Security Tool Kit, please visit http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their Microsoft software to better protect against viruses and security vulnerabilities. The easiest way to do this is to visit the following websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx

Thursday, March 22, 2012

Error in Stored Procedure while working with temp. table

Creating a temporary table in stored procedure and using a sql query to insert the data in temp. table.I am facing the error as :

String or binary data would be truncated.The statement has been terminated.

The procedure i created is as :

ALTER PROCEDUREfetchpersondetails

AS

CREATE Table#tempperson (personIDint,FirstNamenvarchar(200),LastNamenvarchar(250),titlenvarchar(150),Professionnvarchar(200),StreetAddressnvarchar(300),

StateAddressnvarchar(200),CityAddressnvarchar(200),CountryAddressnvarchar(200),ZipAddressnvarchar(200),Telephonenvarchar(200),Mobilenvarchar(200),

Faxnvarchar(200),Emailnvarchar(250),NotesPubntext,Affiliationnvarchar(200),Categorynvarchar(200))

Insert into#tempperson

SELECTdbo.tblperson.personID,ISNULL(dbo.tblperson.fName, N'') +' '+ISNULL(dbo.tblperson.mName, N'')ASFirstName, dbo.tblperson.lnameASLastName,

dbo.tblperson.honorASTitle, dbo.tblperson.titleASProfession, dbo.tblperson.street +' '+ISNULL(dbo.tblperson.suite, N'')ASStreetAddress,

dbo.tblperson.cityAScityaddress, dbo.tblperson.stateASstateaddress, dbo.tblperson.postalCodeASzipaddress,

dbo.tblperson.Phone1 +','+ISNULL(dbo.tblperson.Phone2, N'') +','+ISNULL(dbo.tblperson.Phone3, N'')ASTelephone,

dbo.tblperson.mobilePhoneASmobile, dbo.tblperson.officeFax +','+ISNULL(dbo.tblperson.altOfficeFax, N'') +','+ISNULL(dbo.tblperson.altOfficeFax2,

N'')ASFax,ISNULL(dbo.tblperson.Email1, N'') +','+ISNULL(dbo.tblperson.Email2, N'') +','+ISNULL(dbo.tblperson.Email3, N'')ASEmail,

dbo.tblperson.notesASNotesPub, dbo.tblOrganizations.orgNameASAffiliation, dbo.tblOrganizations.orgCategoryASCategory,

dbo.tblCountry.countryNameFullAScountryaddress

FROMdbo.tblpersonINNER JOIN

dbo.tblOrganizationsONdbo.tblperson.orgID = dbo.tblOrganizations.orgIDINNER JOIN

dbo.tblCountryONdbo.tblperson.countryCode = dbo.tblCountry.ISOCode

please let me know the solurion of this error.

What the error msg means is that you are trying to insert a value that is larger than what the column can take. Check your column lengths in the temp table and the data coming in from your SELECT statment. Apparently, you have crossed the limit somewhere.

|||

I made it working.Its not the column length that creating problem.

Sunday, March 11, 2012

Error in Programming DTS using VB.net

Hi ,

i am using VS.NET 2003 for programming and SQL sever 2005 is my database.

while creating DTS packages,

i am using code as follows

Public Sub Task_Sub4(ByVal goPackage As Object)

Dim oTask As DTS.Task

Dim oLookup As DTS.Lookup

Dim oCustomTask4 As DTS.DataPumpTask2

oTask = CType(goPackage, DTS.Package).Tasks.New("DTSExecuteSQLTask")

oCustomTask4 = CType(oTask.CustomTask, DTS.DataPumpTask2)

oCustomTask4.Name = "Copy Data from contact_info to [content_shriya].[dbo].contact_info] Task"

oCustomTask4.Description = "Copy Data from contact_info to [content_shriya].[dbo].[contact_info] Task"

oCustomTask4.SourceConnectionID = 3

oCustomTask4.SourceSQLStatement = "select * from [Content_management].[dbo].[contact_info]"

oCustomTask4.DestinationConnectionID = 4

oCustomTask4.DestinationObjectName = "[content_shriya].[dbo].[contact_info]"

oCustomTask4.ProgressRowCount = 1000

oCustomTask4.MaximumErrorCount = 0

oCustomTask4.FetchBufferSize = 1

oCustomTask4.UseFastLoad = True

oCustomTask4.InsertCommitSize = 0

oCustomTask4.ExceptionFileColumnDelimiter = "|"

oCustomTask4.ExceptionFileRowDelimiter = vbCrLf

oCustomTask4.AllowIdentityInserts = False

oCustomTask4.FirstRow = 0

oCustomTask4.LastRow = 0

oCustomTask4.FastLoadOptions = 2

oCustomTask4.ExceptionFileOptions = 1

oCustomTask4.DataPumpOptions = 0

'Call oCustomTask4_Trans_Sub1(oCustomTask4)

goPackage.Tasks.Add(oTask)

oCustomTask4 = Nothing

oTask = Nothing

End Sub

But i am geeting error in line

oCustomTask4 = CType(oTask.CustomTask, DTS.DataPumpTask2)

giving error 'System.InvalidCastException'

Additional information: Specified cast is not valid.

i changed it with oCustomTask4 = oTask.CustomTask ,

then also similar error appear.

Please solve my problem, i need to create DTS Packages by using VS.NET 2003 and Database is SQL server 2005.

Thank you

You might have better success posting this in the DTS forum.

I'm not an expert in DTS programming, but since you created oTask as an ExecuteSQLTask, I don't think you can cast it to a DataPumpTask. You need to create it as a DataPumpTask.

|||

Thank you Jhon the code works.

|||Mark the response that was helpful as an answer, please. It helps with searching in the forum.

Error in MS Stored Procedure

I am current creating a Oracle membership provider in dotnet based on the MS membership provider. One of the stored procedures that need converting is shown below. The variable UserId (highlighted blue) is declare and never assigned to but is used within the update query also highlighted in blue. If this is an oversight then I presume that this part of the stored procedure is never actually executed. Can somebody put an eye over this code to confirm.

Thanks.

ALTER PROCEDURE [dbo].[aspnet_Membership_GetUserByName]
@.ApplicationName nvarchar(256),
@.UserName nvarchar(256),
@.CurrentTimeUtc datetime,
@.UpdateLastActivity bit = 0
AS
BEGIN
DECLARE @.UserId uniqueidentifier

IF (@.UpdateLastActivity = 1)
BEGIN
SELECT TOP 1 m.Email, m.PasswordQuestion, m.Comment, m.IsApproved,
m.CreateDate, m.LastLoginDate, @.CurrentTimeUtc, m.LastPasswordChangedDate,
u.UserId, m.IsLockedOut,m.LastLockoutDate
FROM dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m
WHERE LOWER(@.ApplicationName) = a.LoweredApplicationName AND
u.ApplicationId = a.ApplicationId AND
LOWER(@.UserName) = u.LoweredUserName AND u.UserId = m.UserId

IF (@.@.ROWCOUNT = 0) -- Username not found
RETURN -1

UPDATE dbo.aspnet_Users
SET LastActivityDate = @.CurrentTimeUtc
WHERE @.UserId = UserId
END
ELSE
BEGIN
SELECT TOP 1 m.Email, m.PasswordQuestion, m.Comment, m.IsApproved,
m.CreateDate, m.LastLoginDate, u.LastActivityDate, m.LastPasswordChangedDate,
u.UserId, m.IsLockedOut,m.LastLockoutDate
FROM dbo.aspnet_Applications a, dbo.aspnet_Users u, dbo.aspnet_Membership m
WHERE LOWER(@.ApplicationName) = a.LoweredApplicationName AND
u.ApplicationId = a.ApplicationId AND
LOWER(@.UserName) = u.LoweredUserName AND u.UserId = m.UserId

IF (@.@.ROWCOUNT = 0) -- Username not found
RETURN -1
END

RETURN 0
END

It is a bug in the code. The code is wrong and there are other problems with the logic. You should file a bug at http://connect.microsoft.com.

Friday, March 9, 2012

Error in installing SQL server 2k

I am getting error when installing SQL server 2K Developer Ed in Win XP. It
shows “An error occurred while creating one or more registry entries. The
problem could be caused by a low registry quota”.
Hope some one can give me some hints.
Thanks,
Eltonhave you try to clean out your registry, or verify it for errors.
Santos Martinez,MCSE, MCDBA, MCTS
IT Community Staff of Puerto Rico
http://www.itcspr.org
"Elton W" wrote:

> I am getting error when installing SQL server 2K Developer Ed in Win XP. I
t
> shows “An error occurred while creating one or more registry entries. Th
e
> problem could be caused by a low registry quota”.
> Hope some one can give me some hints.
> Thanks,
> Elton
>|||Hi Santos,
Thanks for your reply.
Because we don’t want to make thing too complicated, we finally decided to
reinstall OS then install SQL server 2K.
Anyway, thank you.
Elton
"Santos Martinez" wrote:
[vbcol=seagreen]
> have you try to clean out your registry, or verify it for errors.
> --
> Santos Martinez,MCSE, MCDBA, MCTS
> IT Community Staff of Puerto Rico
> http://www.itcspr.org
>
> "Elton W" wrote:
>

Error in installing SQL server 2k

I am getting error when installing SQL server 2K Developer Ed in Win XP. It
shows â'An error occurred while creating one or more registry entries. The
problem could be caused by a low registry quotaâ'.
Hope some one can give me some hints.
Thanks,
Eltonhave you try to clean out your registry, or verify it for errors.
--
Santos Martinez,MCSE, MCDBA, MCTS
IT Community Staff of Puerto Rico
http://www.itcspr.org
"Elton W" wrote:
> I am getting error when installing SQL server 2K Developer Ed in Win XP. It
> shows â'An error occurred while creating one or more registry entries. The
> problem could be caused by a low registry quotaâ'.
> Hope some one can give me some hints.
> Thanks,
> Elton
>|||Hi Santos,
Thanks for your reply.
Because we donâ't want to make thing too complicated, we finally decided to
reinstall OS then install SQL server 2K.
Anyway, thank you.
Elton
"Santos Martinez" wrote:
> have you try to clean out your registry, or verify it for errors.
> --
> Santos Martinez,MCSE, MCDBA, MCTS
> IT Community Staff of Puerto Rico
> http://www.itcspr.org
>
> "Elton W" wrote:
> > I am getting error when installing SQL server 2K Developer Ed in Win XP. It
> > shows â'An error occurred while creating one or more registry entries. The
> > problem could be caused by a low registry quotaâ'.
> >
> > Hope some one can give me some hints.
> >
> > Thanks,
> >
> > Elton
> >
> >

Friday, February 24, 2012

Error in Creating table in Sql server 2000

AA!

I am having problems on creating table through Enterprise Manager. It
gives me Error 1038 i.e. is as follows

Unexpected Error

ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot use
empty object
or column names. Use a single space if necessary.--[zainy]-- (zainys@.gmail.com) writes:

Quote:

Originally Posted by

I am having problems on creating table through Enterprise Manager. It
gives me Error 1038 i.e. is as follows
>
Unexpected Error
>
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot use
empty object
or column names. Use a single space if necessary.


Don't create tables through EM. Use CREATE TABLE instead. That pays off in
the long run.

Apparently you did something you shouldn't have done, but without more
information it's impossible to say.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Erland Sommarskog wrote:

Quote:

Originally Posted by

--[zainy]-- (zainys@.gmail.com) writes:

Quote:

Originally Posted by

I am having problems on creating table through Enterprise Manager. It
gives me Error 1038 i.e. is as follows

Unexpected Error

ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot use
empty object
or column names. Use a single space if necessary.


>
Don't create tables through EM. Use CREATE TABLE instead. That pays off in
the long run.
>
Apparently you did something you shouldn't have done, but without more
information it's impossible to say.
>
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
>
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx


When i right click on table Tag(In EM) under my database and select New
Table then it gives me that error...

It works fine on my other PCs which i installed with the same version
of SQL SERVER 2000...
This error persists on 2nd install as well...|||--[zainy]-- (zainys@.gmail.com) writes:

Quote:

Originally Posted by

When i right click on table Tag(In EM) under my database and select New
Table then it gives me that error...
>
It works fine on my other PCs which i installed with the same version
of SQL SERVER 2000...
This error persists on 2nd install as well...


Interesting...

And you access the same database from the PCs where it works?

The only tip I can give is that you run a Profiler trace when you click
on New Table, and then try to find out how the failing command looks like.
You should add TSQL:BatchStarting and RPC:Starting to the default events.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Error in Creating Stored Procedure from VS 2005

When I create a stored procedure in VS 2005 using C# and deploy it to the server I can't execute it there and here is the error message:

Msg 6522, Level 16, State 1, Procedure GetAll, Line 0

A .NET Framework error occurred during execution of user defined routine or aggregate 'GetAll':

System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

System.Security.SecurityException:

at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)

at System.Security.PermissionSet.Demand()

at System.Data.Common.DbConnectionOptions.DemandPermission()

at System.Data.SqlClient.SqlConnection.PermissionDemand()

at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)

at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

at System.Data.SqlClient.SqlConnection.Open()

at StoredProcedures.GetAll()

and the code for creating the stored procedure is:

SqlConnection connDB = new SqlConnection(@."Initial Catalog=MDB;Data Source=Server1;");

SqlCommand cmd = new SqlCommand();

cmd.Connection = connDB;

cmd.CommandText = "SELECT * FROM Modifier";

connDB.Open();

SqlDataReader rdr = cmd.ExecuteReader();

SqlContext.Pipe.Send(rdr);

rdr.Close();

connDB.Close();

your help is appreciated...

What is the permission_set that you assigned for the assembly? This is the one in the CREATE ASSEMBLY. You need to set it to EXTERNAL_ACCESS due to use of SqlConnection that is accessing remote resource. Additionally, you will have to enable TRUST_WORTHY bit (use with care) or do the recommended key based login creation & assign external access assembly permission to it and use that user as owner of the assembly. If you download the new version of SQL Server 2005 Books Online it should contain updated topics that show how to do this. If you need some examples, please post back and I will try to locate a sample for you.|||

I am getting the same error when trying to debug my stored procedure. How do I get around int?

Here's my code:

Try

Dim conn As SqlConnection = New SqlConnection

conn.ConnectionString = "Data Source=XXX-XXXX\SQLSERVER2005;Initial Catalog=MotorFleetConversion;User ID=xxxx;password=xxxx"

conn.Open()

command = New SqlCommand(sqlAction)

'command.Parameters.AddWithValue("@.rating", rating)

command.Connection = conn

' Execute the command and send the results directly to the client

'SqlContext.Pipe.ExecuteAndSend(command)

Dim drUnitCode As SqlDataReader = command.ExecuteReader()

While drUnitCode.Read

If drUnitCode.Item("CompanyCode").ToString <> prevCompanyCode Then

agencySysNo = 0

If drUnitCode.Item("CompanyCode").ToString <> "" Then

agencySysNo = InsertAgency(drUnitCode.Item("CompanyCode").ToString, drUnitCode.Item("UC_DEPARTMENT_DESC").ToString, _

Convert.ToBoolean(drUnitCode.Item("NCAS")), drUnitCode.Item("UC_BILLING_CODE").ToString)

End If

End If

If agencySysNo > 0 Then

InsertDivision(agencySysNo, drUnitCode.Item("UC_DIVISION_DESC").ToString, drUnitCode.Item("UC_SHORT_DEPT_DIV").ToString, _

drUnitCode.Item("UC_CODE_NUMBER").ToString)

End If

prevCompanyCode = drUnitCode.Item("CompanyCode").ToString

End While

Catch ex As Exception

End Try

Thanks!

Error in Creating Stored Procedure from VS 2005

When I create a stored procedure in VS 2005 using C# and deploy it to the server I can't execute it there and here is the error message:

Msg 6522, Level 16, State 1, Procedure GetAll, Line 0

A .NET Framework error occurred during execution of user defined routine or aggregate 'GetAll':

System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

System.Security.SecurityException:

at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)

at System.Security.PermissionSet.Demand()

at System.Data.Common.DbConnectionOptions.DemandPermission()

at System.Data.SqlClient.SqlConnection.PermissionDemand()

at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection)

at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

at System.Data.SqlClient.SqlConnection.Open()

at StoredProcedures.GetAll()

and the code for creating the stored procedure is:

SqlConnection connDB = new SqlConnection(@."Initial Catalog=MDB;Data Source=Server1;");

SqlCommand cmd = new SqlCommand();

cmd.Connection = connDB;

cmd.CommandText = "SELECT * FROM Modifier";

connDB.Open();

SqlDataReader rdr = cmd.ExecuteReader();

SqlContext.Pipe.Send(rdr);

rdr.Close();

connDB.Close();

your help is appreciated...

What is the permission_set that you assigned for the assembly? This is the one in the CREATE ASSEMBLY. You need to set it to EXTERNAL_ACCESS due to use of SqlConnection that is accessing remote resource. Additionally, you will have to enable TRUST_WORTHY bit (use with care) or do the recommended key based login creation & assign external access assembly permission to it and use that user as owner of the assembly. If you download the new version of SQL Server 2005 Books Online it should contain updated topics that show how to do this. If you need some examples, please post back and I will try to locate a sample for you.|||

I am getting the same error when trying to debug my stored procedure. How do I get around int?

Here's my code:

Try

Dim conn As SqlConnection = New SqlConnection

conn.ConnectionString = "Data Source=XXX-XXXX\SQLSERVER2005;Initial Catalog=MotorFleetConversion;User ID=xxxx;password=xxxx"

conn.Open()

command = New SqlCommand(sqlAction)

'command.Parameters.AddWithValue("@.rating", rating)

command.Connection = conn

' Execute the command and send the results directly to the client

'SqlContext.Pipe.ExecuteAndSend(command)

Dim drUnitCode As SqlDataReader = command.ExecuteReader()

While drUnitCode.Read

If drUnitCode.Item("CompanyCode").ToString <> prevCompanyCode Then

agencySysNo = 0

If drUnitCode.Item("CompanyCode").ToString <> ""Then

agencySysNo = InsertAgency(drUnitCode.Item("CompanyCode").ToString, drUnitCode.Item("UC_DEPARTMENT_DESC").ToString, _

Convert.ToBoolean(drUnitCode.Item("NCAS")), drUnitCode.Item("UC_BILLING_CODE").ToString)

EndIf

EndIf

If agencySysNo > 0 Then

InsertDivision(agencySysNo, drUnitCode.Item("UC_DIVISION_DESC").ToString, drUnitCode.Item("UC_SHORT_DEPT_DIV").ToString, _

drUnitCode.Item("UC_CODE_NUMBER").ToString)

EndIf

prevCompanyCode = drUnitCode.Item("CompanyCode").ToString

EndWhile

Catch ex As Exception

EndTry

Thanks!

Error in creating or attaching database

I was getting following error while creating a database or attaching a database to sql server 2005

"The file <<*.mdf>> is compressed but does not reside in a read-only database or filegroup.."

In this scenario, if you try sp_attach_db procedure, you get following error:
Msg 5118, Level 16, State 1, Line 1

After

little bit of troubleshooting, I found this was happening because of a

folder option (of the folder where database file reside (in case of

attach) or being created (in case of create)).

Go to folder

properties, General Tab, click on Advanced button,check "Compress or

Encrypt attributes" section. If the first option (Compress contents to

save disk space) is checked, you get that error. Uncheck it to fix that

problem.

Hi,

i would suggest you to refer

http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=649468&SiteID=17

https://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=12337&SiteID=17

HTH

Hemantgiri S. Goswami

Error in creating DB diagram

Hi all,

When ever i tried to creat a diagram for the database i have i got this error:

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.

the version of the database i am working in was backed up from another machine

what is the problem and how can i solve it?

Thanks in advance

hi,

using SQL Server Management Studio Express, select the database node you have problems with.. access it's properties and, in the "Files" tab, set a valid login as the database owner... please verify the database is in "compatibility level 2005" 2005 too (Oprions tab)..

regards

|||

Hi,

I choosed "sa" as the database owner snd it works

Thanks alot

Error in creating a simple asp.net app similar to sample.net (as2000 samples)

Hi,

I am new to MS Analysis server technologies.
I environment consists of:
Server: windows 2003 server, Sql server 2005, analysis server 2005
client: windows xp

As given by Microsoft, I configured the server for HTTP access. When I try to browse to msmdpump.dll by giving the path "http://ServerName/olap/msmdpump.dll" both in server and client systems I get the HTTP 500 Internal server error.
I also did a right-click->browse from the inetmgr in the server. still I am getting the same error.

Should I not be getting some response when i browse to the msmdpump.dll?

Please do help me.
Is there something else that I have to do.

Regards
Vijay R

You cannot use IE. You should try and use client side application: One like MDXSample app shipped with AS2000 to browse AS2005 cubes.

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

|||

Hi,

Thanks for the reply. I did that and with a bith of tweaking and minor re-coding I am able to run the sample.net windows application.

Next I tried to create a simple asp.net application similar to the code in the sample.net .The sample was in vb.net and I have coded in c#.

I now get the following error when I run and try to send a simple "Discover" request. The error i get is:

<code>

SoapException: The Session element at line 1, column 547 (namespace urn:schemas-microsoft-com:xml-analysis) cannot appear under Envelope/Body.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +1503
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +218
OlapApp.XMLA.MsXmlAnalysis.Discover(Discover Discover1, Session& Session, BeginSession BeginSession, EndSession EndSession) in z:\olapapp\web references\xmla\reference.cs:47
OlapApp.TestForm1.btnRequest_Click(Object sender, EventArgs e) in z:\olapapp\testform1.aspx.cs:130
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292

</code>

In my code I am doing the following:

I created a web reference to the msmdpump.dll (discover, execute - webservice) using the vs.wsdl in visual studio.

My page has a button and a drop down list, the drop down list enables the user to select the "RequestType" for the discover request. like catalog, cube, dimension....etc

on click, I set the properties of the discovery object and pass it to the webservice with the other parameters.

Here is my code:

<code>

private void btnRequest_Click(object sender, System.EventArgs e){

if(RequestType.Equals("DISCOVER_DATASOURCES"))

{Restrictions = "";

Properties = "<Format>Tabular</Format>";}

if(Restrictions != "")

{ string strRestrictionXml = "<RestrictionList xmlns=" + '"' + "urn:schemas-microsoft-com:xml-analysis" + '"' + ">" + Restrictions + "</RestrictionList>";

RestrictionsXml.LoadXml(strRestrictionXml);}

if(Properties != "")

{string strPropertiesXml = "<PropertyList xmlns=" + '"' + "urn:schemas-microsoft-com:xml-analysis" + '"' + ">" + Properties + "</PropertyList>";

PropertiesXml.LoadXml(strPropertiesXml);}

//main code is here--

XMLA.Discover XMLAdiscRequest = new OlapApp.XMLA.Discover();

XMLAdiscRequest.RequestType = RequestType;

XMLAdiscRequest.Properties = (System.Xml.XmlElement)PropertiesXml.FirstChild;

XMLAdiscRequest.Restrictions = (System.Xml.XmlElement)RestrictionsXml.FirstChild;

XMLA.Session XMLARequestSession = new OlapApp.XMLA.Session();

XMLA.MsXmlAnalysis DiscoverWS = new OlapApp.XMLA.MsXmlAnalysis();

DiscoverWS.Url = ServerURL;

DiscoverWS.Credentials = CredentialCache.DefaultCredentials;

ResponseXml = DiscoverWS.Discover(XMLAdiscRequest,ref XMLARequestSession,null,null).@.return;

lblResultant.Visible = true;

lblResultant.Text = ResponseXml.OuterXml;

<\code>

sorry for the lengthy code. can anybody tell me where I am doing wrong? if not can anybody give some sample code?

thanks and regards

Vijay R

|||

The error indicates that your request is not constructed correctly.

Try and run SQL Profiler connect to Analysis Services and see how well-formed requests look like when connecting from MDXSample app or SQL Management studio.

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

|||

Hi,

Thanks I found out the error. I was creating an object of the session.

Now it is returning a response for the "DISCOVER_DATASOURCES" discover request.

but when I am trying to discover the catalogs in the datasource, It is only returning the schema but no catalog rows.

It is the same code used for discover of datasources, except I changed the RequestType to "DBSCHEMA_CATALOGS" and the Properties to :

<DataSourceInfo>myDataSourceName</DataSourceInfo>
<Format>Tabular</Format>

Please tell me what is the reason for this?

Also, The above error is in an asp.net application. I then created a small windows application in C# .net. there it is returning me the correct response for the Dbschema_catalogs request.

What is the error? what should I be doing?

Thanks and Regards

Vijay R

|||

Hi,

wanetd to tell one more thing that I noticed. I had the sql profiler for ssas 2005 open.

All requests made by me (both win app and asp.net app) have a "0" (zero) in the error column for the event subclass "Server state Discover End".

what is this error? how do i solve it?

Thanks and Regards

Vijay R

|||

Try and see what is the user your asp application is running under. This could be just matter of access permission.

Error = 0 means the operation completed successfully.

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

|||

Hi ,

Thanks,

That helped. I just added the Impersonate user in the web.config of the file.

I have another problem today.

Please do see my other post

thanks again

regards

Vijay R

error in create subscription wizard

When creating a subscription, if there is an error detected at the end - it creates the subscription but might not create the sql agent job, and it doesn't give you a chance to correct the error.

e.g. in the Agent Process account I forgot to prefix the username with the domain

At the end of the wizard it told me of the error, created the subscription but didn't let me go back to correct the error (and it didn't create the sql agent job). In the end it was easier to delete the subscription and create it again.

Not the end of the world but hopefully the developers will fix this in time.

thanks
Bruce

Hi, Bruce,

I was able to reproduce the issue you described with the exception that in my case the subscription was not created when the security account is specified without domain prefix in new subscription wizard.

I've entered a bug in our bug database to track this issue.

Thanks for reporting this problem.

Zhiqiang|||I'm following the steps of sample SQL Server Mobile Tutorials..
error on my replication subscription wizard :
"Initialiazing SQL Server Reconciler has failed
HRESULT 0x80045003 (29045)

The initial snapshot for publication 'SQLMobile' is not yet available. Start the Snapshot Agent to generate the snapshot for this publication. If this snapshot is currently being generated, wait for the process to complete and restart the syncronization.
HRESULT 0x80045003 (0)"

error while waiting synchronizing Data in New Subcription Wizard!!
anyone can help?how to solve this problem?

error in create subscription wizard

When creating a subscription, if there is an error detected at the end - it creates the subscription but might not create the sql agent job, and it doesn't give you a chance to correct the error.

e.g. in the Agent Process account I forgot to prefix the username with the domain

At the end of the wizard it told me of the error, created the subscription but didn't let me go back to correct the error (and it didn't create the sql agent job). In the end it was easier to delete the subscription and create it again.

Not the end of the world but hopefully the developers will fix this in time.

thanks
Bruce

Hi, Bruce,

I was able to reproduce the issue you described with the exception that in my case the subscription was not created when the security account is specified without domain prefix in new subscription wizard.

I've entered a bug in our bug database to track this issue.

Thanks for reporting this problem.

Zhiqiang|||I'm following the steps of sample SQL Server Mobile Tutorials..
error on my replication subscription wizard :
"Initialiazing SQL Server Reconciler has failed
HRESULT 0x80045003 (29045)

The initial snapshot for publication 'SQLMobile' is not yet available. Start the Snapshot Agent to generate the snapshot for this publication. If this snapshot is currently being generated, wait for the process to complete and restart the syncronization.
HRESULT 0x80045003 (0)"

error while waiting synchronizing Data in New Subcription Wizard!!
anyone can help?how to solve this problem?

Error in building SQL query within "LIKE" statement for TableAdapter in Design Section

ASP.net 2.0 (VB), SQL Server 2005:

While creating a new TableAdapter in design section, I'm using the query builder and trying to write a query within "LIKE" statement as below -

Example1: SELECT * FROM table WHERE field LIKE @.'%TextBoxData%'
Example2: SELECT * FROM table WHERE field LIKE'%@.TextBoxData%'

but these query doesn't work...error in building query...any clue to make it work? If I remove "@." sure the query will work with normal but '%TextBoxData%' will become a hardcoding value...this is not I want...I want make the TextBoxData become a flexible value depend on the data what I enter in my text box like 'abc,123' not like 'TextBoxData'...

I know normally it supposed to be like:

"SELECT * FROM table WHERE field LIKE'%" & TextBoxData.Text & "%'"


It can work when inCode Section, but not at this time...because now i'm trying to made it with "Query Builder" for TableAdapter " inDesign Section...hmm did you get what I mean? Sorry for my bad english

Thanks in advance

Hi, you can use such query which should beinterpreted correctly as T-SQL command:

SELECT * FROM table WHERE field LIKE '%'+TextBoxData+'%'

|||

Nice work, how thanksIori_Jay, you are the manBig Smile

|||It Should be'%'+@.TextBoxData+'%'

Sunday, February 19, 2012

Error in add count Expression

Dear All,
I'm creating a report in the CRM , i'm using group by clause and i need to
add count Expression in the group footer depending on the details area of
the group , i've added this code in a textbox :
= count(fieldname.value, scope)
it didn't work & it generates an error that the name of the scope that i
have entered is not valid group details area
i've entered the scope as string
could anyone help me ?
thanks in advanceIf the code you entered is literal and not an example, I would say it is a
syntax error first. I would not think that you would need to specify the
"scope" if this is simply a group footer, as it should know the count
expression is in the scope of the group it is in, but maybe I am missing
something from your description.
I would try:
=count(Fields!FieldName.Value)
Rodney Landrum
"Karim Mohamed" <k_a_r_i_m_._m_o_h_a_m_e_d@.link.net> wrote in message
news:O3pEyFaWGHA.4572@.TK2MSFTNGP03.phx.gbl...
> Dear All,
> I'm creating a report in the CRM , i'm using group by clause and i need to
> add count Expression in the group footer depending on the details area of
> the group , i've added this code in a textbox :
> = count(fieldname.value, scope)
> it didn't work & it generates an error that the name of the scope that i
> have entered is not valid group details area
> i've entered the scope as string
> could anyone help me ?
> thanks in advance
>

Friday, February 17, 2012

Error impersonating user when subscribing a report.

Hello,
I am wondering why I am receiving an "Error impersonating user" error
when I am creating a subscription that schedules, executes, and renders
a report to a file share that I have Modify, Read & Execute, Read, and
Write permissions to through a user group that I am a part of.
When I enter my credentials used to access this file share, I receive
this error. When a person who has administrative privileges to this
directory enters his credentials, the subscription is successful.
I had the person who has administrative privileges enter my NT ID
directly in the security list to see if it is physically looking for my
ID when the subscription executes.
We really don't want to do this going forward when we will implement
this product in our production server environment in September.
Is there any way to make this work without adding everyone's NT ID with
Modify, Read & Execute, Read, and Write permissions to the security
list of this folder? Any help would greatly appreciated.
Thank you.When you say 'administrative user' what do you mean? A user who has
read/write access on the file share?
Do you or a group you are a member of have read/write access on teh file
share? If not, you'll need to supply credentials with sufficient permission
to write to the fileshare.
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mossman" <tmosson1@.sbcglobal.net> wrote in message
news:1109000217.745016.226520@.g14g2000cwa.googlegroups.com...
> Hello,
> I am wondering why I am receiving an "Error impersonating user" error
> when I am creating a subscription that schedules, executes, and renders
> a report to a file share that I have Modify, Read & Execute, Read, and
> Write permissions to through a user group that I am a part of.
> When I enter my credentials used to access this file share, I receive
> this error. When a person who has administrative privileges to this
> directory enters his credentials, the subscription is successful.
> I had the person who has administrative privileges enter my NT ID
> directly in the security list to see if it is physically looking for my
> ID when the subscription executes.
> We really don't want to do this going forward when we will implement
> this product in our production server environment in September.
> Is there any way to make this work without adding everyone's NT ID with
> Modify, Read & Execute, Read, and Write permissions to the security
> list of this folder? Any help would greatly appreciated.
> Thank you.
>

Error immediately on creating new Integration Services project in VS2005

I am creating my first Integration Services project and am getting an
error immediately after creating the project. The error is in the
designer and it displays a red X, saying "Microsoft Visual Studio is
unable to load this document: Object reference not set to an instance
of an object". Clicking on the error in the error window just opens up
the xml file which contains the following:

<?xml version="1.0"?><DTS:Executable xmlnsBig SmileTS="www.microsoft.com/
SqlServer/Dts" DTS:ExecutableType="MSDTS.Package.1"><DTSStick out tongueroperty
DTS:Name="PackageFormatVersion">2</DTSStick out tongueroperty><DTSStick out tongueroperty
DTS:Name="VersionComments"></DTSStick out tongueroperty><DTSStick out tongueroperty
DTS:Name="CreatorName">BNHO1\mbell</DTSStick out tongueroperty><DTSStick out tongueroperty
DTS:Name="CreatorComputerName">BT4WKS1361</DTSStick out tongueroperty><DTSStick out tongueroperty
DTS:Name="CreationDate" DTSBig SmileataType="7">8/14/2007 12:22:35 PM</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="PackageType">5</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="ProtectionLevel">1</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="MaxConcurrentExecutables">-1</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="PackagePriorityClass">0</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="VersionMajor">1</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="VersionMinor">0</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="VersionBuild">0</
DTSStick out tongueroperty><DTSStick out tongueroperty
DTS:Name="VersionGUID">{834A3ADF-377D-4F01-88DC-1E0B5424B918}</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="EnableConfig">0</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="CheckpointFileName"></
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="SaveCheckpoints">0</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="CheckpointUsage">0</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="SuppressConfigurationWarnings">0</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="ForceExecValue">0</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="ExecValue" DTSBig SmileataType="3">0</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="ForceExecutionResult">-1</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="Disabled">0</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="FailPackageOnFailure">0</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="FailParentOnFailure">0</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="MaxErrorCount">1</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="ISOLevel">1048576</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="LocaleID">4105</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="TransactionOption">1</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="DelayValidation">0</DTSStick out tongueroperty>
<DTS:LoggingOptions><DTSStick out tongueroperty DTS:Name="LoggingMode">0</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="FilterKind">1</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="EventFilter" DTSBig SmileataType="8"></
DTSStick out tongueroperty></DTS:LoggingOptions><DTSStick out tongueroperty
DTS:Name="ObjectName">Package</DTSStick out tongueroperty><DTSStick out tongueroperty
DTS:Name="DTSID">{433D7504-1A63-4960-86EB-8501C7A77A37}</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="Description"></
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="CreationName">MSDTS.Package.1</
DTSStick out tongueroperty><DTSStick out tongueroperty DTS:Name="DisableEventHandlers">0</
DTSStick out tongueroperty></DTS:Executable>

I have VS2005 SP1, running WindowsXP SP2. Integration Services is
running on my machine, but I would think that this shouldn't matter
anyway as the error is happening before I have even indicated and data
source to use. If I take this xml file with the error and copy it to another new SSIS project on another machine, it works fine. Reinstalling VS2005 had no effect. I am now reinstalling SQL Server 2005 SP2 to see what effect that may have.

Any ideas?

Thanks,
MarcusTry searching, but in the mean time:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1627891&SiteID=1|||Thanks for the link. I have seen that one, and I tried re-registering the xml dlls, but that didn't do anything. Hopefully after my reinstall of Sql Server things will be better.

Marcus
|||

Well that was disappointing. After the SQL Server reinstall and adding SP2 there is no change with my problem. >>HEAVY SIGH!<<. I think it is time to call MS...unless any other ideas?!?!?!?

Marcus

|||

Anybody?

M.