Showing posts with label machine. Show all posts
Showing posts with label machine. Show all posts

Tuesday, March 27, 2012

count occurances in sql

Hi,

I am trying to count the times a machine has been scanned in to a table. what happens is everytime a product is read at a station it is entered in to the table with the following data

stationid
modelnumber
serialnumber

i want to establish a list of every machine that has been read at station id 15 but not station id 2 or 5, does this make sense? basically to establish what machines are not being read at points a and b but end up at point c.

obviously to do this i need to check the model and serials throughout the table to see if there is another occurance of it against station 2 or 5.

i have done this before but cannot recreate it for the lfie of me!

all help is greatly welcomed :)

Quote:

Originally Posted by 692909824

Hi,

I am trying to count the times a machine has been scanned in to a table. what happens is everytime a product is read at a station it is entered in to the table with the following data

stationid
modelnumber
serialnumber

i want to establish a list of every machine that has been read at station id 15 but not station id 2 or 5, does this make sense? basically to establish what machines are not being read at points a and b but end up at point c.

obviously to do this i need to check the model and serials throughout the table to see if there is another occurance of it against station 2 or 5.

i have done this before but cannot recreate it for the lfie of me!

all help is greatly welcomed :)


Your script should be:

SELECT *
FROM [TABLE]
WHERE serialno NOT IN
(SELECT serialno
FROM [TABLE]
WHERE stationid = 2 or stationid = 5)
ANDstationid =15

Thursday, March 22, 2012

couldn't rename or delete maintenance plan in Management Studio

Hi,
I tried to rename and delete one old maintenance plan which is created by
other DBA and before the machine was renamed. But, I kept getting the
following error. I can rename and delete the maintenance plan I created.
An error has occurred while establishing a connection to the server. When
connecting to SQL server 2005, this failure may be cuased by the fact that
under the default settinfs SQL server does not allow remote connections
(provider: Named Pipes providers, error: 40 - could not open a connection to
SQL server) (Microsoft SQL server, Error: 53)
Shared Memory, TCP and Named Piples are all enabled.
Please advise.
Best Regards,
Lynn
I think the problem is that the maintenance plan use the Local Server
Connection which still point to the old machine name. (I couldn't move this
connection or modify the server name for this connection at all). I add
another connection, but I still couldn't delete this maintenance plan.
Please advise.
Best Regards,
Lynn
"Lynn" wrote:

> Hi,
> I tried to rename and delete one old maintenance plan which is created by
> other DBA and before the machine was renamed. But, I kept getting the
> following error. I can rename and delete the maintenance plan I created.
> An error has occurred while establishing a connection to the server. When
> connecting to SQL server 2005, this failure may be cuased by the fact that
> under the default settinfs SQL server does not allow remote connections
> (provider: Named Pipes providers, error: 40 - could not open a connection to
> SQL server) (Microsoft SQL server, Error: 53)
> Shared Memory, TCP and Named Piples are all enabled.
> Please advise.
> --
> Best Regards,
> Lynn
|||I've been pounding my head with a similar problem. A Server was renamed and
now I can't do anything with the plan.
Any more thoughts?
"Lynn" wrote:
[vbcol=seagreen]
> I think the problem is that the maintenance plan use the Local Server
> Connection which still point to the old machine name. (I couldn't move this
> connection or modify the server name for this connection at all). I add
> another connection, but I still couldn't delete this maintenance plan.
> Please advise.
> --
> Best Regards,
> Lynn
>
> "Lynn" wrote:

Couldn't connect to MSDE

Hi all,

I'm developing smart device application in VB.NET.

I couldn't make the connection with MSDE.

MSDE is on the same machine where i'm developing my apps. & testing the result with emulator. (NOt using RDA or Replication).Simply using ADO.NET commands to select a table from MSDE engine.

Connection strings that i've tried:

In a stand alone System:

1)strconnection = "Server = 10.0.0.7;" & "Data Source =HOME\MYINS,1029;" & "Database = TEST;" & "Integrated Security=sspi;"

2)strconnection = "Server = 10.0.0.7;" & "Data Source =HOME\MYINS,1029;" & "Database = TEST;" & "Integrated Security=sspi;" & "User ID =vino;"& "Password =pavi;"

3)strconnection = "Server = 10.0.0.7;" & "Data Source =HOME\MYINS;" & "Database = TEST;" & "Integrated Security=sspi;" & "User ID =vino;"& "Password =pavi;"

In a Domain :
Server Machine name: FCC
Instance Name : FCC\MYINS

