I am running SQL Server CE on Visual Studio 2005. I have created 2 tables and wish to establish a relationship between the two tables. However, I could not find a proper way to establish the connection. Anyone can provide some help on this? thank you.
I am working on sql server reporting services 2005 , i got this error while deploying a report
Error 1 The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. C:TempNotificationReportdb.rds 0 0
I have just installed SQL Server 2008 Feb CTP. When I try and open the Reporting Services webpage i.e. http://Reportserver/Reports/Â I get the error: Â The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. Â In the Reporting Services config, i can't see how to turn this off, apart from removing the SSL entry (port 443 details etc), but this just creates another error. Â I am more a developer, so don't really understand SSL, I am just trying to display some reports I have created in 2008. Â I am running this on Windows XP.
I am trying to setup SQL Server 2000 Reporting services with an SSL connection. The SQL Server (Windows Server 2003 SP2 Standard) and Reporting Server (Windows Server 2003 R2 SP2 Standard) are on separate machines. I have tried setting up Certificates from both and Stand-Alone and Enterprise CA. I have tried several combinations of the Issue To name (server | server.company | server.company.local) I have modified the rsWebApplication.config and rsReportServer.config to match the certificate€™s Issue to exactly. I have tried installs with both Domain Accounts and NT AUTHORITYSYSTEM logins. I have managed to get https://server/ReportServer to work but I have had no luck with the report manager https://server/reports. How do I fix this error?
I'm using SQL Server 2005 (SP1) Reporting Services on Windows Server 2003 SP1. I access the report server from Internet using SSL, but the server is not exposed directly to the internet. It is behind a firewall, where the required ssl port is setup and is working fine.
In my Reporting Server, the /ReportServer folder works perfect and I can navigate and view all reports. It is the /Reports folder the one that does not work fine. I can enter the /Reports folder, and can list all the reports. But, when I select one of the reports, and it starts rendering, I get the error message:
"The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. The remote certificate is invalid according to the validation procedure."
I am a bit stumped by error generated when attempting to connect to the report url.
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
The only thing I can think of is a certificate is issued to the server (all domain devices) via group policy by cert authority running on the domain.
If I check the bindings within Report Services Configuration Manager the certificate is referenced.
I have tried removing 443 but I am still unable to connect.
A neutron walks into a bar. "I'd like a beer" he says. The bartender promptly serves up a beer. "How much will that be?" asks the neutron. "For you?" replies the bartender, "no charge."
When I try to insert a record on my DB (SQL 2005 Express) I get a constraint error. This is my table setup which has been simplified to expose the problem I have: Categories TABLEint CatId PKvarchar CatName : Items TABLEint ItemId PKvarchar ItemName : X_Items_Categoriesint CatIdint ItemId So basically I have a one-to-many relationship between Items and Categories, in other words each item is associated to one or more categories and this association is done via the X_Items_Categories cross table. On this cross table I set two constraints:
The CatId of each entry in the cross table (X_Items_Categories) must exist in the Category table, and
Hi I have a one to many relationship between two MS SQL tables. When inserting a record in the master table (primary key is autoinc) how can I get this value for setting in the foreign key details table? TIA
HiIm a sql newbie , and have created two tables with a foreign keyrelationship.How do i insert into these tables. If i insert into the primary tablewill the foreign key field in the second table be automaticly updatedby ms sql server ?
I'm using MS SQL Server Studio Express 9.0. When selecting SQL Server Compact Edition, I'm able to create tables and primary keys with no problem. But how do I create a relationship with another table (foreign key)?
I'm having trouble defining a relationship in SQL Express with a concatenated foreign key.
I have 3 tables. Date, Company and Detail
Date has a PK1
Company has a PK2
Detail has a concatenated foreign Key of PK1, PK2
When I go to set the foreign key relationship in Management Studio 'Tables and Columns', it seems I can only select 1 primary key table on the left for my 2 foreign keys. How can I add 2 primary key tables to point to each FK in my detail table?
I have a table users where there is a user_id and an department column. Also i have a table called KRS where there are the same columns, when a userid is given i want to auto fill in the departmentid,
I have to load data into destination table, it has foreign key relation to two different tables called person table and organization table . sample data to be loaded is like
person_id organization_id 1                  Null 2                    NULL Null               1 null              null
person table and organization table doesn't have null values in them, when I try to load this data none of them are laoded, I know either person_id or organization id having null value is failing foreign key constraint. But I want to transfer all the rows except the ones having both nulls. how this can be achieved ?
I use the following 3 sets of sql code in SQL Server Management Studio Express (SSMSE) to import the csv data/files to 3 dbo.Tables via CREATE TABLE & BUKL INSERT operations:
-- ImportCSVprojects.sql --
USE ChemDatabase
GO
CREATE TABLE Projects
(
ProjectID int,
ProjectName nvarchar(25),
LabName nvarchar(25)
);
BULK INSERT dbo.Projects
FROM 'c:myfileProjects.csv'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = ''
)
GO ======================================= -- ImportCSVsamples.sql --
USE ChemDatabase
GO
CREATE TABLE Samples
(
SampleID int,
SampleName nvarchar(25),
Matrix nvarchar(25),
SampleType nvarchar(25),
ChemGroup nvarchar(25),
ProjectID int
);
BULK INSERT dbo.Samples
FROM 'c:myfileSamples.csv'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = ''
)
GO ========================================= -- ImportCSVtestResult.sql --
USE ChemDatabase
GO
CREATE TABLE TestResults
(
AnalyteID int,
AnalyteName nvarchar(25),
Result decimal(9,3),
UnitForConc nvarchar(25),
SampleID int
);
BULK INSERT dbo.TestResults
FROM 'c:myfileLabTests.csv'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = ''
)
GO
======================================== The 3 csv files were successfully imported into the ChemDatabase of my SSMSE.
2 questions to ask: (1) How can I designate the Primary and Foreign Keys to these 3 dbo Tables? Should I do this "designate" thing after the 3 dbo Tables are done or during the "Importing" period? (2) How can I set up the relationships among these 3 dbo Tables?
Hello I have a problem with setting relations properly when inserting data using adonet. Already have searched for a solutions, still not finding a mistake... Here's the sql management studio diagram :
and that causes (at line 67):"The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Question_SurveyTemplate". The conflict occurred in database "ankietyzacja", table "dbo.SurveyTemplate", column 'id'. The statement has been terminated. at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) at System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable) at AnkietyzacjaWebService.Service1.createSurveyTemplate(Object[] o) in J:\PL\PAI\AnkietyzacjaWebService\AnkietyzacjaWebServicece\Service1.asmx.cs:line 397"
Could You please tell me what am I missing here ? Thanks a lot.
I have four tables with relationships as shown. They have a circular relationship and so one of the relationships is forced to be inactive.
  Operation (Commodity, OperationKey)  ==========> Commodity (Commodity)                      /                                                                        /                       |                                                                         |   Advice (OperationKey)      ====== (inactive)=======> Operation Commmodity (Commodity, OperationKey)
