Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Friday, March 30, 2012

Problems ith Connection string to SQL Express

My application is usningtraditional connection string:

<

addkey="DbConnection"value="driver={SQL Native Driver}; provider=SQLNCLI;server=localhost;trusted_connection=yes;database=ebay" />

It works fine with database attached to SQL Server, how do I make this working with SQL Express attachable file in data directory?

I have tried this, but it does not work:

Provider=SQLNCLI;Server=RAF001\SQLExpress;AttachDbFilename=..\TestSite\App_Data\ebay.mdf;Database=ebay;Trusted_Connection=Yes;

Friday, March 23, 2012

Problems continued - Cannot establish remote connection to Analysis Services

hello,

i am trying to connect to Analysis services server through another pc but i am unable to do so.

Using the following commands i manage to connect to analysis services server at my pc

Server.srv=new Server ();

srv.Connect('ip address or name');

but not to another pc. Are there any settings under sql server should i change ?

I assume that you are using Analysis Services 2005.

First, make sure that the Analysis Services allows remote connections:

On the machine running analysis services, please perform the following steps:

- All programs\Microsoft SQL Server 2005\Configuration Tools\Sql Server Surface Area Configuration

- Click on the Surface Area Configuration for Services and Connections

- Select Remote Connections under the MSSQLSERVER\Analysis Services node

- Make sure that Local and Remote connections is selected (to allow remote connections)

At this point, the client machine should be able to connect to the remote server. Before everything works, you will need to make sure that the client machine connection code is running under credentials that can access Analysis Services

|||

Well i have already enable remote connections and chech credentials as well

This is the error i am getting :

{"A connection cannot be made. Ensure that the server is running."} System.Exception {Microsoft.AnalysisServices.ConnectionException}

{"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"} System.Exception {System.Net.Sockets.SocketException}

Any help ? thanks.

|||That is unusual. Does PING work for the remote computer? Also, could you please check any firewall settings on the remote computer? Analysis Services (msmdsrv.exe) needs permissions through the firewall|||

PING works fine among the two ps's and analysis services is excepted under firewall .

I am still facing the same problem.

Can you please provide me the exact connection string from a pc1 with ip 10.181.11.1 to a pc2 with ip 10.181.11.2 (asp form in pc1 to analysis server in pc2)?

Maybe i use a wrong connection string

This is the error i am getting :

Unable to read data from the transport connection : an existing connection was forcibly closed by the remote host

Any help?

Thanks

|||

Are you using OLE DB or Adomd.Net?

The Connection String should look like "Data Source=10.181.11.2; Initial Catalog=<Your Database>"

One possible reason for the error is that your current user does not have permissions on the server. Are the computers in the same domain? If not, is Everyone allowed to access a database on the server?

|||

I am using ADOMD connection,,if you have an example connection string it would be helpful to check with the one i use

(i have tried different ways of setting the connection string but still cannot connect ).

As far as user credentials are concerned i have also tried to set them in different ways.

I am not quite sure which user (WinXP user, Database Engine User , IIS user, Analysis Services user) must have access to which place,, i am a bit confused about this.

I appreciate your help. Thank you

|||

To begin, let's make sure the physical connection works correctly. On the Analysis Services machine, create a new Analysis Services role which has permissions on your target database, and make sure that Everyone is a member of that role.

Then, try to connect from your client machine, using a connection string like

"Data Source=<IP of the remote machine>; Initial catalog=<name of the DB which is accessible to Everyone>"

If this works, the physical connection is OK and we'll focus on credentials.

Are your machines part of the same Windows NT domain? Tell me a few things about your application, I understand it is a web application, is it correct? Is it impersonating the remote user or running uner a set of specified credentials, or running under the default credentials (machine\ASPNET user)?

And, if you don't mind, could you please reply to this thread rather than creating a new post? It is easier to keep track of the issues

|||

We did what you suggested but we still get the same error.

Do we need to give the permissions and to the actual database (database engine) except to the one in analysis services ?

Our machines are part of the same workgroup connected via a router.

It is a web application and it is runnig under the default credentials.

But we tried with a windows application to check if we can connect to the analysis services and we still get the error

We can access a remote database engine througn sql server management studio but not remote analysis services server.

Is there a way to access a remote analysis services through sql server management studio?

Thanks

|||

