Showing posts with label occurred. Show all posts
Showing posts with label occurred. Show all posts

Tuesday, March 27, 2012

error: connection is busy

Error: 0xC0202009 at Load SQL Deals, Insert SQL Deals [12494]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Connection is busy with results for another command".

Why isn't the connection manager managing this?

How can I trace the cause? The data flow component (insert SQL deals) is just a simple INSERT statment.You can always run SQL Profiler to see what's going on.

Error: Cannot open database requested in login projectAllocations. Login fails. Login fail

Hi,
Im getting this error when attempting to retrieve data from an sql database.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database requested in login 'projectAllocations'. Login fails. Login failed for user 'sa'.

Source Error:

Line 13: objConn = New SqlConnection( "Server=LAB303-066\NETSDK; Database=projectAllocations; User ID=sa;Password=mypassword")
Line 14: objCmd = New SqlCommand("SELECT * FROM project_descriptions", objConn)
Line 15: objConn.Open()
Line 16: objRdr = objCmd.ExecuteReader()
Line 17: While objRdr.Read()

Source File: C:\finalyearproject2\sample.aspx Line: 15

Please Help!! Im a beginner to this, so if anyone knows the answer, take baby steps when explaining. Thanksas the message says you prbly need to give permissions to the user to access the database. in your enterprise manager, if you xpand the databases tab and then the db you are working on, there's a Users tab. click on it and in the panel to your right you would see a list of users. You might need to add the user "projectAllocations" to the list here and give permissions to the user to access the tables/stored procs and other objects..

hth|||Hi,
Thanks for the response. When I login to the web data administrator and expad the database im workin on, there is no users tab. Does the database have to be empty to do this?|||>>in your enterprise manager, if you xpand the databases tab

