Cannot Query Database With SSMSEE

Dec 6, 2007



hello,

I have installed win2003 R2 and SQL Express 2005 with SSMSEE SP2. I made test database and test table. When I try to select from database I get error message: unknown error "-l". But when I try do select with SQLCMD then I have no problem.
Someone knows what may by a problem.

View 7 Replies


ADVERTISEMENT

Can't Open SSMSEE

Aug 23, 2007

Hi,

I've installed visual studio 2005 and sql server express and downloaded SSMSEE, but can't open it, I can still only see SQL server configuration manager. Any help would be greatly appreciated.

Thanks,
Chris

View 2 Replies View Related

SQLEXPRESS And SSMSEE

Dec 10, 2007

Hi all,

I have a little issue with properly configuring SSMSEE, the situation is as follows;

I'm junior sys-admin on our corporate network, and they asked me to make a batchfile that would install SQLexpress 2005 and SSMSEE over the internet with the correct credentials and rights.

So far so good, I had some issues with making the program run on the right ports and such, but in the end I got a proper SQLEXPRESS instance and also SSMSEE running. The point is, only Windows Auth works standard, and all the users here use the SA -account (standalone SQL auth), and by default, that doesn't work. So now I have a beautifull script that installs the software perfectly, but I have to go to the user and correct 2 settings manually with my admin-account (1. enable login account SA & 2. enable mixed mode auth )

My question: Is there somewhere a configuration file or something, which I can alter through the script I made, so mixed mode and the SA account are enabled, without having to go to the user?

I sure hope you can help me, since I have other things to do, like assisting with migrating 130 users to a new domain

- Peter

View 4 Replies View Related

Login OK After Inststalling SSMSEE

Apr 23, 2008

Something very curiuos happens:

I have inttalled SQL Express 2005 SP 2 on Vista Ultimate edition as a part of an application of mine (bootstrapper);
I'm trying to use multiple connections to a user instance using named pipe programmatically (vb net);

The first connection pass, but the second one gives a login failed message and does not work (I have administrator account)!
But after installing SSMSEE the problem doesn't rise again also uninstalling SSMSEE.....

What happens?
I think installing SSMSEE activates some flag in the SQLExpress or modify the protection properties; does anyone have an answer?
Many Thanks

View 2 Replies View Related

SQLExpress 2005 And SSMSEE Execution Issues

Oct 8, 2007

When trying to attach or detach a database, add or remove a user SSMSEE is always executing.  The progress bar never stops moving nor does it display any type of progress.  I have uninstalled and reinstalled SSMSEE with no luck and restarted the SQL server many, many times.  I've been searching for a solution with no luck.  Has anyone else experienced this issue or have a solution?  I have circumvented this by attaching a DB with SQLCMD but I am trying to instruct another user on some of these functions with SSMSEE.
Thanks!

View 2 Replies View Related

ERREUR To Open A Data Base With SSMSEE

Aug 1, 2006

I installed Visual Studio 2005 Standard Edition which contains SQL Server Express.
I downloaded and installed SQL Server Management Studio Express. It run !
I established a connection server BellFixeSQLEXPRESS (BellFixe is the name of my computer). Ok.
The command " add " of the function " attach " of SSMSE allows to navigate on the disk and to attach diverse data bases but it refuses to open the directory D:Documents and SettingsAlain (this path is the base of all my directories of data). This directory appears empty. I cannot thus attach the data bases which are under this directory !
I can open a data base only if it is elsewhere localised.
Why this limitation of access and how to resolve this problem? There is certainly a relation with the management of the users of the PC.
I am only user and administrator of my PC under XP. All my directories of data are under D:Documents and SettingsAlain. The explorer Windows allows to navigate everywhere the disk.
Tanks.

View 7 Replies View Related

Upgrade Install Of SQL Express Advanced SP2 Does NOT Update SSMSEE

May 8, 2007

When we do a clean install of SQL Express Advanced SP2, it installs SSMSEE with a 02/10/2007 date. However, if we do an "ugrade" install of an existing SQL Express SP1, SSMSEE does NOT get updated; it leaves the 04/14/2006 version on the target machine. Do we need to expressly install SSMSEE when doing an upgrade?

View 1 Replies View Related

Unable To Run Management Studio(ssmsee.exe) For Sql Express Edition

Nov 15, 2005

Hi,

View 20 Replies View Related

Stored Procedure Dbo.SalesByCategory Of Northwind Database: Enter The Query String - Query Attempt Failed. How To Do It Right?

