Showing posts with label express. Show all posts
Showing posts with label express. Show all posts

Thursday, March 22, 2012

Can not connect to SQL server

I am using SQL server 2005 express edition. I have instaled the managment studio, so I can create the databases and login. Than after it I have changed from Windows authentication to SQL server authentication. So I opened the VWD on another client pc and I tried to connect to specified database, but I get the error COULD NOT CONNECT TO SQL SERVER, check if the server allow the remote connections.

I have chenked it and it is configured to allow remote connections. Why this happens ?? I had never these problems when I used the sql server 2005 beta version. The client pc and this sql server have connections so there is no problem with network connection at all.

Any suggestions ??

PS: I also tried using syntax:

Server name: myserver\SQLEXPRESS (instance)

Best regards

This might occur also if you didnt specify the correct username/password for the SQL authentication method.

Make sure that the database contain that user and is already mapped to the db.

Regards

|||

Hello !! Thank You for answering !!

Actually I found that problem was DISABLED TCP / IP on the SQL server. I have enabled it and now it work fine. When installing the SQL server express the tcp/ip is disabled so it will not respond on the request for other pc`s.

Best regards

Can not connect to SQL Express from a different computer

Hello,

I have the following problem: I can not connect to an instance of SQL Express from a computer different than the one that the SQL Express is installed on.

When trying to connect through Management Express Studio Express CTP I get the following error:

****

TITLE: Connect to Server

Cannot connect to (nameofserver)\SQLEXPRESS.


ADDITIONAL INFORMATION:

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) (Microsoft SQL Server, Error: -1)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476

****

I can connect to the Express instance without problems from the same computer on which the server is installed on.

SQL Express is installed on a computer running Windows 2003 with SP1.

That computer also has SQL Server 2000, Workgroup Edition installed.

Both, SQL Express and Management Studio have been downloaded form the MSDN web site last week (so, I believe, they're the latest available versions).

In the SQL Server Configuration Manager, under SQL Server 2005 Network Configuration -> Protocols for SQLEXPRESS, Shared Memory, Named Pipes and TCP/IP are enabled, VIA is disabled.

In the SQL Server Configuration Manager, under SQL Server 2005 Native Client Configuration -> Client Protocols, Shared Memory, Named Pipes and TCP/IP are enabled, VIA is disabled.

After enabling these protocols the computer was restarted.

SQL Server Browser service is running.

Both, SQL Server and SQL Server Browser, were set to run under the deafult NetworkService account during setup.

There is a warning in the Event Log (Application section) logged by the SQLBrowser which says:

The configuration of the AdminConnection\TCP protocol in the SQL instance SQLEXPRESS is not valid.

I've searched a lot and tried a lot of different things, but I have not been able to resolve this issue. Please help.

Have you checked the following link: http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx ?|||

Thanks for the link.

I have already tried all the things listed in the article multiple times (enabled protocols, SQL Browser Service running, there is no firewall on the server, I disabled firewall on the client when trying to connect).

(I haven't tried the registry thing because I'm dealing with the final relase of SQL Express and not the CTP.)

I believe my problem has to do with the warning that's logged by the SQL Server Browser service in the Event Log:

The configuration of the AdminConnection\TCP protocol in the SQL instance SQLEXPRESS is not valid.

I have found a couple of references to the same message on the Internet, but none of them offered a solution.

Any other suggestions?

|||

I am also seeing these same symptoms, except I'm just trying to access SQL Express from the same machine it is installed on. I've followed all of the suggested steps I could find, and still get the error message about configuration of AdminConnection\TCP protocol not being valid. I've also, in desperation, disabled the firewall altogether: that didn't change the behavior at all.

I can't get a TCP Connect to SQL Express to work to save my soul.

can not connect to remote SQL Express 2005

Hi,
I am having problems with my Visual Studio 2005 VB.net win app connecting
to SQL Express. I have configured my SQL Express to enable remote
connections, I believe it is correct, since others in the office can connect
to it using MS SQL Server Management Studio, and I can make a successful test
ODBC connection from the client computer, using both named pipes and tcpip.
But my VB.net app can not connect on the client computer, I get error -
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).
This app runs fine on the machine the SQL Express is running on (Windows
2000). My connection code is: Data Source=xxx\sqlexpress;Initial
Catalog=xxx;User ID=xxx;Password=xxx. I have tried putting np: and tcp: with
the port on the data source, but then the code doesn't run on the app on the
server...
Anybody know what I am doing wrong?
Thank you for any help.
Sandy
Hi,
any blocking firewall in the machine ? See if you can open up a
connction using the SQLCMD application from the command prompt.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Hi, Yes I can open a connection using SQLCMD, specifying both tcp with port,
and specifying np. The client machine doesn't have SQL installed, but the
odbc connections worked.
Sandy
"Jens" wrote:

> Hi,
> any blocking firewall in the machine ? See if you can open up a
> connction using the SQLCMD application from the command prompt.
> HTH, Jens K. Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>

can not connect to remote SQL Express 2005

Hi,
I am having problems with my Visual Studio 2005 VB.net win app connecting
to SQL Express. I have configured my SQL Express to enable remote
connections, I believe it is correct, since others in the office can connec
t
to it using MS SQL Server Management Studio, and I can make a successful tes
t
ODBC connection from the client computer, using both named pipes and tcpip.
But my VB.net app can not connect on the client computer, I get error -
System.Data.SqlClient.SqlException: An error has occurred while establishing
a connection to the server. When connecting to SQL Server 2005, this failur
e
may be caused by the fact that under the default settings SQL Server does no
t
allow remote connections. (provider: Named Pipes Provider, error: 40 - Could
not open a connection to SQL Server).
This app runs fine on the machine the SQL Express is running on (Windows
2000). My connection code is: Data Source=xxx\sqlexpress;Initial
Catalog=xxx;User ID=xxx;Password=xxx. I have tried putting np: and tcp: wit
h
the port on the data source, but then the code doesn't run on the app on the
server...
Anybody know what I am doing wrong?
Thank you for any help.
SandyHi,
any blocking firewall in the machine ? See if you can open up a
connction using the SQLCMD application from the command prompt.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
--|||Hi, Yes I can open a connection using SQLCMD, specifying both tcp with port
,
and specifying np. The client machine doesn't have SQL installed, but the
odbc connections worked.
Sandy
"Jens" wrote:

> Hi,
> any blocking firewall in the machine ? See if you can open up a
> connction using the SQLCMD application from the command prompt.
> HTH, Jens K. Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>

can not connect to local sql server 2005 express through jdbc

I was not able to connect to local sql server 2005 express database through
the ms jdbc driver, my local sql server 2005 server name is:
DENLAP0059987\SQLEXPRESS,
my Java code is following:
...
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
DriverManager.getConnection("jdbc:sqlserver://DENLAP0059987\\SQLEXPRESS;user
=sa;password=shanghai");
I got error message:
com.microsoft.sqlserver.jdbc.SQLServerException: Failed
Logon:com.microsoft.sqlserver.jdbc.SQLServerException: Failed connection to
named instance [sqlexpress] [java.net.SocketTimeoutException: Receiv
e timed
out]
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
.........
what's wrong with this connection string:
"jdbc:sqlserver:// DENLAP0059987\\SQLEXPRESS;user=sa;passwo
rd=shanghai"
Please advise.
Thanks
steventhe microsoft sql server beta2 jdbc driver still has bugs,but you can
do as follows:
fist Go to configuration Manager/Protocols/TCP IP, and entered a port
number (eg. 5560) as the default port, and for port value in IP1, IP2,
and IP3.
and then just write your jdbc url like this :
DriverManager.getConnection("jdbc:sqlserver://DENLAP0059987:5560;databaseNam
e=MydatabaseName;user=sa;password=shangh
ai");
don't care "\SQLEXPRESS",it's no use.
good luck!
BTW:are you lived in shanghai
steven wrote:
> I was not able to connect to local sql server 2005 express database throug
h
> the ms jdbc driver, my local sql server 2005 server name is:
> DENLAP0059987\SQLEXPRESS,
> my Java code is following:
> ...
> Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
>
> DriverManager.getConnection("jdbc:sqlserver://DENLAP0059987\\SQLEXPRESS;us
er=sa;password=shanghai");
>
> I got error message:
>
> com.microsoft.sqlserver.jdbc.SQLServerException: Failed
> Logon:com.microsoft.sqlserver.jdbc.SQLServerException: Failed connection t
o
> named instance [sqlexpress] [java.net.SocketTimeoutException: Rece
ive timed
> out]
> at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
> at java.sql.DriverManager.getConnection(DriverManager.java:512)
> at java.sql.DriverManager.getConnection(DriverManager.java:193)
> .........
>
> what's wrong with this connection string:
> "jdbc:sqlserver:// DENLAP0059987\\SQLEXPRESS;user=sa;passwo
rd=shanghai"
>
> Please advise.
> Thanks
> steven

can not connect to local sql server 2005 express through jdbc

I was not able to connect to local sql server 2005 express database through
the ms jdbc driver, my local sql server 2005 server name is:
DENLAP0059987\SQLEXPRESS,
my java code is following:
...
Class.forName("com.microsoft.sqlserver.jdbc.SQLSer verDriver");
DriverManager.getConnection("jdbc:sqlserver://DENLAP0059987\\SQLEXPRESS;user=sa;password=shangha i");
I got error message:
com.microsoft.sqlserver.jdbc.SQLServerException: Failed
Logon:com.microsoft.sqlserver.jdbc.SQLServerExcept ion: Failed connection to
named instance [sqlexpress] [java.net.SocketTimeoutException: Receive timed
out]
at com.microsoft.sqlserver.jdbc.SQLServerDriver.conne ct(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager .java:512)
at java.sql.DriverManager.getConnection(DriverManager .java:193)
..........
what's wrong with this connection string:
"jdbc:sqlserver://DENLAP0059987\\SQLEXPRESS;user=sa;password=shangha i"
Please advise.
Thanks
steven
the microsoft sql server beta2 jdbc driver still has bugs,but you can
do as follows:
fist Go to configuration Manager/Protocols/TCP IP, and entered a port
number (eg. 5560) as the default port, and for port value in IP1, IP2,
and IP3.
and then just write your jdbc url like this :
DriverManager.getConnection("jdbc:sqlserver://DENLAP0059987:5560;databaseName=MydatabaseName;use r=sa;password=shanghai");
don't care "\SQLEXPRESS",it's no use.
good luck!
BTW:are you lived in shanghai
steven wrote:
> I was not able to connect to local sql server 2005 express database through
> the ms jdbc driver, my local sql server 2005 server name is:
> DENLAP0059987\SQLEXPRESS,
> my java code is following:
> ...
> Class.forName("com.microsoft.sqlserver.jdbc.SQLSer verDriver");
>
> DriverManager.getConnection("jdbc:sqlserver://DENLAP0059987\\SQLEXPRESS;user=sa;password=shangha i");
>
> I got error message:
>
> com.microsoft.sqlserver.jdbc.SQLServerException: Failed
> Logon:com.microsoft.sqlserver.jdbc.SQLServerExcept ion: Failed connection to
> named instance [sqlexpress] [java.net.SocketTimeoutException: Receive timed
> out]
> at com.microsoft.sqlserver.jdbc.SQLServerDriver.conne ct(Unknown Source)
> at java.sql.DriverManager.getConnection(DriverManager .java:512)
> at java.sql.DriverManager.getConnection(DriverManager .java:193)
> .........
>
> what's wrong with this connection string:
> "jdbc:sqlserver://DENLAP0059987\\SQLEXPRESS;user=sa;password=shangha i"
>
> Please advise.
> Thanks
> steven

Tuesday, March 20, 2012

Can not attach SQL Server 2005 Express database

I got the folllowin error while trying to attach database. The directory is there...

TITLE: Locate Database Files - H001335\SQLEXPRESS

C:\Documents and Settings\Administrator.H001335\My Documents\Visual Studio 2005\WebSites\Import\App_Data
Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.

If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box.


BUTTONS:

OK

Moving thread to a more appropriate forum.|||where is it?|||please help, no idea why I can't attach this database|||Make sure you do not have VS open (as server manager creates a connection to sql server), and try stopping and restarting the sqlserver agen service. Then try to attach the database. Is the nme the same as the db name? You may need to copy over the log file aswell (daname_log.ldf).|||

Are you using "User Instance=True" in your connection string?

If so, you need to make sure that the user who is running the task has appropriate permissions to access files in that directory (by the looks ASPNET might be the user).

If you're not, then I try running the the sql server service as "Local System" instead of the default "Network Service", or give "Network Service" appropriate permissions for that location.

|||Yes you are right, seems this was related to the user ASP.NEt not having enough rights in the directory...

Can not attach SQL Server 2005 Express database

I got the folllowin error while trying to attach database. The directory is there...

TITLE: Locate Database Files - H001335\SQLEXPRESS

C:\Documents and Settings\Administrator.H001335\My Documents\Visual Studio 2005\WebSites\Import\App_Data
Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.

If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box.


BUTTONS:

OK

Moving thread to a more appropriate forum.|||where is it?|||please help, no idea why I can't attach this database|||Make sure you do not have VS open (as server manager creates a connection to sql server), and try stopping and restarting the sqlserver agen service. Then try to attach the database. Is the nme the same as the db name? You may need to copy over the log file aswell (daname_log.ldf).|||

Are you using "User Instance=True" in your connection string?

If so, you need to make sure that the user who is running the task has appropriate permissions to access files in that directory (by the looks ASPNET might be the user).

If you're not, then I try running the the sql server service as "Local System" instead of the default "Network Service", or give "Network Service" appropriate permissions for that location.

|||Yes you are right, seems this was related to the user ASP.NEt not having enough rights in the directory...sql

Can not attach SQL Server 2005 Express database

I got the folllowin error while trying to attach database. The directory is there...

TITLE: Locate Database Files - H001335\SQLEXPRESS

C:\Documents and Settings\Administrator.H001335\My Documents\Visual Studio 2005\WebSites\Import\App_Data
Cannot access the specified path or file on the server. Verify that you have the necessary security privileges and that the path or file exists.

If you know that the service account can access a specific file, type in the full path for the file in the File Name control in the Locate dialog box.


BUTTONS:

OK

Moving thread to a more appropriate forum.|||where is it?|||please help, no idea why I can't attach this database|||Make sure you do not have VS open (as server manager creates a connection to sql server), and try stopping and restarting the sqlserver agen service. Then try to attach the database. Is the nme the same as the db name? You may need to copy over the log file aswell (daname_log.ldf).|||

Are you using "User Instance=True" in your connection string?

If so, you need to make sure that the user who is running the task has appropriate permissions to access files in that directory (by the looks ASPNET might be the user).

If you're not, then I try running the the sql server service as "Local System" instead of the default "Network Service", or give "Network Service" appropriate permissions for that location.

|||Yes you are right, seems this was related to the user ASP.NEt not having enough rights in the directory...

Can not attach msde2000 db into sql express

I have side by side msde2000 and sqlexpress installed. I need to move a db that has been detached from msde2000 and where it works perfectly fine into sql express. After I select the .mdf file to attach I get this error:

TITLE: Microsoft SQL Server Management Studio

Attach database failed for Server 'LTBAHIA\SQLEXPRESS'. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476


ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

SQL Server detected a logical consistency-based I/O error: torn page (expected signature: 0x55555555; actual signature: 0x55555551). It occurred during a read of page (1:97) in database ID 6 at offset 0x000000000c2000 in file 'C:\Memo2005\Diary\MEMO\bin\MEMOsql.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
Converting database 'MEMOsql' from version 539 to the current version 611.
Database 'MEMOsql' running the upgrade step from version 539 to version 551. (Microsoft SQL Server, Error: 824)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=824&LinkId=20476


BUTTONS:

OK

Thanks for any help,

Luis

The error is indicating a corruption of your databasefile. Could you run the suggested DBCC CHECKDB?

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||The database is either not consistent or was not shutdown down / dettached the right way. Attach the database to SQL Server 2000 again, run CHECKDB, dettach is with either a command or the GUI and run attach it on the SQL Server Express, once beginning the attach process, the server will do an automatic conversion process which will need the database is a concistent state. if this does not work, try to make a backup on the SQL 2k database and restore it on the 2k5 (Express) server.

Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

I have been trying to run CHECKDB but since it requires to have sql server in single user mode I have not been able to do it. If I start from a comand console with sqlservr -m and then I go to

Query Analyzer and try to connect to the server it refuses because it is in single user mode. It seems like a catch 22. Is there a way to start sql server in single user mode from within Sql Analyzer or Enterprise? Or better, how can I do the CHECKDB without running in these problems.

Thanks,

Luis

|||

Unless you do not use any REPAIR commands you do not have to have the db in single user mode only. If you want to set the USER DATABASE in single user mode, you do not have to start the server in single user mode. Just use the command

EXEC sp_dboption 'DATABASENAME', 'single user', 'TRUE'

-Or (for sql 2k5)

ALTER DATABASE DbName SET SINGLE_USER

Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||

Thank you very much Jens. After a few tries it worked and now I have the DB converted.

Luis

Can not access Report Manager administration options

Recently installed SQL Server 2005 Express with Reporting Services in a W2K3 server.
The installation was performed using Remote Desktop Connection to the server, with a domain account in the Administrators group. Initially, the Reporing Services service failed to start, but I could solve this with references to your forum:
http://www.developmentnow.com/g/115_2004_10_0_0_452194/Report-Services-did-not-install-properly-on-w2k-and-w2k3-Can-anyone-help.htm
After the service could start and completed the Reporting Services Configuration,
I can access the Report Manager Home page, but only with HOME and HELP links,
no options for the administration of the application. Please help !!
From http://www.developmentnow.com/g/115_0_0_0_0_0/sql-server-reporting-services.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.comI forgot to mention that after fixing the service startup problem, I got a 401 error when accessing Resport Manager. I could not fix this, but could get access by allowing anonymous access to the website in IIS properties. This might be important to the analysis of the problem..
From http://www.developmentnow.com/groups/viewthread.aspx?newsgroupid=115&threadid=103510
Posted via DevelopmentNow.com Group
http://www.developmentnow.com|||Very good that you added this. This is the reason that you didn't get
administration options. By default anyone in the local administrators group
is in the proper RS role to administer RS. BUT, when you are anonymous RS
doesn't know who you are (because you are anonymous). And so, no admin
options.
So, the real issue is your 401 Error. Back up and concentrate on that. I
suggest getting back to where you are getting this error
I googled 401 error Reporting Services
This one looks like it could be your issue:
http://msdn2.microsoft.com/en-us/library/ms155921.aspx
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Elly Aldo" <nospam@.developmentnow.com> wrote in message
news:aa3a00e5-0466-4356-b877-7958970832c0@.developmentnow.com...
>I forgot to mention that after fixing the service startup problem, I got a
>401 error when accessing Resport Manager. I could not fix this, but could
>get access by allowing anonymous access to the website in IIS properties.
>This might be important to the analysis of the problem...
> From
> http://www.developmentnow.com/groups/viewthread.aspx?newsgroupid=115&threadid=1035106
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com

Monday, March 19, 2012

Can no longer get dataset fill method to work after directory copy

I have been creating a small winforms app using VS 2005 and SQL Express. I
create serveral tables in the database and added it as the datasource for th
e
project. I created several forms, created several datagrids and regular
design views. After I got several of the forms running, I decided to backup
my directory and copied the entire directory to a backup directory on my har
d
drive.
While continuing to work on my project, the IDE lost some of the data
adapters and and datasets while I was switching between the design view and
code view. So I decided to delete the directory and copy the backup I had
saved and start from there. But a Big Problem occured. Once I opned the
project and tried to execute it, I could no longer get the app to connect to
the database. I am the only user and administrator account but every time th
e
app tries to fill a table now I get on of these two erors:
System.Data.SqlClient.SqlException was unhandled
Message="Unable to open the physical file -- ". Operating system error
5: \"5(Access is denied.)\".\r\nUnable to open the physical file
or
System.Data.SqlClient.SqlException was unhandled
Message="Cannot open user default database. Login failed.\r\nLogin failed
for user
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060
Class=11
LineNumber=65536
Number=4064
Procedure=""
Server=".\\SQLEXPRESS"
State=1
StackTrace:
I can no longer connect to the database even thou I can see and work with it
in the IDE. Help
HWDotNetDeveloperSeveral possible reasons for this:
1) you did not restore your original LDF file with your matching MDF
2) you have not re-attached the database
3) you are trying to connect using an sql user account and it is not config
ured the same with the "backed" up version
4) you are trying to connect without the correct user instance reference (i
e. the backed up version is different from the one you deleted)
If you can see the database from the IDE, then using query analyzer and run
a test query. You can also start OSQL and run a simple query against the da
tabase. If these queries work, then there is something not synchronized wit
hin your code versus the database that was restored.
Check out
http://msdn.microsoft.com/library/d...>
userinst.asp
Hope this helps...
-Eric

can no longer connect to SQL Server express error:40

Hi,

I have been working for a few weeks on a local SQL server (express) on my computer all worked ok, until 2 days ago I got the following error message:

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: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)

Where can I find the setting for remote connections? Also any idea why this happened?

rgds

Frank

Hi,

see my Screencasts on my website for enabling / configuring Remote Connections.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

Can multiple workstations running SQL 2005 Server Express attach to the same database files on a

Can multiple instances of SQL 2005 Express attach to the same database files on a network share? I have seen this done before with MSDE where the database files are stored on the server, but instead of having a SQL server running on the network and then connecting to it, only the database files exist on the network share and the users connect through MSDE running on the local machine. Is this possible with SQL2005Express? I do not have the ability to share an SQL instance from one workstation to another nor do I have the ability to install an instance on the corporate server. Is it as simple as creating the database and storing the files on the share then attaching the database to the SQL Instance on each workstation?

No and No. You can only attach a database file to a single instance at a time and SQL Express does not support attaching files from a remote source, only local drives.

Mike

|||

As Michael indicated, that is not possible -and it is not possible with MSDE either.

You will have to install a SQL Server Express somewhere, and that will also be the location for the data files. I suggest that you communicate and negotiate with your network admins, and of course, get the 'clients' involved too.

Otherwise, you will be limited to using an Access *.mdb file -which can be stored on a file server.

Can Multiple Selection Controls be use with SqlDataSource?

 NET 2.0 

I am using Visual Studio Express 2005 for database web developement.

I have created a database with 5 tables. Two are associative tables.

They are

Software
PK SoftwareID
Title

SoftwareSolution
FK SoftwareID
FK SolutionID

Solution
PK SolutionID
Title

CategorySolution
FK Category
FK Solution

Category

PK Category
Title

Criteria for a search with three sources of input into a SqlDataSource attached to a FormView for paged out.

The following are the Search Criteria input sources:
1) ListBox in Multiple Selection Mode
2) CheckBoxList with Mutiple checks posible
2) TextBox with key word search in Title.

Each Solution has 0 or many Categories and 0 or many Software.

When the records are entered in the database, the associative information for Categories and Software are populated to filter the
returned values.

In NET 1.1, I would create a search string like the following in code behind by looping through the CheckBoxList and ListBox finally adding the TextBox:

SELECT Solution.SolutionID, Solution.Title
FROM Solution
WHERE
Solution.SolutionID IN ('2','3','5')
AND
Solution.Title LIKE '%Math%'

I am unable to update the SelectCommand in the ASPX page.

However, when I use the I have used the
System.Web.UI.WebControls.SqlDataSources
"SelectQuery Builder"
I receive the following in the Source for ASPX:

 
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString%>" OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT Solution.SolutionID, Solution.Title FROM Solution INNER JOIN CategorySolution ON Solution.SolutionID = CategorySolution.SolutionID INNER JOIN SoftwareSolution ON Solution.SolutionID = SoftwareSolution.SolutionID"> <SelectParameters> <asp:ControlParameter ControlID="CheckBoxList1" DefaultValue="%" Name="CategoryID" PropertyName="SelectedValue" /> <asp:ControlParameter ControlID="ListBox1" DefaultValue="%" Name="SoftwareID" PropertyName="SelectedValue" /> <asp:ControlParameter ControlID="txtTitleSearch" DefaultValue="%" Name="Title" PropertyName="Text" /> </SelectParameters> </asp:SqlDataSource>
I receive duplicate records and not sure if the code generated accesses the Mutiple Selected values in the CheckBoxList1 and ListBox1.
Question:
1) If the SelectQuery generator will not access multiple selected values from the CheckBoxList1, how can I use code behind to replace
SelectCommand in the ASPX page?
2) What is the best solution for using the CheckBoxList1, ListBox1, and TextBox for filtering my results?
 Sample code, references to solutions, corrections on logic, a new approach, how to use the wizard correctly would all be greatly appreciated.
3) Can Multiple Selection Controls be use with a SqlDataSource SELECT Command?
Thanks for your time,
Sincerely,
Unhistoric

Not, these are a summary of my unsuccessful results and may have a few unintentional syntax errors as a result of the interface of publishing on this website.

After further testing, I have not found a solution upto this point.

I have tried using a SessionParameter of type string to update ('4','20') in the following code in my ASPX file:

I set session variables in the Page_PreInit on the ASPX.VB for testing purposes.
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString%>" OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [Solution] @.inputSolutionID"> <SelectParameters> <asp:SessionParameter Name="inputSolutionID" SessionField="SolutionSearch" type="String" /> </SelectParameters></asp:SqlDataSource>
Only Works with: session("SolutionSearch") ="" resulting in unfiltered results.
   -----------------------------------------------------------
  
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [Solution] WHERE ((CAST([SolutionID] AS Nvarchar)) IN (@.inputSolutionID))"> <SelectParameters> <asp:SessionParameter Name="inputSolutionID" SessionField="SolutionSearch" type="String" /> </SelectParameters></asp:SqlDataSource>
Only Works with a single assignment: session("SolutionSearch") ="'1'" resulting in result and not with = "'1','20'"
 
------------------------------------------------------------- 
The following static code works:
 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString%>" SelectCommand="SELECT * FROM [Solution] WHERE ([SolutionID] IN ('4', '20'))"> </asp:SqlDataSource>
 ****Is there a way to dynamically update the proceeding from code ASPX.VB behind?**************
Sincerely frustrated,
Unhistoric
|||

The answer to the problem was resolved with the following link:

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

It was pointed out the SelectCommand could be set from the code behind in the asp.vb. The key was to leave out the SelectCommand in the "ASPX" code file and set the initial SelectCommand in the Page_Load Event. From my understanding, I was not able to set the SelectCommand initially in my tests due to the fact it existed in part in the "ASPX" code.

Special Thanks to "Yani Dzhurov",

Sincerely,

Unhistoric

Can MS SQL Server 2005 Express Installed On Windows XP Embedded ?

Hi,
Appreciate if any friends here can do me a favour by telling me whether MS
SQL Server 2005 Express can be installed on Windows XP Embedded ?
I have run the SQL setup file and while the setup process was trying to
start the SQL database service, the Setup screen prompted "The SQL server
service failed to start." The Event Viewer has captured event ID: 17311,
Source: MSSQL$SQLExpress and the description is SQL Server is terminating
because of fatal exception c000001d. This error may be caused by an
unhandled Win32 or C++ exception, or by an access violation encountered
during exception handling. Check the SQL error log for any related stack
dumps or messages. This exception forces SQL Server to shutdown. To recover
from this error, restart the server (unless SQLAgent is configured to auto
restart).
Thank you very much for your help. Have a nice day.
Best regards,
Jeff
Hi,
its not listed in the System requirements:
http://www.microsoft.com/sql/edition...s/sysreqs.mspx
But even if you could install it (with a hack) I wouldn=B4t because this
is not offically supported.
HTH, jens Suessmeyer.
http://www.sqlserver2005.de

Sunday, March 11, 2012

Can Management Studio Express manage SQL 2000?

Can I use SQL Server 2005 Management Studio Express to manage existing SQL Server 2000 instances?

Yes, it can. I've suggested that people set this up when the non-Express version wasn't available and it works beautifully. Well, almost. The only thing I know you need to look out for is generated SQL scripts. Sometimes they aren't compatible with SQL Server 2000. That's the only thing I've run into, tho.

Hope this helps!

Thursday, March 8, 2012

Can I work with abril ctp and migrate later to an express version?

Hello

The final customers of my application should have sql server express. Can I work with sql abril ctp and then when the final version of sql express has been released install it and migrate the database?

You should use June CTP (build 1187), not April CTP.

June CTP to RTM (Release) migration is a supported scenario. However, since you will be downgrading the SKU (e.g. Developer SKU to Express SKU) certain features may/will be unavailable. Some of this is transparent to the app (e.g. you won't get AWE support), but some may impact functionality (e.g. feature functionality is limited). It depends on what your application uses.

If you are concerned about databases only, upgrade should work fine from June CTP.

Regards,
Boris.

|||The only thing I need to create is tables, views, triggers and CLR stored procedures. So If I create these objects with sql 2005 june ctp and visual studio 2005 june ctp.

And when the final version of sql express and vs 2005 had been released it should work? I guess i only have to make a backup of the sql june ctp database, uninstall june ctp, uninstall vs 2005 june ctp, and then install vs 2005 profesional or team system , and then install final version of sql express and restore the database and it should work?

Am I missing something?|||

Yes, what you describe should work.

There are two parts to your question:

1. Going from June CTP to RTM – this should be just fine
2. Going from Developer SKU to Express SKU – this has caveats as outlined below

Caveat: if you use a feature that is available only on Dev/Enterprise SKU, once you migrate to Express you may run into problems. Most notable features that may create problems are database mirroring, database snapshot, failover clustering and table partitioning.

At release time there will be a document describing upgrade/downgrade process.

HTH,
Boris.

Can i use the OleDbDataAdapter with SQL SERVER EXPRESS

i have a large amount of code to convert (over 100 asp ver. 2 pages)

Microsoft Access to SQL SERVER EXPRESS

the original code uses the OleDbDataAdapter

example: =========

Dim Connect As OleDbConnection = New OleDbConnection
Dim MyAdapter As OleDbDataAdapter = New OleDbDataAdapter
Dim MyCmdbuilder As OleDbCommandBuilder
Dim Mydataset As DataSet = New DataSet
Dim SelectStatement as string = "select * from tbl_weblog"
Dim connectString as string = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=e:\web\users\data\abc.mdb"

Connect.ConnectionString = ConnectString
MyAdapter.SelectCommand = new OleDbCommand(SelectStatement, Connect)
MyCmdbuilder = New OleDbCommandBuilder(MyAdapter)
MyAdapter.Fill(Mydataset,"tbl_weblog")

================

Can i just change the connection string to point to the new database, assuming the field names and structures are all the same.

Yes, you can, but it's not optimal. The native SqlClient is much better. You could just replace every occurance (search & replace in VS) of "OleDb" with "Sql", and take it from there.

|||

Thanks for the reply

Are there big differences between the Oledb and SQL Client?

You say "much better", in what areas?

reliabilty, scalability or performance?

Does anyone know where i could research this further?

|||

Sorry for being too brief...

The performance difference can be huge in some occasions, and you get nice features such as named parameters.


Can I use the 'IF' clause in a 'WHERE' clause ?

Background:
I am developing a website using MS Visual Studio 2005 and SQL 2005 Express.
I'm using SQL queries (not stored procedures yet).
Problem:
I have a query that I can't make work. I found the COALESCE function and it
solves part of the problem but not all.
I have a variable '@.filter_by_date' which is bound to a dropdownlist on the
webpage. The dropdownlist's values are NULL, -7, -14, -30 which represent th
e
number of days to subtract from today's date.
If a user selects the NULL option the query should return all rows which is
how my query is:
SELECT * FROM t_jobs WHERE (created_date >= COALESCE(@.filter_by_date,
created_date))
The problem arises when the user selects any of the other options. If the
user selects -7, for example, then this value should be subtracted from the
current date and used in the query to only show jobs created after that date
.
The query looks like this:
SELECT * FROM t_jobs WHERE (created_date >= GETDATE() -@.filter_by_date)
Is it possible to merge the two queries? I thought of trying to use an 'IF'
in the 'WHERE' clause but I can't get it to work.
Thank you for your time. Hope you can help.You'll probably get better performance with two separate queries, each in
its own stored proc. However, you can try:
SELECT
*
FROM
t_jobs
WHERE
@.filter_by_date IS NULL
OR (@.filter_by_date IS NOT NULL
AND created_date >= GETDATE() -@.filter_by_date))
(assumes @.filter_by_date is a positive number.)
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
"Matthew Hill" <MatthewHill@.discussions.microsoft.com> wrote in message
news:6AA25C85-C8B9-48FB-8AE6-8850E0A03161@.microsoft.com...
> Background:
> I am developing a website using MS Visual Studio 2005 and SQL 2005
> Express.
> I'm using SQL queries (not stored procedures yet).
> Problem:
> I have a query that I can't make work. I found the COALESCE function and
> it
> solves part of the problem but not all.
> I have a variable '@.filter_by_date' which is bound to a dropdownlist on
> the
> webpage. The dropdownlist's values are NULL, -7, -14, -30 which represent
> the
> number of days to subtract from today's date.
> If a user selects the NULL option the query should return all rows which
> is
> how my query is:
> SELECT * FROM t_jobs WHERE (created_date >= COALESCE(@.filter_by_date,
> created_date))
> The problem arises when the user selects any of the other options. If the
> user selects -7, for example, then this value should be subtracted from
> the
> current date and used in the query to only show jobs created after that
> date.
> The query looks like this:
> SELECT * FROM t_jobs WHERE (created_date >= GETDATE() -@.filter_by_date)
> Is it possible to merge the two queries? I thought of trying to use an
> 'IF'
> in the 'WHERE' clause but I can't get it to work.
> Thank you for your time. Hope you can help.
>|||Thanks for the help. I implemented your querry into mine but when I go out o
f
and back into the Query Builder the query has changed. My other comparisons
in the WHERE clause have been duplicated for each side of the OR operator. I
s
this normal?
"Tom Moreau" wrote:

> You'll probably get better performance with two separate queries, each in
> its own stored proc. However, you can try:
> SELECT
> *
> FROM
> t_jobs
> WHERE
> @.filter_by_date IS NULL
> OR (@.filter_by_date IS NOT NULL
> AND created_date >= GETDATE() -@.filter_by_date))
> (assumes @.filter_by_date is a positive number.)
>
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> "Matthew Hill" <MatthewHill@.discussions.microsoft.com> wrote in message
> news:6AA25C85-C8B9-48FB-8AE6-8850E0A03161@.microsoft.com...
>
>|||Don't use the query builder. Use Query Analyzer (QA).
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada tom@.cips.ca
www.pinpub.com
"Matthew Hill" <MatthewHill@.discussions.microsoft.com> wrote in message
news:A944E1F3-C855-441C-8F90-F4ED600E33F1@.microsoft.com...
> Thanks for the help. I implemented your querry into mine but when I go out
> of
> and back into the Query Builder the query has changed. My other
> comparisons
> in the WHERE clause have been duplicated for each side of the OR operator.
> Is
> this normal?
> "Tom Moreau" wrote:
>|||Thank you for your prompt replies, much appreciated.
Ok, stupid question but here goes. Is QA in SQL Server? I'm not using SQL
Server yet, waiting until my Visual Studio 2005 Pro turns up (any day now)
before I dable into yet another app.
Mat
"Tom Moreau" wrote:

> Don't use the query builder. Use Query Analyzer (QA).
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada tom@.cips.ca
> www.pinpub.com
> "Matthew Hill" <MatthewHill@.discussions.microsoft.com> wrote in message
> news:A944E1F3-C855-441C-8F90-F4ED600E33F1@.microsoft.com...
>
>|||If you have SQL Server 2000, that's part of the tools that ship with it. If
you have SQL Server 2005, then you use SQL Server Management Studio (SSMS),
that ships with SQL Server 2005.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Matthew Hill" <MatthewHill@.discussions.microsoft.com> wrote in message
news:476B52A3-1188-46DE-AF3F-B905475B1A1D@.microsoft.com...
Thank you for your prompt replies, much appreciated.
Ok, stupid question but here goes. Is QA in SQL Server? I'm not using SQL
Server yet, waiting until my Visual Studio 2005 Pro turns up (any day now)
before I dable into yet another app.
Mat
"Tom Moreau" wrote:

> Don't use the query builder. Use Query Analyzer (QA).
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada tom@.cips.ca
> www.pinpub.com
> "Matthew Hill" <MatthewHill@.discussions.microsoft.com> wrote in message
> news:A944E1F3-C855-441C-8F90-F4ED600E33F1@.microsoft.com...
>
>