Error: Cannot impersonate user for data source

  • An error has occurred during report processing. (rsProcessingAborted)
  • Cannot impersonate user for data source 'DataSource1'. (rsErrorImpersonatingUser)
  • Logon failed. (rsLogonFailed)
  • For more information about this error navigate to the report server on the local server machine, or enable remote errors

    Any help would be greatly appreciated. Thank you.

  • Can you enable remote errors so we can see the detailed error message:

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

    sql
  • Error: An error occurred due to no connection

    This error is for Nov RTM running under "NETWORK SERVICE" account.

    I created a data source "MyDataSource". It looks like:
    <DataSource xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dwd="http://schemas.microsoft.com/DataWarehouse/Designer/1.0" xsi:type="RelationalDataSource" dwd:design-time-name="2d2b4fc8-af5c-4314-9155-384afd11fb70" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
    <ID>MyDataSource</ID>
    <Name>MyDataSource</Name>
    <CreatedTimestamp>0001-01-01T05:00:00Z</CreatedTimestamp>
    <LastSchemaUpdate>0001-01-01T05:00:00Z</LastSchemaUpdate>
    <ConnectionString>Provider=SQLOLEDB.1;Data Source=dbserver\my_instance;Integrated Security=SSPI;Initial Catalog=MyDataSource</ConnectionString>
    <ConnectionStringSecurity>Unchanged</ConnectionStringSecurity>
    <ImpersonationInfo>
    <ImpersonationMode>ImpersonateServiceAccount</ImpersonationMode>
    <ImpersonationInfoSecurity>Unchanged</ImpersonationInfoSecurity>
    </ImpersonationInfo>
    <Timeout>PT0S</Timeout>
    </DataSource>

    In my package, I obtain a new connection from the data source (test connection succeeds). I use a data flow task. Inside the data flow task I have a flat file source and an Ole Db Destination. For configuring OleDbDestination, I can see in the drop-down a list of tables in my database. When I select the desired table and click "preview", I get:
    TITLE: Microsoft Visual Studio

    Error at Data Flow Task - my task [OLE DB Destination [831]]: An error occurred due to no connection. A connection is required when requesting metadata.

    --
    ADDITIONAL INFORMATION:

    Exception from HRESULT: 0xC0202022 (Microsoft.SqlServer.DTSPipelineWrap)


    BUTTONS:

    OK
    TIA,
    Nitesh

    Can you please check that you are not working with "Work Offline" settings.

    Thursday, March 22, 2012

    error: 26 - Error Locating Server/Instance Specified

    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)

    Does anyone know what could be wrong ?

    Check if the local/remote connections have been enabled for ur instamce....Launcg SQL Server Surface Area configuration...Connections and services...Check Local and Network connections.....|||Looks like you are trying to connect a remote named instance. To make it work, SQL Browser on the remote server must be enabled, UDP port 1434 should be put into exception if firewall presents.|||

    I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

    I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

    THANKS IF ANY BODY SOLVE MY PROBLEM

    |||

    Naeem Sheikh wrote:

    I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

    I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

    THANKS IF ANY BODY SOLVE MY PROBLEM

    Thnanks i wonder firewall is blocking my tcp/ip port and now i am connecting to the server|||Yes. It that is necessary.

    error: 26 - Error Locating Server/Instance Specified

    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)

    Does anyone know what could be wrong ?

    Check if the local/remote connections have been enabled for ur instamce....Launcg SQL Server Surface Area configuration...Connections and services...Check Local and Network connections.....|||Looks like you are trying to connect a remote named instance. To make it work, SQL Browser on the remote server must be enabled, UDP port 1434 should be put into exception if firewall presents.|||

    I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

    I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

    THANKS IF ANY BODY SOLVE MY PROBLEM

    |||

    Naeem Sheikh wrote:

    I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

    I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

    THANKS IF ANY BODY SOLVE MY PROBLEM

    Thnanks i wonder firewall is blocking my tcp/ip port and now i am connecting to the server|||Yes. It that is necessary.

    error: 26 - Error Locating Server/Instance Specified

    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)

    Does anyone know what could be wrong ?

    Check if the local/remote connections have been enabled for ur instamce....Launcg SQL Server Surface Area configuration...Connections and services...Check Local and Network connections.....|||Looks like you are trying to connect a remote named instance. To make it work, SQL Browser on the remote server must be enabled, UDP port 1434 should be put into exception if firewall presents.|||

    I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

    I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

    THANKS IF ANY BODY SOLVE MY PROBLEM

    |||

    Naeem Sheikh wrote:

    I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

    I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

    THANKS IF ANY BODY SOLVE MY PROBLEM

    Thnanks i wonder firewall is blocking my tcp/ip port and now i am connecting to the server|||Yes. It that is necessary.

    error: 26 - Error Locating Server/Instance Specified

    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)

    Does anyone know what could be wrong ?

    Check if the local/remote connections have been enabled for ur instamce....Launcg SQL Server Surface Area configuration...Connections and services...Check Local and Network connections.....|||Looks like you are trying to connect a remote named instance. To make it work, SQL Browser on the remote server must be enabled, UDP port 1434 should be put into exception if firewall presents.|||

    I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

    I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

    THANKS IF ANY BODY SOLVE MY PROBLEM

    |||

    Naeem Sheikh wrote:

    I installed SQL Server 2005 and I unable to connect my client Machine. I Created a DSN to connect to the Database through ODBC. Locally I am testing and everything works fine. The error is “SQL Server not Exist or Access Denied” on a client machine. I m using SQL server authentication with Mix mode installation and default Instance name as the Machine Name. If, I connect through Windows Authentication mode then it shows the Error “General Network Error contact to Network Administrator Documentation” On client machine I am also connecting through Visual Studio 2005 Server Explorer but connection showing no database. What should I do to connect my client machine? If I create a New SQL Server Database Name in Server Explorer of Visual Studio 2005 it will give the Error Message “under the Default Setting SQL Server does not allow remote connection Network (provider: SQL Network Interface, Error: 26 – Error Locating Server / Instance Specified)

    I already change the Remote Connection to Local & Remote Connection and choosing Option Use TCP/IP. But not succeeded

    THANKS IF ANY BODY SOLVE MY PROBLEM

    Thnanks i wonder firewall is blocking my tcp/ip port and now i am connecting to the server|||Yes. It that is necessary.

    Sunday, March 11, 2012

    Error: [BC30260] 'EH_Application' is already declared as ...

    This is the message: An unexpected error occurred while compiling
    expressions. Native compiler return value: â'[BC30260] 'EH_Application' is
    already declared as 'Class EH_Application' in this class.â'.
    I modified an old report and I'm trying to build it, but VS give me that
    error.
    What is the problem?
    Help me please.
    Thx
    Marco RizziTesting the update ...
    I found that the error is generated only in one table when I put this code
    into backgroudColor:
    =IIf((RowNumber("table9") Mod 2), "White", "WhiteSmoke")
    I already used this code in other tables and it works well.
    "Marco Rizzi" wrote:
    > This is the message: An unexpected error occurred while compiling
    > expressions. Native compiler return value: â'[BC30260] 'EH_Application' is
    > already declared as 'Class EH_Application' in this class.â'.
    > I modified an old report and I'm trying to build it, but VS give me that
    > error.
    > What is the problem?
    > Help me please.
    > Thx
    > Marco Rizzi
    >|||Now I renamed the textbox in the table and it works well.
    Now my question is: Why do I need to renamed the textbox?
    "Marco Rizzi" wrote:
    > Testing the update ...
    > I found that the error is generated only in one table when I put this code
    > into backgroudColor:
    > =IIf((RowNumber("table9") Mod 2), "White", "WhiteSmoke")
    > I already used this code in other tables and it works well.
    > "Marco Rizzi" wrote:
    > > This is the message: An unexpected error occurred while compiling
    > > expressions. Native compiler return value: â'[BC30260] 'EH_Application' is
    > > already declared as 'Class EH_Application' in this class.â'.
    > >
    > > I modified an old report and I'm trying to build it, but VS give me that
    > > error.
    > > What is the problem?
    > >
    > > Help me please.
    > > Thx
    > > Marco Rizzi
    > >

    Friday, March 9, 2012

    Error, while connecting with SQL Server 2005 express edition

    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 under the default settings of SQL SERver does not allow remote connections.
    (provider:Named Pipes Provider, error: 40-Could not open a connection to SQL Server)

    Hi,

    Did you enabled setting to allow remote connection? Please see the blog for setup Remote connection

    http://blogs.msdn.com/sqlexpress/

    Hope that helps,

    Lan

    |||abrahampackiaraj
    thank you, I already verified the tick mark in the check box of"allow remote connections" and I restarted the system. but this errorfollows up|||

    did you manage to solve this problem as i have the same issue

    Thanks

    |||but while installing asp.net 2.0 , it doesn't even ask for that option. where from i can get that...|||whre from you got the option to tick the check box of "allow remote connections", i dont find that..|||

    You can find it in SQL Server Surface Area Configuration. You may take a look at this post:

    http://forums.asp.net/thread/1347652.aspx

    Friday, February 24, 2012

    Error while trying to get predictions from relational DB

    I am trying to get predictions and insert them into a DB table.

    Following is the code I am using , but I am getting an error saying

    '

    An error occurred while preparing the query

    ,

    Pl. help.

    begin

    declare @.v_query varchar(5000);
    declare @.full_query varchar(5000);
    declare @.v_dbquery varchar (200);

    set @.v_dbquery = char(39)+'SELECT
    [ProspectAlternateKey],
    [FirstName],
    [LastName],
    [MaritalStatus],
    [Gender],
    [YearlyIncome],
    [TotalChildren],
    [NumberChildrenAtHome],
    [HouseOwnerFlag],
    [NumberCarsOwned]
    FROM
    [dbo].[ProspectiveBuyer]'+char(39);

    set @.v_query = 'SELECT
    [TM_Cluster].[Bike Buyer],
    t.[ProspectAlternateKey],
    PredictProbability([TM_Cluster].[Bike Buyer])
    From
    [TM_Cluster]
    PREDICTION JOIN
    OPENQUERY([Adventure Works DW],@.v_dbquery) AS t
    ON
    [TM_Cluster].[Marital Status] = t.[MaritalStatus] AND
    [TM_Cluster].[Gender] = t.[Gender] AND
    [TM_Cluster].[Yearly Income] = t.[YearlyIncome] AND
    [TM_Cluster].[Total Children] = t.[TotalChildren] AND
    [TM_Cluster].[Number Children At Home] = t.[NumberChildrenAtHome] AND
    [TM_Cluster].[House Owner Flag] = t.[HouseOwnerFlag] AND
    [TM_Cluster].[Number Cars Owned] = t.[NumberCarsOwned]'
    -- print @.v_query

    set @.full_query = 'select * from openquery (DMserver,'+char(39)+ @.v_query +char(39)+')' ;

    print @.full_query;

    EXEC (@.full_query);


    end

    Are you able to execute other DMX/MDX queries against the linked server to AS?

    If not, you may need to make sure the MSOLAP provider is allowed in-proc on your SQL Server 2005 database engine instance. You can do this via SQL Server Management Studio - connect to the database engine, navigate to Server Objects -> Linked Servers -> Providers in the Object Explorer, right-click on MSOLAP to select Properties and check the "Allow inprocess" provider option.

    |||

    Yes, I was able to run DMX queries against the linked server.

    For that purpose I had to check 'Allow Inprocess' as well as I had to go to linked server properties and in server option I had to set Rpc = True.

    |||

    You had some syntax errors that cause the query to fail (first in T-SQL and then in DMX) - see my comments marked "Raman:" in the corrected query below ( this one ran successfully on my machine):

    begin

    declare @.v_query varchar(5000);

    declare @.full_query varchar(5000);

    declare @.v_dbquery varchar (500); -- Raman: you had varchar(200) which was too small for the query

    set @.v_dbquery = char(39) + -- Raman: need to escape the enclosing quotes when sending to AS as well

    char(39)+'SELECT

    [ProspectAlternateKey],

    [FirstName],

    [LastName],

    [MaritalStatus],

    [Gender],

    [YearlyIncome],

    [TotalChildren],

    [NumberChildrenAtHome],

    [HouseOwnerFlag],

    [NumberCarsOwned]

    FROM

    [dbo].[ProspectiveBuyer]'+char(39)+char(39); -- Raman: need to escape the enclosing quotes when sending to AS as well

    set @.v_query = 'SELECT

    [TM Clustering].[Bike Buyer],

    t.[ProspectAlternateKey],

    PredictProbability([TM Clustering].[Bike Buyer])

    From

    [TM Clustering]

    PREDICTION JOIN

    OPENQUERY([Adventure Works DW],'

    + @.v_dbquery + -- Raman: @.v_dbquery needs to appended - you had it in the query string where it will not get substituted

    ')AS t

    ON

    [TM Clustering].[Marital Status] = t.[MaritalStatus] AND

    [TM Clustering].[Gender] = t.[Gender] AND

    [TM Clustering].[Yearly Income] = t.[YearlyIncome] AND

    [TM Clustering].[Total Children] = t.[TotalChildren] AND

    [TM Clustering].[Number Children At Home] = t.[NumberChildrenAtHome] AND

    [TM Clustering].[House Owner Flag] = t.[HouseOwnerFlag] AND

    [TM Clustering].[Number Cars Owned] = t.[NumberCarsOwned]'

    --print @.v_query

    set @.full_query = 'select * from openquery (DMserver,'+char(39)+ @.v_query +char(39)+')' ;

    print @.full_query;

    EXEC (@.full_query);

    end

    Error while trying to get predictions from relational DB

    I am trying to get predictions and insert them into a DB table.

    Following is the code I am using , but I am getting an error saying

    '

    An error occurred while preparing the query

    ,

    Pl. help.

    begin

    declare @.v_query varchar(5000);
    declare @.full_query varchar(5000);
    declare @.v_dbquery varchar (200);

    set @.v_dbquery = char(39)+'SELECT
    [ProspectAlternateKey],
    [FirstName],
    [LastName],
    [MaritalStatus],
    [Gender],
    [YearlyIncome],
    [TotalChildren],
    [NumberChildrenAtHome],
    [HouseOwnerFlag],
    [NumberCarsOwned]
    FROM
    [dbo].[ProspectiveBuyer]'+char(39);

    set @.v_query = 'SELECT
    [TM_Cluster].[Bike Buyer],
    t.[ProspectAlternateKey],
    PredictProbability([TM_Cluster].[Bike Buyer])
    From
    [TM_Cluster]
    PREDICTION JOIN
    OPENQUERY([Adventure Works DW],@.v_dbquery) AS t
    ON
    [TM_Cluster].[Marital Status] = t.[MaritalStatus] AND
    [TM_Cluster].[Gender] = t.[Gender] AND
    [TM_Cluster].[Yearly Income] = t.[YearlyIncome] AND
    [TM_Cluster].[Total Children] = t.[TotalChildren] AND
    [TM_Cluster].[Number Children At Home] = t.[NumberChildrenAtHome] AND
    [TM_Cluster].[House Owner Flag] = t.[HouseOwnerFlag] AND
    [TM_Cluster].[Number Cars Owned] = t.[NumberCarsOwned]'
    -- print @.v_query

    set @.full_query = 'select * from openquery (DMserver,'+char(39)+ @.v_query +char(39)+')' ;

    print @.full_query;

    EXEC (@.full_query);


    end

    Are you able to execute other DMX/MDX queries against the linked server to AS?

    If not, you may need to make sure the MSOLAP provider is allowed in-proc on your SQL Server 2005 database engine instance. You can do this via SQL Server Management Studio - connect to the database engine, navigate to Server Objects -> Linked Servers -> Providers in the Object Explorer, right-click on MSOLAP to select Properties and check the "Allow inprocess" provider option.

    |||

    Yes, I was able to run DMX queries against the linked server.

    For that purpose I had to check 'Allow Inprocess' as well as I had to go to linked server properties and in server option I had to set Rpc = True.

    |||

    You had some syntax errors that cause the query to fail (first in T-SQL and then in DMX) - see my comments marked "Raman:" in the corrected query below ( this one ran successfully on my machine):

    begin

    declare @.v_query varchar(5000);

    declare @.full_query varchar(5000);

    declare @.v_dbquery varchar (500); -- Raman: you had varchar(200) which was too small for the query

    set @.v_dbquery = char(39) + -- Raman: need to escape the enclosing quotes when sending to AS as well

    char(39)+'SELECT

    [ProspectAlternateKey],

    [FirstName],

    [LastName],

    [MaritalStatus],

    [Gender],

    [YearlyIncome],

    [TotalChildren],

    [NumberChildrenAtHome],

    [HouseOwnerFlag],

    [NumberCarsOwned]

    FROM

    [dbo].[ProspectiveBuyer]'+char(39)+char(39); -- Raman: need to escape the enclosing quotes when sending to AS as well

    set @.v_query = 'SELECT

    [TM Clustering].[Bike Buyer],

    t.[ProspectAlternateKey],

    PredictProbability([TM Clustering].[Bike Buyer])

    From

    [TM Clustering]

    PREDICTION JOIN

    OPENQUERY([Adventure Works DW],'

    + @.v_dbquery + -- Raman: @.v_dbquery needs to appended - you had it in the query string where it will not get substituted

    ')AS t

    ON

    [TM Clustering].[Marital Status] = t.[MaritalStatus] AND

    [TM Clustering].[Gender] = t.[Gender] AND

    [TM Clustering].[Yearly Income] = t.[YearlyIncome] AND

    [TM Clustering].[Total Children] = t.[TotalChildren] AND

    [TM Clustering].[Number Children At Home] = t.[NumberChildrenAtHome] AND

    [TM Clustering].[House Owner Flag] = t.[HouseOwnerFlag] AND

    [TM Clustering].[Number Cars Owned] = t.[NumberCarsOwned]'

    --print @.v_query

    set @.full_query = 'select * from openquery (DMserver,'+char(39)+ @.v_query +char(39)+')' ;

    print @.full_query;

    EXEC (@.full_query);

    end

    Friday, February 17, 2012

    Error while making connection

    hi

    I am not able to create connection string through vwd express for sql express database file n getting a 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)

    plz tell me where is the problem n how can i resolve it

    Thanks n with regards
    CN

    You could try searching for "Error: 26 - Error Locating Server/Instance Specified" in this forum , or you could look at some troubleshooting help in this blog post:Troubleshoot Connectivity Issue with SQL Server Express 2005.

    Wednesday, February 15, 2012

    Error while establishing connection with sql server 2005 express

    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]

    the above was my error and i got a solution from y71chen as below

    Problem solved...it turn out that in ASP.NET SQL server setup wizard when it asks for server name, I have to specifiy theinstance name as well as the server name when MS refer to "Server Name" they really mean "Server Instance Name") eg if your server was named 'bigturnip' then you need to specify 'bigturnip\sqlexpress' (where sqlexpress is the instance name - this one just happens to be the default used by SQL Server 2005 SQLExpress). By default the server name was entered as merely "bigturnip" but after i added "\sqlexpress", then everything worked. If anyone else is having this remote connection problem and when they did select remote connection and still does not work this is the way to solve the problem....

    but my doubt is do i want to install my software again for specifying the instance name along with the server name or where can i go and specify the instance name.

    regards

    kalyan

    Which software do you want to re-install? Are you referring to VS2005? I remember that there is not step during the installtion of VS2005 that allows you to specify the instance name for SQL Express; and the instance name is default to SQLExpress, while the server name is your computer name which can not be assigned other string.|||

    i had the same problem as you describe above but still when i added \sqlexpress to my connection string, i got the error below. Help please.

    Cannot open database "mydatabase.mdf" requested by the login. The login failed.
    Login failed for user 'domain\myusername'.