Showing posts with label local. Show all posts
Showing posts with label local. Show all posts

Monday, March 26, 2012

Problem in connecting Sql Server to ASP.NET

I installed SQL Server in My P.C using MSDE.
it is acted as local server.
All are working fine (SQL Server and .NET)

when i am trying connect the Sql Server in .net,
i got the Error Message

"Login failed for SA/"

i am trying to Windows authentication mode,
it also gives the error like,

" login failed for Sqlserver name/asp.net"

can any one give the solution for that?

thanks in advance.

regards,
Murugavelyou need to add a user machinename/ASPNET in the users tab under your database sql server enterprise manager.

hth|||am using microsoft biztalk server but i cant see the user tab under my administration? i cant see also the server enterprise manager on my mssql. please help.|||Hi ndinakar ,

i have already created User Account in Enterpriase Manager,It is working fine in SQL SERVER
but still i got the same error message "Login failed" when connecting from ASP.NET

What is the problem?

regds,
Murugavel

Friday, March 23, 2012

problem in accessing report manager and server

hi,

i installed RS 2005 on windows XP with local system account,report manager does not access.it gives

The page cannot be displayed

HTTP 500 - Internal server error
Internet Explorer

although reportmanager and reportserver directory is available in its default location.

and also when i clicked on any report on report server it gives

An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help

Requested registry access is not allowed.

i am using my account having admin privlge

please help me.....

Amit,

Could you, please, take a look at the log files for the windows service and for the web service and let me know what errors you find there?

The RS log files are located here:

%Program Files%\Microsoft SQL Server\MSSQL.X\Reporting Services\LogFiles

The log files for the RS windows service look like this: ReportServerService_(timestamp).log and the log files for the RS web service look like this: ReportServer_(timestamp).log.

Mihaela

problem in accessing report manager and server

hi,

i installed RS 2005 on windows XP with local system account,report manager does not access.it gives

The page cannot be displayed

HTTP 500 - Internal server error
Internet Explorer

although reportmanager and reportserver directory is available in its default location.

and also when i clicked on any report on report server it gives

An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help

Requested registry access is not allowed.

i am using my account having admin privlge

please help me.....

Amit,

Could you, please, take a look at the log files for the windows service and for the web service and let me know what errors you find there?

The RS log files are located here:

%Program Files%\Microsoft SQL Server\MSSQL.X\Reporting Services\LogFiles

The log files for the RS windows service look like this: ReportServerService_(timestamp).log and the log files for the RS web service look like this: ReportServer_(timestamp).log.

Mihaela

Monday, March 12, 2012

Problem discovering local SQL Server

I found that SMO sometimes does not return the correct list of available SQL servers.

1. I have SQL development installed in my machine. When I use SMO to retrieve list of server, it does not return anything. But when I use "OSQL -L" command, it returns (local) server.

This is my code.

Cursor.Current = Cursors.WaitCursor

cmbServerName.Items.Clear()

Dim dtSQLServers As DataTable = SmoApplication.EnumAvailableSqlServers()

Dim I As Integer

For I = 0 To dtSQLServers.Rows.Count - 1

Dim ServerName As String = dtSQLServers.Rows(I)("Server").ToString()

If (dtSQLServers.Rows(I)("Instance") IsNot Nothing And dtSQLServers.Rows(I)("Instance").ToString().Length > 0) Then

ServerName = ServerName + "\" + dtSQLServers.Rows(I)("Instance").ToString()

cmbServerName.Items.Add(ServerName)

End If

Next I

Cursor.Current = Cursors.Default

2. When I install SQL 2005 Express in any machine, I cannot retreive its existance via SMO with the same code (on local and remote machine).

Anyone experiencing this situation before? Is there something wrong in my code? How can I fix this?

Thank you,

Hi,

consider the differences with Server and InstanceName, I once wrote an Article about that:

http://sqlserver2005.de/Articles/1/

I saw that you wanted to add the data of ServerName to instance name which would be wrong in your case.

2. Is SQL Server brwoser running ? Otherwise it could be that instances running on other server can′t be retrieved if hosted on different ports.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Friday, March 9, 2012

Problem deploying Custom Report Item

Hello,

I am having a problem with deploying a CRI.

On my local machine the CRI works fine, only at the development machine it doens't works.

I did the following steps:

copy the .dll to the C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies

copy the .dll to the C:\Program Files\Microsoft SQL Server\MSSQL.4\Reporting Services\ReportServer\bin

put this code in rsreportserver.config:

<ReportItems>