This reply involves another error (not the one mentioned above). It seems to have a problem in creating the DIMENSION through source code and the problem seems to be on 'Process' command. We removed the Process command from the code and tried to process it through anaysis services management studio and still got error 'process failed' . This is a critical issue ,,i cannot continue to create cubes, etc.

As far as my application is concerned ,,it is a web application ,,the user will choose through an asp form measures and dimensions and then dimensions,cubes,structures will be created dynamically. So the problem is at initial state since i cannot create the dimenions.

Pls help.

This is the source code i use for dimension creation :

static void CreateDateDimension(Database db)

{

// Create the Date dimension

Dimension dim = db.Dimensions.Add("Invitquest");

dim.Type = DimensionType.Time;

dim.UnknownMember = UnknownMemberBehavior.Hidden;

dim.AttributeAllMemberName = "All Periods";

dim.Source = new DataSourceViewBinding(datasourceName);

dim.StorageMode = DimensionStorageMode.Molap;

#region Create attributes

DimensionAttribute attr;

attr = dim.Attributes.Add("Invitquest");

attr.Usage = AttributeUsage.Key;

attr.Type = AttributeType.Date;

attr.OrderBy = OrderBy.Key;

attr.KeyColumns.Add(CreateDataItem(db.DataSourceViews[0], "Invitquest", "invno"));

// attr.NameColumn = CreateDataItem(db.DataSourceViews[0], "Invitquest", "tableid");

attr = dim.Attributes.Add("YPopto");

attr.Type = AttributeType.Regular;

attr.KeyColumns.Add(CreateDataItem(db.DataSourceViews[0], "Invitquest", "Ypopto"));

// attr.NameColumn = CreateDataItem(db.DataSourceViews[0], "Invitquest", "Ypopto");

attr = dim.Attributes.Add("cancer");

attr.Type = AttributeType.Regular;

attr.KeyColumns.Add(CreateDataItem(db.DataSourceViews[0], "Invitquest", "CANCER"));

// attr.NameColumn = CreateDataItem(db.DataSourceViews[0], "Invitquest", "CANCER");

attr = dim.Attributes.Add("AM BIO");

attr.Type = AttributeType.Regular;

attr.KeyColumns.Add(CreateDataItem(db.DataSourceViews[0], "Invitquest", "AMBIO"));

// attr.NameColumn = CreateDataItem(db.DataSourceViews[0], "Invitquest", "AMBIO");

#endregion

dim.Update();

}

Thanks.

|||I merged all these threads.|||

> Our machines are part of the same workgroup connected via a router.

This seems to be the issue. Analysis Services uses exclusively Windows Integrated security. User accounts are not shared across machines in a workgroup, only in a domain (or related domains). This might explain both the management studio failure as well as the custom application failure.

Can you try allowing Everyone access to the Analysis Services database? Eventually , the permissions for the Everyone role can be restricted to what is needed (most likely, Read Definition and predictions), but you can start with Everyone as administrator -- not a great security suggestion, but it allows you to easily figure out if this is the source of the problem.

sql

problems connection to Informix database

Hi,

I have a MS SQL 7 running on one machine and want to connect to a Informix database on another machine.

But I always get the error
Server: Msg 7319, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' returned a 'NON-CLUSTERED and NOT INTEGRATED' index 'ind_new_id' with incorrect bookmark ordinal 0.

I have installed the newest version of "Microsoft Data Access Components" and I have the latest Informix odbc driver

When I try to test the connection in the ODBC Data Source Administrator the test returns fine.

Anyone knows what my problem might be?One of the post in this forum refers
The problem is caused because most providers including SQL Server OLE DB provider do
not support index seek.

The 'index as access path' should not be checked when creating a linked server using
the SQL OLEDB. There is a provider level option which is read by the SQL Server from
the following registry.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ Providers\SQLOLEDB\IndexAs
Accesspath. Please check whether the value of the above registry key is 0. If it
isn't , please change it to 0 and try the remote query again.

If it doesn't work, I suggest you rebuild a linked server using the SQL OLEDB without
checking 'index as access path'.

Problems connection the SQL Server database

I build a small application using VS 2005. The application just builds a report using basic Select statement from SQL Server db. Here is my problem:

When I tried to run the application using VS 2005 by pressing F5 . The applicaiton launches using VS webserver and everything test fine. But when I put the site in IIS created website . I get an error "Login failed for user '<serverName>\<userName>

