connection string - sql-server-2005

I have created a simple members database in ASP.NET with login and create account features. Can anyone give an example of the correct connection string that I would need to use to connect to this database remotely. Any answers would be greatly appreciated.

Based on the tag I'm guessing you're using SQL Server 2005. See: http://www.connectionstrings.com/sql-server-2005.

You didn't specify anything about the database (is it SQL Server, Access, MySql, etc).
much less the server name, database name, etc.
However, until specifics are posted, here is a nice general resource for figuring out your connection strings:
http://www.carlprothman.net/Default.aspx?tabid=81

Related

SQL Server database users when applications share the same database

First English is not my native language, so this question can be answered somewhere else or may be duplicated, i tried to Google it, but i didn't find the proper way to describe my need so thank you for understanding.
i have two application (Server/Clients), The database is in the Server machine, and the Client application will just connect to the Database using Sql Server, I'm using EF, my question :
when i wanted to add Data Server, in the wizard it asks for SQL Authentication user :
I'm not sure, but i don't think i should use the "sa" account right !? can somebody confirm that to me please, and suggest me the right approach to do that ! thank you so much.
No, never use SA. Make a user for the server to use and givce it the needed rights. It is quite normal to have application specific logins on a database server.

sys.spt_check_constbytable_rowset in SQL Server 2005

I've a list of long running queries on production servers(MS SQL Server 2005) and the most time consuming query is something like this -
SELECT TABLE_CATALOG,TABLE_SCHEMA ...
FROM sys.spt_check_constbytable_rowset
I've been trying to find any object named sys.spt_check_constbytable_rowset in all DBs (including sys DBs) but no luck.
Could anyone please provide some information about this sys.spt_check_constbytable_rowset
This list is provided by the client, so i'm not sure how they've got it- DB trace or something else.
Thanks in advance
I was facing the same issue on my production server.
By looking deeper into it, I found that this type of queries comes from the SSIS package validation process where it is actually validation the objects and other schema information, some time it also executes from different server through linked server.
Thanks

Limit Database Items To Which I Don't Have Access

I created a few databases within a large hosting provider network. When I use Microsoft SQL Server Management Studio 2008 R2 to connect to the SQL instance I see a list of every SQL database on the server. Is there a way I can tell Management Studio to only display the tables I have access to?
I found a few articles online that said to deny my user the permission to view the other databases. That wouldn't be an issue, except I don't think I can do that from my end. I'd like to solve my problem without having to call my hosting provider. Regards.
Unfortunately what you are asking is NOT possible at this time. I know this is NOT what you are looking for :-)

Finding The DSN To My Database?

I have an SQL database and want to connect to it using VBA in order to support some legacy functionality. I'm using an ADODB connection and need to know what my database DSN is. How can I find this?
I'm using SQL Server 2008, thanks! :D
A DSN (data source name) is an indirect way of referring to the database. You have to create them manually (or semi-automatically using a wizard of some kind). Go to ControlPanel->AdministrativeTools->DataSources (ODBC) to see if one has already been defined for the database to which you want to connect.
But I think you might mean "connection string", not "DSN". There are many, many ways to tell ADODB how to find and connect to your database (DSNs are just one of those), but you always need a connection string.
I have often turned to ConnectionStrings.com to help me through the maze of similar-but-not-identical options.
There may not be a DSN. DSNs are not created automatically.
I'm not sure you really mean DSN, as a DSN is an ODBC concept. Still, look in Administrative Tools->Data Sources (ODBC).

SQL query and MS Access query returns different data

I use MS Access as a front end to my MS SQL server.
When I use a SQL query in ms Access that is (in my opinion) equivalent to a query I run from the SQL server, Access returns different data. The pictures below illustrate the difference. I use Access 2003 and I have connected the Access table to the SQL server (2008) through ODBC.
Anybody got an idea how to fix this??
Thanks in advance
/Iljitj
The SQL and Access Query and result:
(It's the "Projekt" column that is different)
http://i.imagehost.org/0218/SQL_access_query_and_result.jpg
Okay I solved the problem. Apperently Access won't do anything without a unique identifier. Since I didn't have that in my table, Access used CVRnr as identifier, but since it isn't unique, Access only pulled the first row and dublicated it, hence the "incorrect" data.
I added the unique identifier, and linked it correctly to Access and now it works.
Thanks a lot guys for all your help and suggestions, I don't think I would have ever figured out the cause was the identifier if some of you haven't suggested it.
You saved me ;)
Recreate Access linked table. Sometimes Access internal definitons go bad, especially when there are some changes in linked server data structures, tables/columns are recreated/altered or similar.
BTW, Access itself is certainly not bad, just it is meant for simple desktop 'databasing'. It has many limitations and some quirks, but it is quite usable.
I would just stop using Access. It appears to be very broken. First off let's find out what select statement access is really using.
In SSMS (SQL Server Management Studio) go Tool -> SQL Server Profiler.
Attach to the same database then see what Access is doing. File -> New -> connect -> run.
Ok, I see a couple of things...
Do you have a Primary Key setup for the table on MS SQL? That might be confusing MS Access.
The boolean column do have different values, but I think that's because MS Access likes to represent them differently than the MS SQL. That you're going to have to live with.