<ReportItem Name="BusinessConnectDiagram" type="LogicaCMG.BusinessConnect.DiagrammingCRI.GenerateDiagramRenderer,LogicaCMG.BCDiagramming"/>

</ReportItems>

put this code in rssrvpolicy.config:

<CodeGroup

class="UnionCodeGroup"

Version="1"

PermissionSetName="FullTrust"

Name="BusinessConnectCodeGroup"

Description="Code group for the Business connect diagrammer">

<IMembershipCondition

class="StrongNameMembershipCondition"

version="1"

PublicKeyBlob="002400000480000094000000060200000024000052534131000400000100010051C346CB2A79947C83804E550CF1561729DB2B5C7DEFF93758E419F16390A295DF4906ADD8FD9A29559D5E3C8BFA73D8D21B64724B1B0E688091C1541FD54D5290D6968C73E9ACA842B1E42AB3DE369F7B545933C8E101A737BB7D22F937921E7F02E00C5121D1DC312DBE96154E5A4E47BD7F489A655A09CF08EABCFB6AB7C1"

/>

</CodeGroup>

put this code in rsreportdesigner.config

<ReportItems>

<ReportItem Name="BusinessConnectDiagram" type="LogicaCMG.BusinessConnect.DiagrammingCRI.GenerateDiagramRenderer,LogicaCMG.BCDiagramming"/>

</ReportItems>

<ReportItemDesigner>

<ReportItem Name="BusinessConnectDiagram" Type="LogicaCMG.BusinessConnect.DiagrammingCRI.GenerateDiagramDesigner,LogicaCMG.BCDiagramming" />

</ReportItemDesigner

I get the following error message:

Could not load file or assembly 'ReportingServicesWebServer,

Also when i stop Reporting Services it won't start again. I get a timeout.

Hi,

I am also getting the same error. Even my Report manager is not working.

But, as i was digging thru, I was able to get it working by doing some changes in the Encryption Keys options in the Report Server Configuration manager. But it stopped again by giving some security exception for the CRi assembly.

Can u tell me, how you got the PublicKeyBlob value in rssrvpolicy.config file?

Thanks,

Wednesday, March 7, 2012

Problem creating database dynamically

Hi everybody,

I have a problem. When I try to create a database with this code:

strConnection = "server=(local);Integrated Security=SSPI"
objConnection = New SqlConnection(strConnection)
objConnection.Open()
Dim strSQL = "CREATE DATABASE xxxxxx ON PRIMARY"
strSQL += "(Name=test_data, filename = 'xxxxx.mdf', size=3,"
strSQL += "maxsize=5, filegrowth=10%)log on"
strSQL += "(name=mydbb_log, filename='xxxxx.ldf',size=3,"
strSQL += "maxsize=20,filegrowth=1)"
objCommand = New SqlCommand(strSQL, objConnection)
objCommand.ExecuteNonQuery()

it usually works, except when the name of the database (xxxxxx) contains a number in the beginning of the name or if it is all made up completely by numbers. I also converted the database name into a string, but it doesn't work either.

What is the problem?
How can I solve it?

Thanks in advanceEither don't allow all digits or the first character to be a digit or you might try using [] around then database name. Works for fields, may work for the database name.

Saturday, February 25, 2012

Problem correctly setting a local_variable

Hi,

I've been trying to write a stored proc to no avail. I'm trying to set a local variable and every time I try to execute the stored proc I get the following error:

Running [dbo].[StoredProcedure2].

Conversion failed when converting the nvarchar value 'TEST2' to data type int.

No rows affected.

(0 row(s) returned)

@.RETURN_VALUE =

Finished running [dbo].[StoredProcedure2].

Here's the code (which I skimmed down to try and pinpoint where the issue was).

Initially, I was trying to assign a numeric string value stored as nvarchar(10) and anytime the value would be over '2147999999' (in that area) it would bomb... Now even this simple code won't work and I can't understand why. If anyone would be kind enough to enlighten me ;-)

ALTER PROCEDURE dbo.StoredProcedure2

AS

DECLARE @.ME NVARCHAR(10);

SET @.ME = 'TEST2';

RETURN @.ME

u must use Print/Select instead of Return.

fromBOL

RETURN

Exits unconditionally from a query or procedure. RETURN is immediate and complete and can be used at any point to exit from a procedure, batch, or statement block. Statements following RETURN are not executed.

Syntax

RETURN [ integer_expression ]

alter PROCEDURE dbo.StoredProcedure2
AS
DECLARE @.ME NVARCHAR(10);
SET @.ME = 'TEST2';
select @.me

Madhu

|||

