Showing posts with label query. Show all posts
Showing posts with label query. Show all posts

Thursday, March 29, 2012

Console apps work for SA but no other user

Hi

My console applications work forSA and no other user. I can run the Stored procedures used in the console application from Query analyser when logged in with username/password that I am attempting to use for console applications. I am using SQL server authenication. User access permissions look ok in Enterprise Manager. Access is permit for my user.

Any suggestions?

Thanks

Permissions in SQL are much more than just access permit. You should also grant EXECUTE permssion for a stored procedure to a user if you want the user to execute the stored procedure; or you can create a role and add the user as member, then grant proper permissions to the role. To understand permissions related concepts in SQL, you can start from here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/acdata/ac_8_qd_03_8q2b.asp

sqlsql

console apps only work if user is SA

Hi

When I try to use a user other then SA my console apps don't work.

I can run the Stored Procedures used in console application from Query analyser when logged in with the username/password that
I'm attempting to use for the console applications.

Under Users in Enterprise Manager Database access is 'permit' for my user.

By the way my web application which uses the same user name and password as in console applications is working. I also have dts packages running using dtsexec accessing the database with the same user name and password and they work fine.

MDAC 2.8 SP2 on windows server 2003 spi

C:\Program Files\Microsoft SQL Server\80\Tools\Binn>ODBCPING.EXE -S xxx.xxx.xxx.xxx
-U myusername -P mypassword

CONNECTED TO SQL SERVER

ODBC SQL Server Driver Version: 03.86.1830

SQL Server Version: Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

If the connection is available then why is the adapter.fill method failing?

I tried it using a text sql statement and that doesn't work either.

The problem isn't database specific as I did a test .bat on Northwind sample database and got same 'general network error'

Here's the error:

apps\Exports>exporter.bat

Unhandled Exception: System.Data.SqlClient.SqlException: General network error.
Check your network documentation.
at System.Data.SqlClient.ConnectionPool.CreateConnection()
at System.Data.SqlClient.ConnectionPool.UserCreateRequest()
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransactio
n)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConn
ectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, Conne
ctionState& originalState)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startR
ecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior be
havior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)

//Testing using SELECT statement as command text

D\Test>Test.bat

D:\Test>TestDBAccess.exe "server=xxx.xxx.xxx.xxx;uid=xxxx;pwd=xxx;
database=Northwind;"

Unhandled Exception: System.Data.SqlClient.SqlException: General network error.
Check your network documentation.
at System.Data.SqlClient.ConnectionPool.CreateConnection()
at System.Data.SqlClient.ConnectionPool.UserCreateRequest()
at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransactio
n)
at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConn
ectionString options, Boolean& isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()

D:\Test>

Any ideas/help much appreciated!

Hi,

would be cool if you could show us your code.Sometimes people hardcode certain properties (I confess that I did that on my own one time :-) ) which will lead to an error where usally there shouldn′t be an error (especially in console apps where connection properties are passed via arguments which isn′t testable while debugging within VS)

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Hi,

Here's the essentials of the code (without some try catch statements).

Thanks.

KH

.bat file

::arg 0 Connection String
::arg 1 Export Path //just a path where I want the output file to go


Exporter.exe "server=xxx.xxx.xxx.xxx;uid=username;pwd=password;database=DATABASENAME;" "d:\\xxx\\xxx\\ExportOut\\"


Source code


using System;

using System.Data;
using System.Security;
using System.Security.Permissions;
using System.Security.Policy;
using System.Configuration;
using System.Data.SqlClient;
using System.IO;