However, the userelationship function does not override the active relationship between Operation & Advice and so the measure is limited to Advices directly filtered by the Operation table.
If I delete the relationship between Operation and Advice, then the measure works as expected i.e. Operation indirectly filters Operation Commodity which filters Advice.
Hi! (my first post) I'm ASP.NET newbie and i´ve got an SQL connection error, i know why, i didn´t establish a connection... my questions are: how do i establish the connection state?, and where in my project should i do it? I added the connection section to my web.config, is that enough to establish a connection? <connectionStrings> <add name="buscomConnectionString" connectionString="Data Source=myserver.net;Initial Catalog=mycatalog;Persist Security Info=True;User ID=myuser;Password=mypassword" providerName="System.Data.SqlClient" /> </connectionStrings>
The error i get is: Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 2443:Line 2444://If connection is not open then attempt to open it.Line 2445:if (connection.State == System.Data.ConnectionState.Closed)Line 2446:{Line 2447:try
Source File: d:UseruscomApp_CodePHP.cs Line: 2445 Thanks and cheers! Bill Murphy (litio.net)
I recently upgraded my Laptops operating system to Win XP Pro, and ran into data connectivity problems with my desktop SQL Server 7. To resolve the connectivity problems I removed SQL 7 and reinstalled SQL 7. My connectivity problems have been resolved however I lost the database from my server. The data base exists but it is not recognized from the SQL Server Enterprise Manager.
Is there an easy way to re-establish the database?
Any assistance would be greatly appreciated, I have posted this thread here because there is little activity on the SQL 7 journal it seems that I am behind the curve.
I have two servers both installed sql server.The name of the servers are A and B respectively. The admin of sql server in A is 'domainuserA', and admin of sql server B is 'domainuserB'.
My purpose is create a mirroring for a database in server A, but i can establish endpoint in server A(network address can not be reached or does not exist), i have grant the 'connect to endpoint' permission to each login .
i past my code:
step1
Code Snippet --Server A, principal create database db_test backup database db_test to disk='\sharefolderdb_test.bak' with init
create endpoint endpoint1 as tcp(listener_port=5002) for database_mirroring (role=partner)
alter endpoint endpoint1 state=started
create login [domainuserB] from windows grant connect on endpoint::endpoint1 to [domainuserB]
step2
Code Snippet --Server B, mirror restore database db_test from disk='\sharefolderdb_test2.bak' with norecovery
create endpoint endpoint1 as tcp(listener_port=5002) for database_mirroring (role=partner)
alter endpoint endpoint1 state=started
create login [domainuserA] from windows grant connect on endpoint::endpoint1 to [domainuserA]
alter database db_test set partner='TCP://A.corp.com:5002'
--step3
Code Snippet ----Server A, principal
alter database db_test set partner='TCP://B.corp.com:5002'
this step return a error message:
The server network address "TCP://B.corp.com:5002" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.
Could someone help me out? I am stuck and I don't have $245.00 to pay for Microsoft Technical phone support. Basically I am trying to establish a connection to my database using C#. When I try to connect I can step into the line of code, but an exception is thrown. Error message in the debugger: ServerVersion = 'myConnection.ServerVersion' threw an exception of type 'System.InvalidOperationException'
C# code: SqlConnection myConnection = new SqlConnection("Data Source=BVCOMPUTER;Initial Catalog=TheMarket;User ID =bill;Password=celebrate4ever"); When the above line of code is executed, then In the IDE debugger when I do a watch on myConnection, there is a tree node labeled "ServerVersion" The following messageis displayed there: Also there appears to be a property of "ServerVersion" named "base".The error message stored there is the following: base {"Invalid operation. The connection is closed."} System.SystemException {System.InvalidOperationException} ---------------------------------------------------- Note that I can drag and drop a grid control on my web form and point to the database I want to connect to. But for some reason when I manually try to connect, I am not able to.
in the Quick start, it used connection string ("server=(local)NetSDK;database=pubs;Trusted_Connection=yes") to connect to the SQL db.
Now my working environment is, Im working on my client running .NET Framework as a webserver, and the SQL Server is on another PC as a db server (IP: xxx.xxx.xx.xx, user: webuser, pwd: webuser).
1st Question: how do I build my connection string for this?? I tried following but no luck: "user id=webuser;password=webuser;Initial Catalog=Bei;Data Source=xxx.xxx.xx.xx;Integrated Security=SSPI;";
2nd Question: I just happened to see that ODBC is no more recommended in ASP.NET ?? if that's the case what is the new way to connect to DB ?? by using connection string or what ??
I got the following error message while trying to establish connection SQL DB : "Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. "
in fact i have ran the utility and added the connection successfully and from the VWD i can see the table for the connections but when i run the ASP.NET Configuration it gives me the above error
Can anyone help me configure merge replication between two servers with same server name (select @@servername returns same server name) . When I am trying to establish the replication I am getting error message.
I cannot change the server names because both are production servers, so reinstalling SQL Server is out of question.
My name is George. I have installed Microsoft Visual Web Development 2008 Exress Edition Beta, and when I want to use the Web Site Administration Tool and test the AspNetSqlProvider it says me this:
"Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider."
I don't know what to I do? I have enabled the IP/TPC and name pipes at SQL Server Surface Area Configuration, and I have used the aspnet_regsql to setup the ASP.NET and SQL Database, but the setup field it says this:
"System.Web.HttpException: Unable to connect to SQL Server database. ---> System.Data.SqlClient.SqlException: 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) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) --- End of inner exception stack trace --- at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install) at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString) at System.Web.Management.ConfirmPanel.Execute()"
I have enabled the IP/TPC, name pipes and remote connections at the SQL Server Express...
I am having a great deal of difficulty connecting my version of visual web developer 2005 express to the AspNetSqlProvider as stated in the tutorials online at the web developer center. I keep getting the error below.
"Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. "
When I run the utility I still get a connection error using the hostname of my computer and windows authentication.
The setup failed message is as below also:-
"Setup failed.
Exception: Unable to connect to SQL Server database.
---------------------------------------- Details of failure ----------------------------------------
System.Web.HttpException: Unable to connect to SQL Server database. ---> System.Data.SqlClient.SqlException: 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) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) --- End of inner exception stack trace --- at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install) at System.Web.Management.SqlServices.Install(String database, SqlFeatures features, String connectionString) at System.Web.Management.ConfirmPanel.Execute()"
I have tried some of the suggestions on the forum with no result
Hi! When I'm going to the Web Site Administration Tool at the Provider tab I click to test the AspNetSqlProvider, but it says "Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider. " I have enabled the TCP/IP and name pipes at the SQL Server, and I have created a database using the aspnet_regsql and when I'm going to test the provider it always says me that "Could not establish a connection to the database..." Can anybody help me? Thanks
i already ran aspnet_regsql but i still get below...anyone know why? thanks in advance
Could not establish a connection to the database. If you have not yet created the SQL Server database, exit the Web Site Administration tool, use the aspnet_regsql command-line utility to create and configure the database, and then return to this tool to set the provider.