In my connection string I have Integrated Security = SSPI

Please suggest.

Thanks

Thismight be the problem (if the IIS created website you mentioned is on another machine).

On your machine, the "user" that logs into SQL Server is MYMACHINE\ASPNET.

When you deploy to another machine, the "user" that is trying to log into SQL Server is OTHERMACHINE\ASPNET. Maybe the other machine isn't aware of that "user"

Wednesday, March 21, 2012

Problems connecting from reporting services to Oracle using odbc connection and asp.net 2.0

Hi,

Anybody have a clear idea why I might have problems connecting from reporting services to Oracle 9i database using the Microsoft ODBC driver? Getting following error

"Cannot create a connection to data source 'oracleName'.

  • ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
  • "

    I have the data source correctly set-up thought. Is it a permissions problem?

    Thanks.

    When you say you have it set up correctly, do you mean that you were able to connect to it from other applications? or what exactly?

    Assuming it is correct, try using the Microsoft OLE DB Provider for ODBC. This always works for me.

    >L<

  • Problems configuring Execution Log Reports

    I receive the following error:
    An error has occurred during report processing. (rsProcessingAborted) Get
    Online Help
    Cannot create a connection to data source 'RSExecutionLog'.
    (rsErrorOpeningConnection) Get Online Help
    Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
    My ReportServer DB is separate from my ReportServer IIS boxes, I'm trying to
    use Windows NT Integrated Security to access the Execution Log. I'm a Local
    Admin of both servers but still receive the error.
    Am I dealing with a permissions hop issue? Any suggestions would help.
    DavidYes. Use stored credentials in the shared data source for the reports
    (another slightly more complex option would be to use Kerberos delegation)
    --
    HTH
    Jasper Smith (SQL Server MVP)
    http://www.sqldbatips.com
    I support PASS - the definitive, global
    community for SQL Server professionals -
    http://www.sqlpass.org
    "David Dubay" <DavidDubay@.discussions.microsoft.com> wrote in message
    news:30C3BBF3-5DE7-4F4E-9008-349CA172D6EC@.microsoft.com...
    >I receive the following error:
    > An error has occurred during report processing. (rsProcessingAborted) Get
    > Online Help
    > Cannot create a connection to data source 'RSExecutionLog'.
    > (rsErrorOpeningConnection) Get Online Help
    > Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
    > My ReportServer DB is separate from my ReportServer IIS boxes, I'm trying
    > to
    > use Windows NT Integrated Security to access the Execution Log. I'm a
    > Local
    > Admin of both servers but still receive the error.
    > Am I dealing with a permissions hop issue? Any suggestions would help.
    > David

    Friday, March 9, 2012

    Problem: Global DB connection using web.config

    I spent a lot of time trying to fix this. I followed example from the web and I ALWAYS GET THE SAME PROBLEM

    System.InvalidOperationException: The ConnectionString property has not been initialized.

    What I am missing? I really need to fix this. Can anyone help me?

    Thanks

    In my web.config

    <appSettings
    <add key="connectionstring" value="server=homesvr02;uid=sa;pwd=database=Property"/>
    </appSettings
    In my asp.net page

    <%@. Page Language="VB" %>
    <%@. Import Namespace="System.Configuration" %>
    <%@. import Namespace="System.IO" %>
    <%@. import Namespace="System.Data" %>
    <%@. import Namespace="System.Data.SQLClient" %
    Dim strConn As String = ConfigurationSettings.AppSettings("ConnectionString")

    MY ERROR

    System.InvalidOperationException: The ConnectionString property has not been initialized.Please show the rest of your code.

    Are you creating an instance of SqlConnection?

    Are you setting it's ConnectionString property?|||Little error :-)

    See this line:

    ::<add key="connectionstring"
    ::value="server=homesvr02;uid=sa;pwd=database=Property"/
    and then this line:

    ::Dim strConn As String = ConfigurationSettings.AppSettings("ConnectionString")

    I know you come from a VB background - in XML, though casing does matter.

    connectionstring != ConnectionString.|||good call there thona. I would have missed that. I think everyone proper cases everything.|||1.
    <thona>
    ::Dim strConn As String = ConfigurationSettings.AppSettings("ConnectionString")

    I know you come from a VB background - in XML, though casing does matter.

    connectionstring != ConnectionString.
    </thona
    <KraGiE>
    good call there thona. I would have missed that. I think everyone proper cases everything.
    </KraGiE
    * Well, a quick test using VB.NET and C# said otherwise.

    Tricky or Inconsistency. Who would expect that? :-D

    * C#
    Response.Write(System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"]);

    * VB.NET
    Response.Write(System.Configuration.ConfigurationSettings.AppSettings("ConnectionString"))

    Both gives

    server=homesvr02;uid=sa;pwd=database=Property

    2. Can you guys do a quick test to see too?

    3. web.config


    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <appSettings>
    <add key="connectionstring" value="server=homesvr02;uid=sa;pwd=database=Property"/>
    </appSettings>
    |||phouc is right. on both 2002 and 2003. impressive. twice in one day. remarkable

    problem(Unable to add data connection)

    Im having trouble creating a new connection through Visual Studio Web Developer. When I try to add a new connection all it gives me is an error-

    Unable to add data connection
    The DataConnectionDialog could not be intialized

    When I test my page it seems alright going to the localhost but when I try to add a connection it wont let me.

    What could be the cause?

    And how can I fix this problem?

    I want to connect to the sql server on my computer.. I cant because of the error above

    Hi Leo,

    I'm going to claim "not my technology" and send you to another forum. The place that is specifically about SQL Express in VWD is at http://forums.asp.net/54/ShowForum.aspx and I think you'll get a better answer there.

    Regards,

    Mike Wachal
    SQL Express team

    -
    Mark the best posts as Answers!

    Wednesday, March 7, 2012

    Problem with Windows Live Messenger

    Hi there

    I've just installed Windows Live Messenger on my PC. But it keeps telling me there is a problem with the connection, and gives me the code 80072ee7.

    Althought the software says I'm online, I don't seem able to see any of my contacts online or send them instant messages.

    I have worked my way through the trouble-shooting advice in the help file and none of that seems to work. My ISP is Orange. I use their broadband service with Explorer with no problems at all.

    Please could you suggest what the code above means, and what I can do to overcome the problem? I'm not very computer-literate, so a simple explanation would be much appreciated.

    Many thanks Friendly01

    This forum is dedicated to SQL/e. Please post to relevant forum or news group instead:

    http://support.microsoft.com/newsgroups/default.aspx

    Closing as off topic.

    Saturday, February 25, 2012

    Problem with VPN connection on SQL server

    > Provider=sqloledb;driver={SQL Server};Network=DBMSSOCN;uid=xxx;seagreen">
    > server=evnapp;database=xxx and so on the local engine is connected ?
    I think you mess ODBC and OLEDB connection strings here...
    I think it must be
    Provider=sqloledb;Data Source=123.123.123.123,1433;Network
    Library=DBMSSOCN;Initial Catalog=yourdb;User ID=dbuser;Password=dbpass
    Bojidar AlexandrovNo.
    This connections string works fine. I do have it working with other
    customers.
    By the way it also works in the LAN enviroment.....
    "Bojidar Alexandrov" <bojo@.kodar.net> schreef in bericht
    news:uiFAzXFNEHA.2996@.TK2MSFTNGP12.phx.gbl...
    > I think you mess ODBC and OLEDB connection strings here...
    > I think it must be
    > Provider=sqloledb;Data Source=123.123.123.123,1433;Network
    > Library=DBMSSOCN;Initial Catalog=yourdb;User ID=dbuser;Password=dbpass
    >
    > Bojidar Alexandrov
    >|||I do not say that it does not work, but that it is wrong. Please see
    somewhere conenction string reference

    Problem with VPN connection on SQL server

    Hi,
    my customer has a strange problem. In the LAN-enviroment the application can
    connect the local SQL server as well as on the central database. The problem
    occurs when a laptopuser wants to connect the central server via VPN.
    The server (evnapp) and the disks of the server are accessible. A ping gives
    the correct IP address.
    But when connecting the database via:
    Provider=sqloledb;driver={SQL Server};Network=DBMSSOCN;uid=xxx;
    server=evnapp;database=xxx and so on the local engine is connected ?
    There is a host table on the pc (laptops) which maps evnapp to the correct
    IP.
    When using the IP addres in stead of the server name the same thing happens.
    A local connection.
    The only time it does work is when the host table is removed after the
    connection is estabilshed.
    Is it the host table? Or the VPN-software?(Tunix/VPN for windows) . What can
    it be. But stations (desktops) who were installed several months ago are
    using the same host table and do not have any problems.
    All pc's are running win2000. SQL 2000 is used.
    Does this ring a bell ? If so please reply
    Ton
    begin 666 LMHOSTS.dat
    M,3(W+C$V."XQ.# N-#@.)979N9&,P,0T*,3(W+C$V."XQ.# N-30)979N9&,P
    M,@.T*,3(W+C$V."XQ.# N,S4)979N9G,P,0T*,3(W+C$V."XQ.# N-#,);FAL
    M<W)V,#0-"C$R-RXQ-C@.N,3@.T+C0R"65V;F1C<F0-"C$R-RXQ-C@.N,3@.P+C0W
    D"65V;F%P<# R#0HQ,C<N,38X+C$X,"XS- EN:&QS<G8Q. T*
    `
    end
    begin 666 hosts.dat
    M(R!(;W-T($-O<'ER:6=H="!.:65U=R!(;VQL86YD<V4@.3&QO>60@.,3DM,#8M
    M,C P,@.T*#0HQ,C<N,"XP+C$@.(" @.(" @.;&]C86QH;W-T#0H-"B,@.<VUT< T*
    M,3(W+C$V."XQ.# N-#,);FAL<W)V,#0-"@.T*(R!(5%10#0HQ,C<N,38X+C$X
    M,"XS,0EN:&QS<G8Q.0T*,3(W+C$V."XQ.# N,S$):6YT<F%N970N;FAL+79E
    M<GIE:V5R:6YG96XN;FP-"@.T*(R!!4R\T,# -"C$R-RXQ-C@.N,3@.P+C(S"5,T
    M-$$V,#(V#0HQ,C<N,38X+C$X,"XR- E3-#1&,38Q. T*,3(W+C$V."XQ.# N
    M,C8)4S0T,4%#.4$-"@.T*(R!305 -"C$R-RXQ-C@.N,3@.P+C8P"65V;G-A<'!R
    M9 T*,3(W+C$V."XQ.# N,S<)979N<V%P86-C#0HQ,C<N,38X+C$X,"XU.0EE
    M=FYS87!O;G0-"C$R-RXQ-C@.N,3@.P+C,V"65V;G-A<&1E=@.T*#0HC($YE=$))
    M3U,-"C$R-RXQ-C@.N,3@.P+C0X"65V;F1C,#$-"C$R-RXQ-C@.N,3@.P+C4T"65V
    M;F1C,#(-"C$R-RXQ-C@.N,3@.P+C,U"65V;F9S,#$-"C$R-RXQ-C@.N,3@.P+C0V
    M"65V;F9S,#(-"C$R-RXQ-C@.N,3@.P+C0U"65V;FEI<S Q#0HQ,C<N,38X+C$X
    M,"XV,0EE=FYI<V$-"C$R-RXQ-C@.N,3@.P+C,T

    problem with visual studio.net5005 connectionstring passed to SQL Server 2000

    hi!

    i'am recieving this error :

    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server).

    anybody can help me please

    thanks

    That is a general error thrown when there is a problem locating or connecting to a server. First place to look would be your connection string to make sure that the username/password is valid and has access to the server and the database.

    BobP

    Problem with using SQLExpress on the server.

    I have a small ASP.NET 2.0 that uses an instanse of SQLExpress. The connection string looks like this:

    <connectionStrings>

    <add name="DatabaseConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>

    </connectionStrings>

    It works fine when I use it in file system. When I copy it to the server ( IIS6 on Windows Server ) it gives me an error:

    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

    I tried changing the path to the local path on the server but it did not help.

    Any help would be greatly appreciated.

    With the way that you have the connection string configured you are using a user instance. What you sould do is make sure that sql express is installed on the server. Configure your web application directories and then install your application. On the server inside your web directories you should hava folder called app_data (The same as your local machine). Next I would perform an IISRESET once the app is loaded and the start the application up. You might find that the first time the app might time out on the database... just restart the browser session and it should fire up. You do not need to move the database to a different directory on the server as the connection string uses the datadirectory with is the app_data directory from your web solutions.