namespace Exporter
{
class Export
{

private static String ConnectionString;

private static String ExportPath;

private static StreamWriter ExportLog;

[STAThread]
static void Main(string[] args)
{

ConnectionString = args[0];

ExportPath = args[1];

String DateString = System.DateTime.Today.Day.ToString() + "_" + System.DateTime.Today.Month.ToString();

ExportLog = new StreamWriter(ExportPath+"Export_Log_"+DateString+".txt");

DoExport();

ExportLog.Close();

}

private static void DoExport()
{

ExportLog.WriteLine("Beginning export");
GetData());


}



private static void GetData()
{


SqlCommand SelectCommand = new SqlCommand();

SelectCommand.CommandType=(System.Data.CommandType.StoredProcedure);

SelectCommand.CommandText="GetCSVOutput";

SqlConnection Conn = new SqlConnection(ConnectionString);

SelectCommand.Connection=Conn;



SqlDataAdapter ReportAdapter = new SqlDataAdapter();

FaultReportAdapter.SelectCommand=SelectCommand;

DataSet ReportData = new DataSet();


ReportAdapter.Fill(ReportData,"Report");

if (ReportData.Tables["Report"].Rows.Count == 0)
{
Conn.Close();
ExportLog.WriteLine("No reports to export");
return false;

}
else
{
Conn.Close();
return MakeFile(ReportData);

}

}


private static void MakeFile(DataSet FaultReportData)
{


/* Just prints out the results of Stored procedure to file and closes file */




}


|||Hi,

beside that the FaultReportDapater doesn′t exists (but I guess this is just a typo) you can try disabling the connection pool to see if it is based on this with adding the keywords "Pooling=False" to the connecting string.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de
|||

Hi,

Yes that was just a typo. With pooling set to false I still get the same error.

Thanks

KH

|||

What is the call stack of the exception if you disable pooling?

|||

Here's the call stack with pooling set to false.

D:\apps\Export>exporter.bat

D:\content\apps>Exporter.exe "server=xxx.xxx.xxx.xxx;uid=xxxx;pwd=;database=xxxx;pooling=False" "d:\\Content\\xxxx\\ExportOut\\"

Unhandled Exception: System.Data.SqlClient.SqlException: General network error.
Check your network documentation.
at System.Data.SqlClient.SqlInternalConnection.OpenAndLogin()
at System.Data.SqlClient.SqlInternalConnection..ctor(SqlConnection connection
, SqlConnectionString connectionOptions)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, Conne
ctionState& originalState)
at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startR
ecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior be
havior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at Exporter.Export.GetData() in
\\xxxx\dotnet_dll_production
\xxxx\xxxxx\export.cs:line 536
at Exporter.Export.DoExport() in
\\xxxx\dotnet_dll_production\xxxx\xxxx\export.cs:line 143
at Exporter.Export.Main(String[] args) in \\xxxx\dotnet_dll_produc
tion\xxxx\xxxx\export.cs:line 95

D:\apps\Export>

Tuesday, March 27, 2012

Consecutive Hours Query

This will challenge you. I have a table that shows time in/ time out
values per person. I need to know how many consecutive hours a person
worked. How would I get the consecutive hours?
Here's some sample data:
SSN TimeIN TimeOut HoursWorked
1 12:00 PM 8:00 PM 8
1 8:00 PM 11:00 PM 3
1 11:00 PM 12:00 AM 1
1 6:00 AM 9:00 AM 3
The records starting with 8:00 PM and 11:00 PM are consecutive with
the records before them. The result I would need would be
SSN TimeIN TimOut ConsecutiveHours
1 11:00 PM 12:00 AM 12
The result would show the TimeIn/TimeOut time at which the consecutive
hours ended.
Following Query should return you the First TimeIn/ last TimeEnd from the
first consecutive group.
CREATE TABLE [TimeLog] (
[SSN] [int] NULL ,
[TimeIn] [smalldatetime] NULL ,
[TimeOut] [smalldatetime] NULL ,
[HoursWorked] [int] NULL
) ON [PRIMARY]
GO
INSERT INTO TimeLog (SSN,TimeIn,TimeOut,HoursWorked )
VALUES (1,'1/14/2008 12:00:00 PM','1/14/2008 8:00:00 PM',8 )
INSERT INTO TimeLog (SSN,TimeIn,TimeOut,HoursWorked )
VALUES (1,'1/14/2008 8:00:00 PM','1/14/2008 11:00:00 PM',3 )
INSERT INTO TimeLog (SSN,TimeIn,TimeOut,HoursWorked )
VALUES (1,'1/14/2008 11:00:00 PM','1/15/2008',1 )
INSERT INTO TimeLog (SSN,TimeIn,TimeOut,HoursWorked )
VALUES (1,'1/15/2008 6:00:00 AM','1/15/2008 9:00:00 AM',3 )
SELECT * FROM TimeLog
SELECT SSN,Min(TimeIn) as TimeIn,MAX(TimeOut) as TimeOut,SUM(HoursWorked) as
HoursWorked
FROM TimeLog t1
WHERE exists
(
SELECT 1
FROM TimeLog t2
WHERE
t2.ssn = t1.ssn AND t2.TimeIn <= t1.TimeIn
HAVING DATEDIFF(hh,MIN(t2.TimeIN), MAX(t2.TimeOut)) = SUM(HoursWorked)
)
GROUP BY SSN
- Sha Anand
"bean" wrote:

> This will challenge you. I have a table that shows time in/ time out
> values per person. I need to know how many consecutive hours a person
> worked. How would I get the consecutive hours?
> Here's some sample data:
> SSN TimeIN TimeOut HoursWorked
> 1 12:00 PM 8:00 PM 8
> 1 8:00 PM 11:00 PM 3
> 1 11:00 PM 12:00 AM 1
> 1 6:00 AM 9:00 AM 3
> The records starting with 8:00 PM and 11:00 PM are consecutive with
> the records before them. The result I would need would be
> SSN TimeIN TimOut ConsecutiveHours
> 1 11:00 PM 12:00 AM 12
> The result would show the TimeIn/TimeOut time at which the consecutive
> hours ended.
>
sqlsql

Consecutive Hours Query

This will challenge you. I have a table that shows time in/ time out
values per person. I need to know how many consecutive hours a person
worked. How would I get the consecutive hours?
Here's some sample data:
SSN TimeIN TimeOut HoursWorked
1 12:00 PM 8:00 PM 8
1 8:00 PM 11:00 PM 3
1 11:00 PM 12:00 AM 1
1 6:00 AM 9:00 AM 3
The records starting with 8:00 PM and 11:00 PM are consecutive with
the records before them. The result I would need would be
SSN TimeIN TimOut ConsecutiveHours
1 11:00 PM 12:00 AM 12
The result would show the TimeIn/TimeOut time at which the consecutive
hours ended.Following Query should return you the First TimeIn/ last TimeEnd from the
first consecutive group.
CREATE TABLE [TimeLog] (
[SSN] [int] NULL ,
[TimeIn] [smalldatetime] NULL ,
[TimeOut] [smalldatetime] NULL ,
[HoursWorked] [int] NULL
) ON [PRIMARY]
GO
INSERT INTO TimeLog (SSN,TimeIn,TimeOut,HoursWorked )
VALUES (1,'1/14/2008 12:00:00 PM','1/14/2008 8:00:00 PM',8 )
INSERT INTO TimeLog (SSN,TimeIn,TimeOut,HoursWorked )
VALUES (1,'1/14/2008 8:00:00 PM','1/14/2008 11:00:00 PM',3 )
INSERT INTO TimeLog (SSN,TimeIn,TimeOut,HoursWorked )
VALUES (1,'1/14/2008 11:00:00 PM','1/15/2008',1 )
INSERT INTO TimeLog (SSN,TimeIn,TimeOut,HoursWorked )
VALUES (1,'1/15/2008 6:00:00 AM','1/15/2008 9:00:00 AM',3 )
SELECT * FROM TimeLog
SELECT SSN,Min(TimeIn) as TimeIn,MAX(TimeOut) as TimeOut,SUM(HoursWorked) as
HoursWorked
FROM TimeLog t1
WHERE exists
(
SELECT 1
FROM TimeLog t2
WHERE
t2.ssn = t1.ssn AND t2.TimeIn <= t1.TimeIn
HAVING DATEDIFF(hh,MIN(t2.TimeIN), MAX(t2.TimeOut)) = SUM(HoursWorked)
)
GROUP BY SSN
- Sha Anand
"bean" wrote:
> This will challenge you. I have a table that shows time in/ time out
> values per person. I need to know how many consecutive hours a person
> worked. How would I get the consecutive hours?
> Here's some sample data:
> SSN TimeIN TimeOut HoursWorked
> 1 12:00 PM 8:00 PM 8
> 1 8:00 PM 11:00 PM 3
> 1 11:00 PM 12:00 AM 1
> 1 6:00 AM 9:00 AM 3
> The records starting with 8:00 PM and 11:00 PM are consecutive with
> the records before them. The result I would need would be
> SSN TimeIN TimOut ConsecutiveHours
> 1 11:00 PM 12:00 AM 12
> The result would show the TimeIn/TimeOut time at which the consecutive
> hours ended.
>

Sunday, March 25, 2012

Connecto to remote SQL Server

Hi, community

I want to connect a program (like query analyzer) in home, to the sql server in office via internet, but i can't log in to the remote server. Someone know how to establish the connection?

Thanks to all of you!!!You will need to get permission from you network group to VPN into the network.|||thank you, but can you be a little more detailed?|||You need to talk to your network group and have them give you VPN access and tell you how to use it.|||I've tryed lot of things but cant connect!!!!, i try to establish a VPN in win 2k3 server as Server and winXP Prof as client, but it is impossible to get connected!!!

I finally get the VPN connection, i've missing directives, but now i cant connect to SQL Server!

Monday, March 19, 2012

ConnectionRead (InvalidParam()) error

I get the following error sometimes when I execute a store procedure from SQ
L
Query Analyzer. After a few more attempts, the query succeeds... How can I
troubleshoot this network error...
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (Inv
alidParam()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection BrokeFirst thing to check, just like the message stated, "General network error.
Check your network documentation." The fact that it sometimes works and
sometimes not points to an unstable network.
hth
Quentin
"Shaila" <Shailaja @.discussions.microsoft.com> wrote in message
news:03329249-66CC-4806-91A9-D5434C3130D9@.microsoft.com...
>I get the following error sometimes when I execute a store procedure from
>SQL
> Query Analyzer. After a few more attempts, the query succeeds... How can I
> troubleshoot this network error...
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead
> (InvalidParam()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broke

ConnectionRead (InvalidParam()) error

Somtimes I get the following error in SQL query Analyzer when executing a
store procedure. After a few attempts the query succeeds but how can i
resolve this issue...
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (Inv
alidParam()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection BrokeHi,
This is due to the network that you are having. Due to network congestion u
might be facing this problem. Try to enhance the network and try again
"Shaila" wrote:

> Somtimes I get the following error in SQL query Analyzer when executing a
> store procedure. After a few attempts the query succeeds but how can i
> resolve this issue...
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (I
nvalidParam()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broke

ConnectionRead (InvalidParam()) error

Somtimes I get the following error in SQL query Analyzer when executing a
store procedure. After a few attempts the query succeeds but how can i
resolve this issue...
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (InvalidParam()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection BrokeHi,
This is due to the network that you are having. Due to network congestion u
might be facing this problem. Try to enhance the network and try again
"Shaila" wrote:
> Somtimes I get the following error in SQL query Analyzer when executing a
> store procedure. After a few attempts the query succeeds but how can i
> resolve this issue...
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (InvalidParam()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broke

ConnectionRead (InvalidParam()) error

I get the following error sometimes when I execute a store procedure from SQL
Query Analyzer. After a few more attempts, the query succeeds... How can I
troubleshoot this network error...
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (InvalidParam()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection BrokeFirst thing to check, just like the message stated, "General network error.
Check your network documentation." The fact that it sometimes works and
sometimes not points to an unstable network.
hth
Quentin
"Shaila" <Shailaja @.discussions.microsoft.com> wrote in message
news:03329249-66CC-4806-91A9-D5434C3130D9@.microsoft.com...
>I get the following error sometimes when I execute a store procedure from
>SQL
> Query Analyzer. After a few more attempts, the query succeeds... How can I
> troubleshoot this network error...
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead
> (InvalidParam()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broke

ConnectionRead (InvalidParam()) error

I get the following error sometimes when I execute a store procedure from SQL
Query Analyzer. After a few more attempts, the query succeeds... How can I
troubleshoot this network error...
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (InvalidParam()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broke
First thing to check, just like the message stated, "General network error.
Check your network documentation." The fact that it sometimes works and
sometimes not points to an unstable network.
hth
Quentin
"Shaila" <Shailaja @.discussions.microsoft.com> wrote in message
news:03329249-66CC-4806-91A9-D5434C3130D9@.microsoft.com...
>I get the following error sometimes when I execute a store procedure from
>SQL
> Query Analyzer. After a few more attempts, the query succeeds... How can I
> troubleshoot this network error...
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead
> (InvalidParam()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broke

ConnectionRead (InvalidParam()) error

Somtimes I get the following error in SQL query Analyzer when executing a
store procedure. After a few attempts the query succeeds but how can i
resolve this issue...
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (InvalidParam()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.
Connection Broke
Hi,
This is due to the network that you are having. Due to network congestion u
might be facing this problem. Try to enhance the network and try again
"Shaila" wrote:

> Somtimes I get the following error in SQL query Analyzer when executing a
> store procedure. After a few attempts the query succeeds but how can i
> resolve this issue...
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionRead (InvalidParam()).
> Server: Msg 11, Level 16, State 1, Line 0
> General network error. Check your network documentation.
> Connection Broke

Wednesday, March 7, 2012

connection to miltiple server

i want to open query with server1 = 'server1.datasource'

in this query i want to connect to 'server2.datasource '

for copy record between the servers .

can i do it with sql server management studio?

You will want to define a Linked Server

http://msdn2.microsoft.com/en-us/library/ms190479.aspx

Or use OPENDATASOURCE

http://msdn2.microsoft.com/en-us/library/ms179856.aspx

Using the Linked Server you can then reference tables with the four-part name (server.database.schema.table)

|||

gabriel_333 wrote:

can i do it with sql server management studio?

I hope you can use the OPENROWSET.

See more on Books Online regarding OPENROWSET.

|||

I HAVE AN OLE DB SYSTEM DSN = SQLDATCON

WHEN I RUN :

SELECT *

FROM OPENDATASOURCE('SQLDATCON',

'Data Source=SQLDAT;USER ID = ?;PASSWORD =?')

.DBNAME.dbo.TB_ACID

I GET MESSAGE :

Msg 7403, Level 16, State 1, Line 6

The OLE DB provider "SQLDATCON" has not been registered.

|||

Try:

SELECT *

FROM

OPENDATASOURCE('SQLOLEDB', 'dsn=SQLDATCON;USER ID = ?;PASSWORD =?').DBNAME.dbo.TB_ACID

|||

thanks a lot!

i got possitive rspond from the server :' hd hook must have administrator permission '

this is the first life signal

when i need this query i will ask administrater to enable the surface area opendatasource

connection to miltiple server

i want to open query with server1 = 'server1.datasource'

in this query i want to connect to 'server2.datasource '

for copy record between the servers .

can i do it with sql server management studio?

You will want to define a Linked Server

http://msdn2.microsoft.com/en-us/library/ms190479.aspx

Or use OPENDATASOURCE

http://msdn2.microsoft.com/en-us/library/ms179856.aspx

Using the Linked Server you can then reference tables with the four-part name (server.database.schema.table)

|||

gabriel_333 wrote:

can i do it with sql server management studio?

I hope you can use the OPENROWSET.

See more on Books Online regarding OPENROWSET.

|||

I HAVE AN OLE DB SYSTEM DSN = SQLDATCON

WHEN I RUN :

SELECT*

FROMOPENDATASOURCE('SQLDATCON',

'Data Source=SQLDAT;USER ID = ?;PASSWORD =?')

.DBNAME.dbo.TB_ACID

I GET MESSAGE :

Msg 7403, Level 16, State 1, Line 6

The OLE DB provider "SQLDATCON" has not been registered.

|||

Try:

SELECT*

FROM

OPENDATASOURCE('SQLOLEDB', 'dsn=SQLDATCON;USER ID = ?;PASSWORD =?').DBNAME.dbo.TB_ACID

|||

thanks a lot!

i got possitive rspond from the server :' hd hook must have administrator permission '

this is the first life signal

when i need this query i will ask administrater to enable the surface area opendatasource

connection to another server

Hello there
I'm working with query anlyser.
Is there a way with code to transfare to another server?
Roy,
Transfer what? Can you please explain in a little more detail what you want
to accomplish?
Andrew J. Kelly SQL MVP
"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:%23akEH2GCGHA.1312@.TK2MSFTNGP09.phx.gbl...
> Hello there
> I'm working with query anlyser.
> Is there a way with code to transfare to another server?
>
|||Yes Andrew
It begun from another issue i've asked on DTS aboud the log file.
I dound the property you said about TABLOCK by using sp_tableoption and it
worked fine: the log file hasen't grow in a bit. Thanks
I could run the store procedure only on the destination object by connect it
by query anlyser
I'm trying to build store procedure that will do all the options. In order
to do that i must run sp_tableoption on the destination tables on the
diffrent server. and the store procedure must start from the source server
How can i do that?
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:elQeVHJCGHA.4040@.TK2MSFTNGP12.phx.gbl...
> Roy,
> Transfer what? Can you please explain in a little more detail what you
want
> to accomplish?
> --
> Andrew J. Kelly SQL MVP
>
> "Roy Goldhammer" <roy@.hotmail.com> wrote in message
> news:%23akEH2GCGHA.1312@.TK2MSFTNGP09.phx.gbl...
>
|||It doesn't matter where you run QA from as the code itself is always run on
the server itself, not the client. So I am still confused as to what you
want to do that you can't already. Is it a permissions issue?
Andrew J. Kelly SQL MVP
"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:%23Y2h8LJCGHA.3936@.TK2MSFTNGP12.phx.gbl...
> Yes Andrew
> It begun from another issue i've asked on DTS aboud the log file.
> I dound the property you said about TABLOCK by using sp_tableoption and it
> worked fine: the log file hasen't grow in a bit. Thanks
> I could run the store procedure only on the destination object by connect
> it
> by query anlyser
> I'm trying to build store procedure that will do all the options. In order
> to do that i must run sp_tableoption on the destination tables on the
> diffrent server. and the store procedure must start from the source server
> How can i do that?
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:elQeVHJCGHA.4040@.TK2MSFTNGP12.phx.gbl...
> want
>

connection to another server

Hello there
I'm working with query anlyser.
Is there a way with code to transfare to another server?Roy,
Transfer what? Can you please explain in a little more detail what you want
to accomplish?
Andrew J. Kelly SQL MVP
"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:%23akEH2GCGHA.1312@.TK2MSFTNGP09.phx.gbl...
> Hello there
> I'm working with query anlyser.
> Is there a way with code to transfare to another server?
>|||Yes Andrew
It begun from another issue i've asked on DTS aboud the log file.
I dound the property you said about TABLOCK by using sp_tableoption and it
worked fine: the log file hasen't grow in a bit. Thanks
I could run the store procedure only on the destination object by connect it
by query anlyser
I'm trying to build store procedure that will do all the options. In order
to do that i must run sp_tableoption on the destination tables on the
diffrent server. and the store procedure must start from the source server
How can i do that?
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:elQeVHJCGHA.4040@.TK2MSFTNGP12.phx.gbl...
> Roy,
> Transfer what? Can you please explain in a little more detail what you
want
> to accomplish?
> --
> Andrew J. Kelly SQL MVP
>
> "Roy Goldhammer" <roy@.hotmail.com> wrote in message
> news:%23akEH2GCGHA.1312@.TK2MSFTNGP09.phx.gbl...
>|||It doesn't matter where you run QA from as the code itself is always run on
the server itself, not the client. So I am still confused as to what you
want to do that you can't already. Is it a permissions issue?
Andrew J. Kelly SQL MVP
"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:%23Y2h8LJCGHA.3936@.TK2MSFTNGP12.phx.gbl...
> Yes Andrew
> It begun from another issue i've asked on DTS aboud the log file.
> I dound the property you said about TABLOCK by using sp_tableoption and it
> worked fine: the log file hasen't grow in a bit. Thanks
> I could run the store procedure only on the destination object by connect
> it
> by query anlyser
> I'm trying to build store procedure that will do all the options. In order
> to do that i must run sp_tableoption on the destination tables on the
> diffrent server. and the store procedure must start from the source server
> How can i do that?
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:elQeVHJCGHA.4040@.TK2MSFTNGP12.phx.gbl...
> want
>

Connection Timeout

Hi, I have a client application that submits heavy processing query to an instance of Sql Server 2005 (Enteriprise Edition). After a few seconds the following exception is raised: "The time available has expired before the completion of the operation or the server is not responding". If I submit to the same application light processing queries the exception is not raised.
The client application is written in VB.net and uses ADO.net. (SqlConnection, SqlCommand,.. classes). The "Timeout connection" property is set to 1000.
Any suggestion?
Thank you.

Hi Ivan,

The ConnectionTimeout property of SqlConnection defines the time boundaries to open a physical connection to the SQL Server. In your case, the physical connection seems to be established within a reasonable frame. However, after the connection is up, the client and the server begin exchanging security information as part of the login process. This is related to a different "login timeout", which unfortunately you don't seem to be able to control from SqlClient.

What is happening on the server during the login process is related to the SOS scheduler operations - I won't go into deep detail, but in a nutshell all the tasks (including processing of login information) are queued. If the queue length is very long, the login information processing may be delayed beyond the login timeout and you will experience your symptoms above. There could also be other factors - the login processing makes calls to the security subsystem, if the entire SQL machine is under heavy stress, those may take longer time, too. You should approach this as a perf problem and use appropriate tools like perfmon, the SOS DMVs, etc.

HTH,
Jivko Dobrev - MSFT
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||Connection Timeout is the timeout for connecting to SQL Server. What you need is COMMAND timeout. Set COMMAND timeout=0 for indefinite period.

Command timeout has to be set on the command object - because it is related to a particular SQL processing.

Friday, February 10, 2012

Connection problem with NT4

Ive installed SQL2000 in a NT4-SP6 server, but I cant connect from another machine.
I receive the following msg in Query analizer : "sql server does not exists or access denied"
Ive tried both authentications methods, created alias with IP and server name but nothing works.

If I use query analizer locally I can connect using the server name, but cant if use the ip.

Please, save me :)

thanks in advanceHi Felipe,

I faced a similiar problem when using a Business-Intelligence Client
to connect from a NT-Client to our cube located on a XP-PC with
MS SQL and MS OLAP.

I tried realy everthing:
At the end the following worked.

I added every user, who wants to connect locally(!) as an account.
I added a role to the MS OLAP cube and added the new user to this
role.

Hint:
These users must be domain-users
(and in our case local users too )

hth

Michael|||thanks for your time Michael, but I cant connect with "sa"

Connection problem to MSDE

Hi,
I installed MSDE in my server and I have tried to connect
to my server over the Internet using Query Analyser and
Enterprise Manager. Both fail during the connection.
Testing the connection to MSDE locally in the server shows
me I can connect using the server
name "dedbxx\machinename", but I can't connect using the
server IP address.
Why is this happening?
I have already ran c:\Program Files\Microsoft SQL Server\80
\Tools\Binn\SVRNETCN.exe to configure the Net Protocols
supported by my server instance, including TCP/IP, but
nothing happens using IP to connect to the server.
Also tried to configure a ODBC entry in the server using
the IP address, but it shows me this message:
Coonection Failed:
SQLState: '01000'
SQL Server Error: 14
Coonection Failed:
SQLState: '08001'
SQL Server Error: 14
[Microsoft][ODBC SQL Server Driver][DBNETLIB] Invalid
connection
And here is the server log:
2004-04-29 13:02:08.28 server Microsoft SQL Server 2000 -
8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Desktop Engine on Windows NT 5.2 (Build 3790: )
2004-04-29 13:02:08.32 server Copyright (C) 1988-2002
Microsoft Corporation.
2004-04-29 13:02:08.32 server All rights reserved.
2004-04-29 13:02:08.32 server Server Process ID is 208.
2004-04-29 13:02:08.32 server Logging SQL Server messages
in file 'D:\MSSQLMSSQL$WKS\LOG\ERRORLOG'.
2004-04-29 13:02:08.43 server SQL Server is starting at
priority class 'normal'(1 CPU detected).
2004-04-29 13:02:10.37 server SQL Server configured for
thread mode processing.
2004-04-29 13:02:10.39 server Using dynamic lock
allocation. [500] Lock Blocks, [1000] Lock Owner Blocks.
2004-04-29 13:02:10.60 spid3 Starting up database 'master'.
2004-04-29 13:02:11.17 server Using 'SSNETLIB.DLL'
version '8.0.766'.
2004-04-29 13:02:11.17 spid5 Starting up database 'model'.
2004-04-29 13:02:11.26 spid3 Server name is 'DEDBxx\WKS'.
2004-04-29 13:02:11.26 spid3 Skipping startup of clean
database id 4
2004-04-29 13:02:11.35 spid5 Clearing tempdb database.
2004-04-29 13:02:11.84 server SQL server listening on
65.110.xx.xx: 1433.
2004-04-29 13:02:11.84 server SQL server listening on
65.110.xx.xx: 1433.
2004-04-29 13:02:11.84 server SQL server listening on
65.110.xx.xx: 1433.
2004-04-29 13:02:11.84 server SQL server listening on
65.110.xx.xx: 1433.
2004-04-29 13:02:11.84 server SQL server listening on
216.197.xx.xx: 1433.
2004-04-29 13:02:11.84 server SQL server listening on
216.197.xx.xx: 1433.
2004-04-29 13:02:11.84 server SQL server listening on
216.197.xx.xx: 1433.
2004-04-29 13:02:11.84 server SQL server listening on
216.197.xx.xx: 1433.
2004-04-29 13:02:11.84 server SQL server listening on
216.197.xx.xx: 1433.
2004-04-29 13:02:11.84 server SQL server listening on
216.197.xx.xx: 1433.
2004-04-29 13:02:11.84 server SQL server listening on
216.197.xx.xx: 1433.
2004-04-29 13:02:11.84 server SQL server listening on
216.197.xx.xx: 1433.
2004-04-29 13:02:11.84 server SQL server listening on
127.0.0.1: 1433.
2004-04-29 13:02:12.45 spid5 Starting up database 'tempdb'.
2004-04-29 13:02:12.68 spid3 Recovery complete.
2004-04-29 13:02:12.68 spid3 SQL global counter collection
task is created.
2004-04-29 13:02:27.15 server SQL server listening on TCP,
Shared Memory, Named Pipes.
2004-04-29 13:02:27.15 server SQL Server is ready for
client connections
Any ideas?
Thanks,
Do you mean over the internet using a VPN?
If so, is the VPN giving you full access to the remote network?
Is the ServerIP address the public IP address, or the LAN IP?
Cheers,
James Goodman
"Rogerio" <anonymous@.discussions.microsoft.com> wrote in message
news:620e01c42e13$8e873b20$a301280a@.phx.gbl...
> Hi,
> I installed MSDE in my server and I have tried to connect
> to my server over the Internet using Query Analyser and
> Enterprise Manager. Both fail during the connection.
> Testing the connection to MSDE locally in the server shows
> me I can connect using the server
> name "dedbxx\machinename", but I can't connect using the
> server IP address.
> Why is this happening?
> I have already ran c:\Program Files\Microsoft SQL Server\80
> \Tools\Binn\SVRNETCN.exe to configure the Net Protocols
> supported by my server instance, including TCP/IP, but
> nothing happens using IP to connect to the server.
> Also tried to configure a ODBC entry in the server using
> the IP address, but it shows me this message:
> Coonection Failed:
> SQLState: '01000'
> SQL Server Error: 14
> Coonection Failed:
> SQLState: '08001'
> SQL Server Error: 14
> [Microsoft][ODBC SQL Server Driver][DBNETLIB] Invalid
> connection
> And here is the server log:
> 2004-04-29 13:02:08.28 server Microsoft SQL Server 2000 -
> 8.00.760 (Intel X86)
> Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation
> Desktop Engine on Windows NT 5.2 (Build 3790: )
> 2004-04-29 13:02:08.32 server Copyright (C) 1988-2002
> Microsoft Corporation.
> 2004-04-29 13:02:08.32 server All rights reserved.
> 2004-04-29 13:02:08.32 server Server Process ID is 208.
> 2004-04-29 13:02:08.32 server Logging SQL Server messages
> in file 'D:\MSSQLMSSQL$WKS\LOG\ERRORLOG'.
> 2004-04-29 13:02:08.43 server SQL Server is starting at
> priority class 'normal'(1 CPU detected).
> 2004-04-29 13:02:10.37 server SQL Server configured for
> thread mode processing.
> 2004-04-29 13:02:10.39 server Using dynamic lock
> allocation. [500] Lock Blocks, [1000] Lock Owner Blocks.
> 2004-04-29 13:02:10.60 spid3 Starting up database 'master'.
> 2004-04-29 13:02:11.17 server Using 'SSNETLIB.DLL'
> version '8.0.766'.
> 2004-04-29 13:02:11.17 spid5 Starting up database 'model'.
> 2004-04-29 13:02:11.26 spid3 Server name is 'DEDBxx\WKS'.
> 2004-04-29 13:02:11.26 spid3 Skipping startup of clean
> database id 4
> 2004-04-29 13:02:11.35 spid5 Clearing tempdb database.
> 2004-04-29 13:02:11.84 server SQL server listening on
> 65.110.xx.xx: 1433.
> 2004-04-29 13:02:11.84 server SQL server listening on
> 65.110.xx.xx: 1433.
> 2004-04-29 13:02:11.84 server SQL server listening on
> 65.110.xx.xx: 1433.
> 2004-04-29 13:02:11.84 server SQL server listening on
> 65.110.xx.xx: 1433.
> 2004-04-29 13:02:11.84 server SQL server listening on
> 216.197.xx.xx: 1433.
> 2004-04-29 13:02:11.84 server SQL server listening on
> 216.197.xx.xx: 1433.
> 2004-04-29 13:02:11.84 server SQL server listening on
> 216.197.xx.xx: 1433.
> 2004-04-29 13:02:11.84 server SQL server listening on
> 216.197.xx.xx: 1433.
> 2004-04-29 13:02:11.84 server SQL server listening on
> 216.197.xx.xx: 1433.
> 2004-04-29 13:02:11.84 server SQL server listening on
> 216.197.xx.xx: 1433.
> 2004-04-29 13:02:11.84 server SQL server listening on
> 216.197.xx.xx: 1433.
> 2004-04-29 13:02:11.84 server SQL server listening on
> 216.197.xx.xx: 1433.
> 2004-04-29 13:02:11.84 server SQL server listening on
> 127.0.0.1: 1433.
> 2004-04-29 13:02:12.45 spid5 Starting up database 'tempdb'.
> 2004-04-29 13:02:12.68 spid3 Recovery complete.
> 2004-04-29 13:02:12.68 spid3 SQL global counter collection
> task is created.
> 2004-04-29 13:02:27.15 server SQL server listening on TCP,
> Shared Memory, Named Pipes.
> 2004-04-29 13:02:27.15 server SQL Server is ready for
> client connections
> Any ideas?
> Thanks,
>