1)connectionString = "Integrated Security=sspi;User ID=DSTA\vino;Password=pavi;Initial Catalog=TEST;Data Source=FCC\MYINS";

2)connectionString = "Integrated Security=false;User ID=vino;Password=pavi;Initial Catalog=TEST;Data Source=FCC\MYINS";

3)connectionString = "Integrated Security=sspi;User ID=DSTA\vino;Password=pavi;Initial Catalog=TEST;Data Source=FCC\MYINS,1043";

4)connectionString = "Integrated Security=false;User ID=vino;Password=pavi;Initial Catalog=TEST;Data Source=FCC\FCC\MYINS,1043";


Errors when using standalone system:

1st connection given me error -> Login failed for user "HOME\Guest. (NOte:ALready i enabled the guest account)
2nd connection ->server not found or access denied.

In a Domain:

server not found or access denied Error.

My Computer Settings:

Computer name :HOME
WorkGroup:MSHOME
Guest account Enabled.
I've two instances in My Enterprise Manager
1) (local)(WIndows NT) - SQL server 2000
2) HOME\MYINS -MSDE instance.

I don't know what to do ? Any other setting are there? I tried in three standalone machines loaded with MSDE. but the same result.

Is there any other setting in Emulator? If so how come SQL server 2000 instance working well?

Please advice me to solve this problem. Nearly 4 days i spent to find the solution.But I couldn't. Kindly suggest me ideas.

Thank You.

Note:
1) Windows apps working well with this connection string.

2) In MSDE , TCP/IP & named Pipes are enabled.
Port NO : 1029 (I've seen it by selecting Properties then N/W Configuration)

3)Connectionis suceessfully established when i used SQL server 2000 instance.
But failed for MSDE.

4)In addition i've configured loopback adapter with valid IP(10.0.0.7).But No improvement with my connection.


1) Is your MSDE instance configured as Windows Authentication or Mixed Auth? Make sure you configure it as Mixed Auth if you want to use user ID/Password.

2) By "Guest account Enabled.", do you mean guest account in SQL Server or Windows? or both?

<<<< 1st connection given me error -> Login failed for user "HOME\Guest. (NOte:ALready i enabled the guest account) >>>>
This error msg means you are able to connect to the server, but failed because of credential. You have not grant access to HOME\Guest in MSDE. (windows authen is used here)

3) Have you checked errorlog or eventlog to get more info?

|||

Hi,

1) I'm using Mixed mode authentication.

2) Actually Guest account in Windows server 2003 was disabled earlier. I Enabled it manually.

3)I didn't chect Eventlog &errorlog. how to check them?

is it like Mycomputer--> Manage >services?

4)I've dirctly connected my PDA with server .it's not pinging.

PDA IP : xxx.xxx.x.101(i've selected VPN connection )

server IP :xxx.xxx.x.100.

In case of emulator, apps running m/c(windows xp) is pinging with server.

But connection not established.

How to make PDA to ping with server? & how to establish a successful connection?

Thanks!!!

Tuesday, March 20, 2012

Couldn't connect to MSDE

Hi all,

I'm developing smart device application in VB.NET.

I couldn't make the connection with MSDE.

MSDE is on the same machine where i'm developing my apps. & testing the result with emulator. (NOt using RDA or Replication).Simply using ADO.NET commands to select a table from MSDE engine.

Connection strings that i've tried:

In a stand alone System:

1)strconnection = "Server = 10.0.0.7;" & "Data Source =HOME\MYINS,1029;" & "Database = TEST;" & "Integrated Security=sspi;"

2)strconnection = "Server = 10.0.0.7;" & "Data Source =HOME\MYINS,1029;" & "Database = TEST;" & "Integrated Security=sspi;" & "User ID =vino;"& "Password =pavi;"

3)strconnection = "Server = 10.0.0.7;" & "Data Source =HOME\MYINS;" & "Database = TEST;" & "Integrated Security=sspi;" & "User ID =vino;"& "Password =pavi;"

In a Domain :
Server Machine name: FCC
Instance Name : FCC\MYINS

1)connectionString = "Integrated Security=sspi;User ID=DSTA\vino;Password=pavi;Initial Catalog=TEST;Data Source=FCC\MYINS";

2)connectionString = "Integrated Security=false;User ID=vino;Password=pavi;Initial Catalog=TEST;Data Source=FCC\MYINS";

3)connectionString = "Integrated Security=sspi;User ID=DSTA\vino;Password=pavi;Initial Catalog=TEST;Data Source=FCC\MYINS,1043";