The value following the RETURN keyword MUST be an integer value.

Strings are not allowable RETURN values.

Instead use:

Code Snippet

ALTER PROCEDURE dbo.StoredProcedure2

AS

DECLARE @.ME NVARCHAR(10);

SET @.ME = 'TEST2';

SELECT @.Me

GO

|||

It always better to use OUTPUT parameter, or Select statement to get the single row & column data from the SP. Return only supports integer.

NOTE:

PRINT – you can’t get the result on the UI. It will get suppressed.

problem copying database with Microsoft SQl Server Management Studio

I am trying to copy a database from the server on my web host(crystaltech) to my new local install of MS SQL Server 2005 Enterprise (trial version).

I go to Tasks>Copy Database which opens the wizard. When I get to the select database screen I get this error:

Server user 'username' is not a valid user in database '123foo'

(123foo is the first database of all those on the server)

I need have it look only at my database which I have permissions for to copy it. How do I do this?

I tried copying the tables the other way(import data) but it dropped all my identities and primary keys which is a pain to recreate. Is there a way to copy tables from one server to another without losing primary keys and identity fields?

Thanks for any help!

I think you can use the import export option and specify them with primary keys and identities also other option is you can try scripting the tables and run the script in SSMS........

|||

Thats is some sort of Bug in SSMS. You will have to assign a valid database owner top the database as the existing database owner is no server principal on your computer, this can be either based on the fact that you deleted the server principal or as the most common reason, you restored a database backup which is from another computer or a certain point in time where the current database owner did not exist on the computer. To fix that use sp_changedbowner (described int he BOL) to change the db_owner.

Jens K. Suessmeyer


http://www.sqlserver2005.de

problem copying database with Microsoft SQl Server Management Studio

I am trying to copy a database from the server on my web host(crystaltech) to my new local install of MS SQL Server 2005 Enterprise (trial version).

I go to Tasks>Copy Database which opens the wizard. When I get to the select database screen I get this error:

Server user 'username' is not a valid user in database '123foo'

(123foo is the first database of all those on the server)

I need have it look only at my database which I have permissions for to copy it. How do I do this?

I tried copying the tables the other way(import data) but it dropped all my identities and primary keys which is a pain to recreate. Is there a way to copy tables from one server to another without losing primary keys and identity fields?

Thanks for any help!

I think you can use the import export option and specify them with primary keys and identities also other option is you can try scripting the tables and run the script in SSMS........

|||

Thats is some sort of Bug in SSMS. You will have to assign a valid database owner top the database as the existing database owner is no server principal on your computer, this can be either based on the fact that you deleted the server principal or as the most common reason, you restored a database backup which is from another computer or a certain point in time where the current database owner did not exist on the computer. To fix that use sp_changedbowner (described int he BOL) to change the db_owner.

Jens K. Suessmeyer


http://www.sqlserver2005.de

Monday, February 20, 2012

Problem connection to FoxPro database via ole db

Hi,
I'm accessing a FoxPro database via ole db and ths works fine on my local
report server. However, when I deploy the report to the live report server
I'm getting the error 'Invalid path or file name'
The FoxPro database is on a separate server and the connection string is :
string connectionString = @."provider=vfpoledb;" +
@."data source='\\server\data\foxpro.dbc';" +
"password='';user id=''";
I've read a few articles explaining that it's a permissions problem. I've
tried granting full permissions to the data folder for myself and 'Network
Service' but this still occurs. The web.config file for the report server has
impersonate set to true and IIS is configured for 'Integrated Windows
authentication' and does not use anonymous access.
Any ideas would be much appreciated.
Regards
MikeHi Mike,
Does the report server's account have permissions to the directory?
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
"MikeD" <MikeD@.discussions.microsoft.com> wrote in message
news:9A295512-41F7-48A0-B406-08AE86F55CA8@.microsoft.com...
> Hi,
> I'm accessing a FoxPro database via ole db and ths works fine on my local
> report server. However, when I deploy the report to the live report server
> I'm getting the error 'Invalid path or file name'
> The FoxPro database is on a separate server and the connection string is :
> string connectionString = @."provider=vfpoledb;" +
> @."data source='\\server\data\foxpro.dbc';" +
> "password='';user id=''";
> I've read a few articles explaining that it's a permissions problem. I've
> tried granting full permissions to the data folder for myself and 'Network
> Service' but this still occurs. The web.config file for the report server
> has
> impersonate set to true and IIS is configured for 'Integrated Windows
> authentication' and does not use anonymous access.
> Any ideas would be much appreciated.
> Regards
> Mike