Mar 25, 2008

Hi all,
In the Programmability/Stored Procedure of Northwind Database in my SQL Server Management Studio Express (SSMSE), I have the following sql:


USE [Northwind]

GO

/****** Object: StoredProcedure [dbo].[SalesByCategory] Script Date: 03/25/2008 08:31:09 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

CREATE PROCEDURE [dbo].[SalesByCategory]

@CategoryName nvarchar(15), @OrdYear nvarchar(4) = '1998'

AS

IF @OrdYear != '1996' AND @OrdYear != '1997' AND @OrdYear != '1998'

BEGIN

SELECT @OrdYear = '1998'

END

SELECT ProductName,

TotalPurchase=ROUND(SUM(CONVERT(decimal(14,2), OD.Quantity * (1-OD.Discount) * OD.UnitPrice)), 0)

FROM [Order Details] OD, Orders O, Products P, Categories C

WHERE OD.OrderID = O.OrderID

AND OD.ProductID = P.ProductID

AND P.CategoryID = C.CategoryID

AND C.CategoryName = @CategoryName

AND SUBSTRING(CONVERT(nvarchar(22), O.OrderDate, 111), 1, 4) = @OrdYear

GROUP BY ProductName

ORDER BY ProductName

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
From an ADO.NET 2.0 book, I copied the code of ConnectionPoolingForm to my VB 2005 Express. The following is part of the code:

Imports System.Collections.Generic

Imports System.ComponentModel

Imports System.Drawing

Imports System.Text

Imports System.Windows.Forms

Imports System.Data

Imports System.Data.SqlClient

Imports System.Data.Common

Imports System.Diagnostics

Public Class ConnectionPoolingForm

Dim _ProviderFactory As DbProviderFactory = SqlClientFactory.Instance

Public Sub New()

' This call is required by the Windows Form Designer.

InitializeComponent()

' Add any initialization after the InitializeComponent() call.

'Force app to be available for SqlClient perf counting

Using cn As New SqlConnection()

End Using

InitializeMinSize()

InitializePerfCounters()

End Sub

Sub InitializeMinSize()

Me.MinimumSize = Me.Size

End Sub

Dim _SelectedConnection As DbConnection = Nothing

Sub lstConnections_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles lstConnections.SelectedIndexChanged

_SelectedConnection = DirectCast(lstConnections.SelectedItem, DbConnection)

EnableOrDisableButtons(_SelectedConnection)

End Sub

Sub DisableAllButtons()

btnAdd.Enabled = False

btnOpen.Enabled = False

btnQuery.Enabled = False

btnClose.Enabled = False

btnRemove.Enabled = False

btnClearPool.Enabled = False

btnClearAllPools.Enabled = False

End Sub

Sub EnableOrDisableButtons(ByVal cn As DbConnection)

btnAdd.Enabled = True

If cn Is Nothing Then

btnOpen.Enabled = False

btnQuery.Enabled = False

btnClose.Enabled = False

btnRemove.Enabled = False

btnClearPool.Enabled = False

Else

Dim connectionState As ConnectionState = cn.State

btnOpen.Enabled = (connectionState = connectionState.Closed)

btnQuery.Enabled = (connectionState = connectionState.Open)

btnClose.Enabled = btnQuery.Enabled

btnRemove.Enabled = True

If Not (TryCast(cn, SqlConnection) Is Nothing) Then

btnClearPool.Enabled = True

End If

End If

btnClearAllPools.Enabled = True

End Sub

Sub StartWaitUI()

Me.Cursor = Cursors.WaitCursor

DisableAllButtons()

End Sub

Sub EndWaitUI()

Me.Cursor = Cursors.Default

EnableOrDisableButtons(_SelectedConnection)

End Sub

Sub SetStatus(ByVal NewStatus As String)

RefreshPerfCounters()

Me.statusStrip.Items(0).Text = NewStatus

End Sub

Sub btnConnectionString_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnConnectionString.Click

Dim strConn As String = txtConnectionString.Text

Dim bldr As DbConnectionStringBuilder = _ProviderFactory.CreateConnectionStringBuilder()

Try

bldr.ConnectionString = strConn

Catch ex As Exception

MessageBox.Show(ex.Message, "Invalid connection string for " + bldr.GetType().Name, MessageBoxButtons.OK, MessageBoxIcon.Error)

Return

End Try

Dim dlg As New ConnectionStringBuilderDialog()

If dlg.EditConnectionString(_ProviderFactory, bldr) = System.Windows.Forms.DialogResult.OK Then

txtConnectionString.Text = dlg.ConnectionString

SetStatus("Ready")

Else

SetStatus("Operation cancelled")

End If

End Sub

Sub btnAdd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAdd.Click

Dim blnError As Boolean = False

Dim strErrorMessage As String = ""

Dim strErrorCaption As String = "Connection attempt failed"

StartWaitUI()

Try

Dim cn As DbConnection = _ProviderFactory.CreateConnection()

cn.ConnectionString = txtConnectionString.Text

cn.Open()

lstConnections.SelectedIndex = lstConnections.Items.Add(cn)

Catch ex As Exception

blnError = True

strErrorMessage = ex.Message

End Try

EndWaitUI()

If blnError Then

SetStatus(strErrorCaption)

MessageBox.Show(strErrorMessage, strErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error)

Else

SetStatus("Connection opened succesfully")

End If

End Sub

Sub btnOpen_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnOpen.Click

StartWaitUI()

Try

_SelectedConnection.Open()

EnableOrDisableButtons(_SelectedConnection)

SetStatus("Connection opened succesfully")

EndWaitUI()

Catch ex As Exception

EndWaitUI()

Dim strErrorCaption As String = "Connection attempt failed"

SetStatus(strErrorCaption)

MessageBox.Show(ex.Message, strErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error)

End Try

End Sub

Sub btnQuery_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnQuery.Click

Dim queryDialog As New QueryDialog()

If queryDialog.ShowDialog() = System.Windows.Forms.DialogResult.OK Then

Me.Cursor = Cursors.WaitCursor

DisableAllButtons()

Try

Dim cmd As DbCommand = _SelectedConnection.CreateCommand()

cmd.CommandText = queryDialog.txtQuery.Text

Using rdr As DbDataReader = cmd.ExecuteReader()

If rdr.HasRows Then

Dim resultsForm As New QueryResultsForm()

resultsForm.ShowResults(cmd.CommandText, rdr)

SetStatus(String.Format("Query returned {0} row(s)", resultsForm.RowsReturned))

Else

SetStatus(String.Format("Query affected {0} row(s)", rdr.RecordsAffected))

End If

Me.Cursor = Cursors.Default

EnableOrDisableButtons(_SelectedConnection)

End Using

Catch ex As Exception

Me.Cursor = Cursors.Default

EnableOrDisableButtons(_SelectedConnection)

Dim strErrorCaption As String = "Query attempt failed"

SetStatus(strErrorCaption)

MessageBox.Show(ex.Message, strErrorCaption, MessageBoxButtons.OK, MessageBoxIcon.Error)

End Try

Else

SetStatus("Operation cancelled")

End If

End Sub
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I executed the code successfully and I got a box which asked for "Enter the query string".
I typed in the following: EXEC dbo.SalesByCategory @Seafood. I got the following box: Query attempt failed. Must declare the scalar variable "@Seafood". I am learning how to enter the string for the "SQL query programed in the subQuery_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnQuery.Click" (see the code statements listed above). Please help and tell me what I missed and what I should put into the query string to get the information of the "Seafood" category out.

Thanks in advance,
Scott Chang

View 4 Replies View Related

Query To Give All Table Sizes On A Database (was Query Help)

Mar 9, 2006

Hi,
Does anyone has query to give all table sizes on a database?
Appreciate your help.
Thanks

View 2 Replies View Related

Import Wizard - Using Query For Remote Database To Compare Local Database

Apr 10, 2008

I am trying to use the Import Wizard to setup a daily job to import new records based on an ID field (PK). The source database is remote and a replica. I am inserting new records to update my table called the same thing. Both are SQL Native Client


Code Snippet
select *
from [CommWireless].[dbo].[iQclerk_SaleInvoicesAndProducts] as S1
join [IQ_REPLICA].[dbo].[iQclerk_SaleInvoicesAndProducts] as S2
on S1.SaleInvoiceID = S2.SaleInvoiceID
where S1.SaleInvoiceID > S2.SaleInvoiceID


When I parse the query, I keep getting an error message.

Deferred prepare could not be completed.
Statement(s) could not be prepared.
Invalid object name 'IQ_REPLICA.dbo.iQ_SaleInvoicesAndProducts'. (Microsoft SQL Native Client)

Anyone know an easy why to get this to work? Or should I add a create table to verify new records?

View 8 Replies View Related

How To Query Database Roles In Some Database?

Mar 7, 2008

How can I get all database roles from a specific database?

View 4 Replies View Related

Database Query

Jun 7, 2008

query to delete a single desired  record among 100  identical records in sql server
consider
             2     ravi
            2      ravi
           2       ravi
...............................                like that 100 records are there now how to delete 46th record from table

View 3 Replies View Related

Database Query

Mar 16, 2004

Is it possible to return the column names from the database using a SQL query,
what i need to do is
SELECT * FROM FEATURES WHERE 'VALUE' = 'YES'

i have a table which has a list of features and if they are selected i store the value yes, otherwise no . i want to be able to display a list of the features from the tables which have the value yes ! is this possible?

View 5 Replies View Related

Two Database Query Help

Mar 25, 2006

Can someone show me how to write a query, that will allow me to create one record, from two record fond in two other databases?
 
Thanks

View 2 Replies View Related

Query To Another Database

Nov 15, 2005

Dear all,

View 3 Replies View Related

How To Use Query To Get Sql Database Properties

Oct 2, 2006

Hi,I'm creating a User Interface to display Sql database Properties, but I cannot find the right query to retrieved the info on database properties. The status that I get is "ONLINE", but it should be "NORMAL". Cannot find the right query to get the date of last database backup, last transaction log backup, and maintenance plan, etc.. Please help me [:'(]  

View 2 Replies View Related

Get Values From Database Query

Jan 5, 2007

I have written the following lines myConnection = New MySqlConnection("server=" + dbServer + "; user id=" + dbUserID + "; password=" + dbPassword + "; database=" + dbName + "; pooling=false;")
strSQL = "SELECT * FROM user where type=1;" 
user table has name, tel, addr, id, type fieldsI would like to know how to use a string array to store the name in the result of strSQL?Thank you

View 1 Replies View Related

How To Query For NULL In A Database

May 31, 2007

 
  In my database, in a few tables there are NULL values in some of the columns. This is okay, but I need to know how to query for nulls. For example I tried the following query but it did not work:
select * from Employee where DateOfBirth =NULL
This did not work so I also tried the following:
select * from Employee where DateOfBirth ='NULL'
 
Neither of these worked. Can someone help me out?

View 1 Replies View Related

Query By Database Or Code

Nov 8, 2007

I have a database and would like to retrieve specific data via queries. This database is also connected to an ASP .Net 2.0 application to be the front end. Ive created the query in the database. Would you recommend i use parameter names to retrieve the data via code or should i have the query within my code to retrieve the data?
Thanks

View 6 Replies View Related

Attach Database By Query

Apr 23, 2008

Hi to all,           Is there any way to attach a database using query. 

View 1 Replies View Related

How Can I Get The Size Of The Database Query?

May 8, 2008

hi,
How can I get the database size through query?
How can I get the Size of the binary file(image file ) inserted in to the Image Data type of the SQL datatable?  

View 7 Replies View Related

Cross-database Query From ASP.NET

Feb 7, 2005

How do you write a SQL SELECT statement for a cross-database query in ASP.NET (ADO.NET). I understand the server.database.owner.table structure, but the command runs under a connection. How do I run a query under two connections?

View 1 Replies View Related

Database/Query Design Help

Oct 2, 2005

I am designing an ASP.NET app that can be used to keep track of
attendance at office hours for a class.  The purpose of this is
that we need to know if a student is attending office hours by
different people (so that we can flag them as "in trouble").  I
don't know if I have chosen the best database design, and I'm lost as
to how to accomplish a query I need.

I have a table HoursAttendance that has the following design.

Column_Name   Data_Type   Length   Allow_Nulls
TA              
      char        
      4         
n
Date              
    smalldatetime 4     
    n
Start              
    smallint         
2          n
End              
     smallint     
    2          n
Student1            
bit              
  1          y
Student2            
bit              
  1          y
Student3            
bit              
  1          y
Student4            
bit              
  1          y
Student5            
bit              
  1          y

I chose to have the students as columns because the students don't
change, and then you add rows of office hours.  If students are
the rows, then you would be adding columns as the semester continued
which I thought was odder...?  I'm completely open to suggestions
on Database Design, because I really wasn't sure.

Ok, so now I need useful queries.  The one that I am stuck on (and
also the first one besides select * from HoursAttendance) is that I
want the names of Students who have attended more than x office
hours.  So I need something like

    select <column name> from HoursAttendance where count(sum(<column name>)) > x

Granted a better table design could help with this.  I'm
relatively new to design, so constructive criticism is desired please

View 7 Replies View Related

How To Query Database Table

Oct 6, 2005

hi,   i've got problem on how to query my two tables:Table statuslogFIELDS:           row1                       row2ActId                 :  1                             2ActDate              :   2005-9-19           2005-9-18PIN(employee) :   P120                     P120ProjCode        :  1234                       123ActCode         :   B                            IMap#             :   map1                   kd145RegHrs           :    0.5                       7.0OtHrs             :     0                        2.0Status(%)      :   20                         100
Table DalsDataNewFIELDS:           row1                       row2ID                 :  24                            25Date              :   2005-9-19           2005-9-18PIN(employee) :   P120                     P120ProjCode        :  1234                       123ActCode         :   B                            IActMedium     : W(PC)                    W(PC)Map#             :   map1                   kd145RegHrs           :    0.5                       7.0OtHrs             :     0                        2.0Flag               :    0                           1Approved by    :  P084                       P083
if you will notice some fields of my tables have same value. these are: Date,ProjectCode,ActCode,RegHrs,OtHours
what i would like my output(data) to be in my datagrid:ActId,ID,Date,ProjectCode,ActCode,ActMedium,RegHrs,OTHrs,Status,Flag,Approved by
i have this query in 1 table only."SELECT * FROM statuslog WHERE statuslog.Pin = '"+Session("user")+"' and statuslog.ActDate >= '"+DateFirst+"' and statuslog.ActDate <= '"+DateEnd+"' ORDER BY statuslog.ActDate DESC"
but what i would do now is to query the two tables and same where clause in the query above.

View 1 Replies View Related

Multiple Database Query

Dec 4, 2000

Good afternoon one and all,

I want to write a query that will affect data across two databases (on the same server). How would I do this?

TIA for all help

Gurmi

View 1 Replies View Related

Sql Query For Getting Information From Different Database

Feb 18, 2003

I want to write a sql query for information from a table in different database but on the same server.

what is the syntax.


select * from databse2.owner.table ??


i am in application1 database and i want to query from application2 database on the same server.

use application1
go

Select * from application2.dbo.tablename
go



Is this query correct?

View 1 Replies View Related

Multiple Database Query

May 17, 1999

Hello,

Can anyone tell me if SQL Server 6.5 has anything similiar to linked tables in MS Access? I need to query two tables simultaneously that reside in separate SQL databases. Is this possible, or must the tables reside in the same database?

For example, I have two databases db1 and db2. Table1 is in db1 and Table2 is in db2. I want to query something like this:

"SELECT * FROM table1 WHERE fieldname1 in (SELECT fieldname2 FROM db2.Table2 WHERE...)

Thanks,
Andrew

View 1 Replies View Related

Query Database Information

Oct 11, 2001

Pardon the possibly senseless question - I have been an NT Administrator for some years, and have just gotten thrown into picking up some SQL DBA work and I'm still feeling my way around.

Is it possible to query the Master database for the setup information (etc) on the other databases? Several have been marked suspect due to a hard drive failure and I am trying to figure out what the original setup of the databases was.

Thanks,
Mary Elizabeth
NW Natural

View 1 Replies View Related

Database Properties Query

May 17, 2007

I've been asked to provide some information about databases on an sql server.

I can use the following query to provide the names of all the databases:

select * from master.dbo.sysdatabases

What I'm also looking to provide is the current "size" of the database. I'm trying to find a table that I can link to that would provide the database size. I can manually find this number by right clicking on the database from enterprise manager, selecting "properties" and picking it up from the general tab.

This is sql server 2K...

Thanks.

View 2 Replies View Related

Run 1 Query Against All Views In Database

Jul 16, 2014

In SQL server 2008 how can I run the same query against each view in that database?

One database about 75 views.

Or even something like
Select 'yes' from view
Where shipping_status = 'delayed'

And return a list of view names so I know which views to query against.

I ran

Code:
select name from sysobjects where type = v

And got a list of my views. How can I now run my SQL statement against the list to see which views contain the info?

View 1 Replies View Related

Query For Tables In A Database...

Feb 23, 2004

Good Morning

Shopping for help writing a query for my VB Program to execute against
SQL Server. Here is what I have so far:

SELECT name
FROM sysobjects
WHERE (xtype = 'U')

Is there a way to add to that query to get the list of tables that have the properties COST and PARTNUMBER?

Thanks,
Ed

View 6 Replies View Related

How To Know Database Size By Using Query ?

May 26, 2008

Hi,

How to know database size by using Query ?

-- Regards
Prashant

View 13 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved