Showing posts with label related. Show all posts
Showing posts with label related. Show all posts

Sunday, March 25, 2012

connexion, processes ...

From the system table sysprocesses, how to do in order to extract
the SQL command related to the processes ?
What are system views/tables, scripts used to monitor and obtain more information
about processes, connexions... ?Straight from the Holy Book (SQL books Online)
----------------------
DECLARE @.Handle binary(20)
SELECT @.Handle = sql_handle FROM sysprocesses WHERE spid = 52
SELECT * FROM ::fn_get_sql(@.Handle)

----------------------|||Thanks for the reply, but the code is not working in my server (and mya be this is due to SP...). By the way, how to find the last SP applied to sql server ?

DBCC INPUTBUFFER(80)
EventType Parameters EventInfo
--- ---- ---------
RPC Event 0 DVSPAYS_CODELIB_DVSPRINC_S;1

DECLARE @.Handle binary(20)
SELECT @.Handle = sql_handle FROM sysprocesses WHERE spid = 80
SELECT * FROM ::fn_get_sql(@.Handle)
dbid objectid number encrypted text
-- ---- -- --- ----------------------------------------------------------------------------
No row(s)sqlsql

Thursday, March 22, 2012

Connectivity Book

Hi,

Can someone please guide for a book that speaks in depth about connectivity issues and bugs related to SQL server connection objects.

I am also looking for a good getting started(and in depth) guide/resourse for following components....

MDAC Architecture & Installation

SQL Server Profiler.................................................................................................. 5

SQL Server Security................................................................................................. 7

Indexes..................................................................................................................... 8

Network Libraries and Connectivity........................................................................... 9

Linked Servers........................................................................................................ 11


Microsoft JET Basics........................................................................................................ 1

Access and Jet.................................................................................................................. 2

JET Provider 3.51 vs. 4.0.................................................................................................. 2

Unrecognized Database Format with Data Control............................................................. 3

Access ODBC driver and ASP – Just say No!.................................................................. 3

JET Installation.................................................................................................................. 3

............................................................................................................................. 1

Cursors; Location and Type.............................................................................................. 2

Objectives................................................................................................................. 2

What is a cursor?...................................................................................................... 2

Simple ADO Code.................................................................................................... 3

Default Values........................................................................................................... 3

FireHose Cursor....................................................................................................... 4

CursorType Property Values..................................................................................... 4

Static Cursor............................................................................................................. 5

Keyset Cursor........................................................................................................... 5

Dynamic Cursor........................................................................................................ 6

Limitations of CursorType......................................................................................... 6

CursorLocation......................................................................................................... 7

Server Side Recordsets............................................................................................. 7

Client Side Recordsets.............................................................................................. 8

Questions to ask........................................................................................................ 9

Guidelines............................................................................................................... 10

Knowledge Base Articles........................................................................................ 10

Resources............................................................................................................... 10


COM Basics....................................................................................................................... 1

COM – A Binary Component Architecture........................................................................ 4

COM Defined....................................................................................................... 4

Summary of the limitations of traditional object oriented techniques......................... 4

How COM Works............................................................................................................ 5

Using COM Objects............................................................................................. 5

Objects and classes................................................................................................... 7

Objects and interfaces............................................................................................... 7

Interface – a Contract................................................................................................ 7

Interfaces.......................................................................................................................... 8

An Array of Function Pointers................................................................................... 8

Identifying an Interface............................................................................................... 8

Interface Types......................................................................................................... 8

IUnknown................................................................................................................. 9

The COM Activation Process.......................................................................................... 10

Activation Steps for in-process COM component................................................ 10

Activation Steps for local COM component......................................................... 11

Creating a COM Client................................................................................................... 12

Declaring your COM object Variables............................................................................. 13

Creating COM Objects................................................................................................... 13

Destroying COM Objects............................................................................................... 15

Ensuring the “correct” COM Object is Created................................................................ 15

Lab - Creating a COM Client in Visual Basic............................................................... 15

Creating an In-Process COM Component....................................................................... 17

Creating Properties.......................................................................................................... 18

Creating Methods............................................................................................................ 19

The Instancing Property for ActiveX DLL’s..................................................................... 20

MTSTransactionMode Property...................................................................................... 22

Creating a Local Server COM Component...................................................................... 24

Component Versioning in Visual Basic............................................................................. 25

Components in COM+.................................................................................................... 29

COM+ Surrogate.................................................................................................... 29

COM+ Object context............................................................................................ 29

Just In Time (JIT) activation............................................................................................. 29

JIT Activation and state................................................................................................... 31

Demonstration: JIT Deactivation.................................................................................. 31

Demonstration: JIT Activation...................................................................................... 32

Active X Dlls created in Visual Basic that are enlisted in MTS / COM+ Applications34


ADO Basics – COM Automation object model................................................................ 1

COM Automation object model........................................................................................ 2

ADO Basics...................................................................................................................... 3

ADO Objects................................................................................................................... 4

ADO – Command Object................................................................................................. 9

ADO –Recordset Object................................................................................................ 10

ADO Recordsets – ways of obtaining.............................................................................. 13

ADO Objects – Data Access Summary........................................................................... 15

ADO Collections –.......................................................................................................... 16

ADO – Updating & Locking........................................................................................... 22

ADO – Using Stored Procedures.................................................................................... 23

This is just a list of things i would like to learn!!

Thankyou

Jay

Book online and KB have good info. I am not aware of any book dedicated to sql connectivity issue yet.|||

Thanks Nan,

I am trying to go inside the working of couple of things like database connection process and connection object behaviour in distributed systems in general.

I do appriciate your reply.

Thankyou,

Jay

Sunday, March 11, 2012

Connection with server problem

Ok guys,
First of, I don't even know if this question should be
posted here, because it's related to Networking, Database
server(namely sql 2000), and c#.
I have 3 computers, 3 of them are connected in one
network. Computer A (windows 2000 server) has SQL 2000
server. My company uses 2 other computers with windows
XP. I program in one of them (B) and I have to install
the program in C.
I wanted to use windows authentication of SQL access. The
problem with this is that if I wanted to give an access
to somebody, he has to login from the main domain in
computer A (since the SQL is in computer A). This login
process takes a lot of time (5 minutes). Not to mention,
even though I managed to do this, the opening access to
the SQL server sometimes are pretty long too.
Now, after understanding my problem could you answer some
question of mine?
1. Where did I went wrong? (If I was wrong in one of this)
A. The windows server setup (Active directory or Domain
mistakes)
B. The SQL server setup (it's not set properly?)
C. I'm stupid, I'm supposed to go with SQL authentication
(which I avoided becoz it means that I have to insert my
database password in my code)
2. say in computer A I have domain named Domain-A, I'm
logging in from computer B using an account from computer
A using Domain-A. Is there anyway to speed up the
proccess of the login? (Or is there a reason why the
process went slow?)
3. Is there anyway for the SQL to give a permission to
another account in another computer? For future references
(windows
authentication mode)-- Eric wrote: --
>> Ok guys
>> First of, I don't even know if this question should be
> posted here, because it's related to Networking, Database
> server(namely sql 2000), and c#
>> I have 3 computers, 3 of them are connected in one
> network. Computer A (windows 2000 server) has SQL 2000
> server. My company uses 2 other computers with windows
> XP. I program in one of them (B) and I have to install
> the program in C
>> I wanted to use windows authentication of SQL access. The
> problem with this is that if I wanted to give an access
> to somebody, he has to login from the main domain in
> computer A (since the SQL is in computer A). This login
> process takes a lot of time (5 minutes). Not to mention,
> even though I managed to do this, the opening access to
> the SQL server sometimes are pretty long too
--
Hi Eric
Did you install SQL Server on a domain controller? Officially, this is not a recommended setup. I've personally seen problems with other customers with this setup: from performance issues to weird SQL Server behaviour. Is it feasible to commission another lower spec'd machine to act as the domain controller so that SQL Server is a dedicated application server?
Hope this helps
- Eric Cárdena
SQL Server suppor