4)connectionString = "Integrated Security=false;User ID=vino;Password=pavi;Initial Catalog=TEST;Data Source=FCC\FCC\MYINS,1043";


Errors when using standalone system:

1st connection given me error -> Login failed for user "HOME\Guest. (NOte:ALready i enabled the guest account)
2nd connection ->server not found or access denied.

In a Domain:

server not found or access denied Error.

My Computer Settings:

Computer name :HOME
WorkGroup:MSHOME
Guest account Enabled.
I've two instances in My Enterprise Manager
1) (local)(WIndows NT) - SQL server 2000
2) HOME\MYINS -MSDE instance.

I don't know what to do ? Any other setting are there? I tried in three standalone machines loaded with MSDE. but the same result.

Is there any other setting in Emulator? If so how come SQL server 2000 instance working well?

Please advice me to solve this problem. Nearly 4 days i spent to find the solution.But I couldn't. Kindly suggest me ideas.

Thank You.

Note:
1) Windows apps working well with this connection string.

2) In MSDE , TCP/IP & named Pipes are enabled.
Port NO : 1029 (I've seen it by selecting Properties then N/W Configuration)

3)Connectionis suceessfully established when i used SQL server 2000 instance.
But failed for MSDE.

4)In addition i've configured loopback adapter with valid IP(10.0.0.7).But No improvement with my connection.


1) Is your MSDE instance configured as Windows Authentication or Mixed Auth? Make sure you configure it as Mixed Auth if you want to use user ID/Password.

2) By "Guest account Enabled.", do you mean guest account in SQL Server or Windows? or both?

<<<< 1st connection given me error -> Login failed for user "HOME\Guest. (NOte:ALready i enabled the guest account) >>>>
This error msg means you are able to connect to the server, but failed because of credential. You have not grant access to HOME\Guest in MSDE. (windows authen is used here)

3) Have you checked errorlog or eventlog to get more info?

|||

Hi,

1) I'm using Mixed mode authentication.

2) Actually Guest account in Windows server 2003 was disabled earlier. I Enabled it manually.

3)I didn't chect Eventlog &errorlog. how to check them?

is it like Mycomputer--> Manage >services?

4)I've dirctly connected my PDA with server .it's not pinging.

PDA IP : xxx.xxx.x.101(i've selected VPN connection )

server IP :xxx.xxx.x.100.

In case of emulator, apps running m/c(windows xp) is pinging with server.

But connection not established.

How to make PDA to ping with server? & how to establish a successful connection?

Thanks!!!

could not start the database engine service in Sql Server 2005

Dear All,

I am not able to start the sql server 2005 database engine services...

Sql server 2005 server is installed in one machine(SERVER) and we have 10 client machine connecting to the server

When i try to start the service from the Service.msc in the SERVER i am getting the following error

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

Cannot connect to KEYSKILL.

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

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) (.Net SqlClient Data Provider)


Error Number: 2
Severity: 20
State: 0

Program Location:

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.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
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 Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

Could any one help me to resolve the error

Thanks in Advance

Lalitha

Look in the Windows event log, there might be a hardware failure which is described in the event log. If you are not sure what to do with the log, send them over for investigation.

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||Could you post Errorlog & Event log information which will provide more info to sort out the problem.|||

HI Vidya,

This is the ERROR LOG information

2007-07-17 10:28:38.56 Server Microsoft SQL Server 2005 - 9.00.1406.00 (Intel X86)
Mar 3 2007 18:40:02
Copyright (c) 1988-2005 Microsoft Corporation
Developer Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

2007-07-17 10:28:38.56 Server (c) 2005 Microsoft Corporation.
2007-07-17 10:28:38.56 Server All rights reserved.
2007-07-17 10:28:38.56 Server Server process ID is 3332.
2007-07-17 10:28:38.56 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
2007-07-17 10:28:38.56 Server This instance of SQL Server last reported using a process ID of 6000 at 7/17/2007 10:28:33 AM (local) 7/17/2007 4:58:33 AM (UTC). This is an informational message only; no user action is required.
2007-07-17 10:28:38.56 Server Registry startup parameters:
2007-07-17 10:28:38.56 Server -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
2007-07-17 10:28:38.56 Server -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
2007-07-17 10:28:38.56 Server -l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
2007-07-17 10:28:38.57 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2007-07-17 10:28:38.57 Server Detected 2 CPUs. This is an informational message; no user action is required.
2007-07-17 10:28:38.75 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2007-07-17 10:28:38.76 Server Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2007-07-17 10:28:39.79 Server Attempting to recover in-doubt distributed transactions involving Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2007-07-17 10:28:39.79 Server Database Mirroring Transport is disabled in the endpoint configuration.
2007-07-17 10:28:39.81 spid5s Starting up database 'master'.
2007-07-17 10:28:39.93 spid5s SQL Trace ID 1 was started by login "sa".
2007-07-17 10:28:39.95 spid5s Starting up database 'mssqlsystemresource'.
2007-07-17 10:28:39.98 spid5s Error: 17207, Severity: 16, State: 1.
2007-07-17 10:28:39.98 spid5s FCB:Surprisepen: Operating system error 21(The device is not ready.) occurred while creating or opening file 'E:\sql\MSSQL.1\MSSQL\DATA\mssqlsystemresource.mdf'. Diagnose and correct the operating system error, and retry the operation.
2007-07-17 10:28:39.98 spid5s Error: 17204, Severity: 16, State: 1.
2007-07-17 10:28:39.98 spid5s FCB:Surprisepen failed: Could not open file E:\sql\MSSQL.1\MSSQL\DATA\mssqlsystemresource.mdf for file number 1. OS error: 21(The device is not ready.).
2007-07-17 10:28:39.98 spid5s Error: 5120, Severity: 16, State: 101.
2007-07-17 10:28:39.98 spid5s Unable to open the physical file "E:\sql\MSSQL.1\MSSQL\DATA\mssqlsystemresource.mdf". Operating system error 21: "21(The device is not ready.)".
2007-07-17 10:28:40.00 spid5s Error: 17207, Severity: 16, State: 1.
2007-07-17 10:28:40.00 spid5s FileMgr:Tongue TiedtartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'E:\sql\MSSQL.1\MSSQL\DATA\mssqlsystemresource.ldf'. Diagnose and correct the operating system error, and retry the operation.
2007-07-17 10:28:40.00 spid5s File activation failure. The physical file name "E:\sql\MSSQL.1\MSSQL\DATA\mssqlsystemresource.ldf" may be incorrect.
2007-07-17 10:28:40.00 spid5s Error: 945, Severity: 14, State: 2.
2007-07-17 10:28:40.00 spid5s Database 'mssqlsystemresource' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
2007-07-17 10:28:40.00 spid5s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

and i didnt find the event log file....

could u please tell me the path...

Regards

Lalitha

|||

Examine the location

E:\sql\MSSQL.1\MSSQL\DATA\mssqlsystemresource.*"


Does the file exist ?
Does the service account have the appropiate permissions to access it ?
Does the directory exists ?
is the directory on a shared network drive ?

Jens K. Suessmeyer

http://www.sqlserver2005.de

Friday, February 24, 2012

Could not connect server from client machine

Hi all

I m a new member to this forum. Im a hardware engineer who rectify aome software related issues. Now our employees having problem with connecting their XP prof based clients to 2003 server from SQL query analyzer. I tried refresh sql server manager in server and tried restarting the server machine many times. sometimes it the client machine connects and disconnects immediately. i aslo tried changing the poll interval , but no use.

waiting for a speedy solutin... i know this is as easy query.

Hi mvramsubbu,

A warm welcome to forum

You need to digg more to get the Exact erro message refer Windows Event Viewer and SQL Server's Error Log for error and post them here so that you can get a good answer. unless you post the error message we can not help you.

Hemantgiri S. Goswami

Sunday, February 19, 2012

Could IIS and SQL Server in two machine

I install my Reporting in a server of Sql server and IIS together.
I found the server is too busy.
Could I install reporting service in another server that without Sql server.You definitely can. You important point, you need a license anywhere you
install the server component of Reporting Services. You can install the
report designer anywhere you want but when you install the server you need
to have a license, regardless of whether SQL Server DB is running on the
same box or not.
Bruce L-C
"ad" <ad@.wfes.tcc.edu.tw> wrote in message
news:eLqjVDJpEHA.3624@.TK2MSFTNGP10.phx.gbl...
>I install my Reporting in a server of Sql server and IIS together.
> I found the server is too busy.
> Could I install reporting service in another server that without Sql
> server.
>|||Yes, you can install the web portion of RS on a separate box then SQL. You
will however need a license for both machines then.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"ad" <ad@.wfes.tcc.edu.tw> wrote in message
news:eLqjVDJpEHA.3624@.TK2MSFTNGP10.phx.gbl...
> I install my Reporting in a server of Sql server and IIS together.
> I found the server is too busy.
> Could I install reporting service in another server that without Sql
server.
>