Professional Documents
Culture Documents
Gold Noil: PDF Created With Fineprint Pdffactory Pro Trial Version
Gold Noil: PDF Created With Fineprint Pdffactory Pro Trial Version
.
.
.
15/7/2000
GOLD NOIL
) (
:
:
SQL SERVER
:
6
:
....
) (
.
.
:
SQL
.
Tables
Rows Coloumns:
Records Fields
: ) ( )
(
:
:
SQL
SQL
);(
SQL Server
Microsoft SQL Server 2000
SQL Server
SQL Server
SQL
DBase
Paradox
:
Oracle 8
SQL Server 7
IBM DB2
SYbase
Informix
Borland IntraBase
Oracle
) (
SQL
Unix
) (
Unix
SQL Server
Microsoft SQL Server 2000 Enterprise Manager
.
English Query Language
SQL Server Books On-Line
support.microsoft.com
msdn.microsoft.com/library
msdn.microsoft.com/sqlserver
SQL-Server
.
SQL-Server
) (
:
SQL Server 2000
) (
SQL Server 2000
:
Client Access License
SQL Server
:
:
SQL Server 2000
Microsoft Access Runtime
Oracle Developer 2000, or R:2 or R:6
Oracle Developer Runtime
SQL Server 2000
SQL Server Enterprise Manager
SQL Server Client Network Utility
SQL Server
Enterprise Manager
SQL Server Network Utility
SQL Server Performance Monitor
Windows NT
SQL Server Profiler
Transact SQL
SQL Server Query Analyzer
Transact SQL
SQL Server Service Manager
SQL Server Books Online
SQL Server OLAP
Microsoft SQL Server 2000
) (
SQL Servers
DOS
English Query Language
Microsoft SQL Server 2000
Microsoft SQL Server 2000 Enterprise Manager
Microsoft SQL Server 2000
Microsoft SQL Server 2000
MS SQL Server
SQL Server Agent
Autopilot
Distributed Transaction Coordinator
Services
Services
Master
Tempdb
Model
.mdf
.ldf
SQL 2000
Configuration values
Affinity mask
allow updates
backup buffer size
Backup threads
cost threshold for
parallelism
cursor threshold
database size
default language
default sort order id
extended memory size
(MB)
fill factor (%)
free buffers
hash buckets
index create memory
(K)
Language in cache
language neutral fulltext indexing
LE threshold
maximum
LE threshold
minimum
LE threshold percent
lightweight pooling
locks
LogLRU buffers
logwrite sleep (ms)
N/A
N/A
32,767
-1
2
0
0
2,147483,647
10,000
9,999
255
-1
N/A
0
0
2,147,483,647
N/A
9,999
255
N/A
N/A
2,147,483,647
0
20
4,999
100
524,288
265,003
0
N/A
N/A
100
N/A
N/A
N/A
N/A
704
1,600,000
100
100
N/A
N/A
500000
N/A
N/A
500000
N/A
N/A
1
N/A
5000
0
-1
100
N/A
2,147,483,647
2,147,483,647
500
N/A
0
5000*
N/A
N/A
N/A
1
2,147,483,647*
N/A
N/A
max async IO
max degree of
parallelism
max lazywrite IO
max server memory
(MB)
max text repl size
max worker threads
media retention
memory
min memory per
query (K)
min server memory
(MB)
nested triggers (bytes)
network packet size
open databases
open objects
priority boost
procedure cache
Protection cache size
query governor cost
limit
query wait (s)
RA cache hit limit
RA cache miss limit
RA delay
RA pre-fetches
RA slots-per-thread
RA worker threads
recovery flags
recovery interval
(min)
remote access
remote conn timeout
1,024
255
N/A
N/A
32
1,024
N/A
N/A
N/A
N/A
4*
2,147,483,647*
0
10
0
2800
2,147,483,647
1,024
365
1,048,576
0
10
0
N/A
2,147,483,647
1,024
365
N/A
N/A
N/A
512
2,147,483,647
N/A
N/A
0*
2,147,483,647*
0
512
5
100
0
1
1
1
32,767
32,767
2,147,483,647
1
99
8,192
0
4,096
N/A
0*
0
N/A
N/A
1
65,535
N/A
2,147,483,647*
1
N/A
N/A
N/A
N/A
2,147,483,647
N/A
1
1
0
1
1
0
0
N/A
255
255
500
1,000
255
255
1
-1
N/A
N/A
N/A
N/A
N/A
N/A
N/A
2,147,483,647
N/A
N/A
N/A
N/A
N/A
N/A
N/A
32,767
32,767
0
-1
1
32,767
0
N/A
1
N/A
0
0
0
0
5
N/A
0
2,147,483,647
1
2,147,483,647
256
2,147,483,647
N/A
1
0
0
0
N/A
5
0
0
2,147,483,647
1
2,147,483,647
N/A
2,147,483,647
1
1
-1
64
1
0
50
64
511
2,147,483,647
2,044
1,000
N/A
N/A
1
N/A
50
N/A
N/A
2,147,483,647
N/A
1,000
N/A
N/A
2,147,483,647
N/A
N/A
2,147,483,647
32,767
user connections
5
32,767
0*
(server)*
user options
0
4,095
0
4,095
* Lower or upper limit for objects allocated dynamically.
This table specifies the maximum sizes and numbers of various objects
defined in Microsoft SQL Server databases, or referenced in
Transact-SQL statements.
Object
Batch size
Bytes per short string column
Bytes per text, ntext, or image column
Bytes per GROUP BY, ORDER BY
Bytes per index
Bytes per foreign key
Bytes per primary key
Bytes per row
Bytes in source text of a stored
procedure
Clustered indexes per table
Columns in GROUP BY, ORDER BY
Columns or expressions in a GROUP
BY WITH CUBE or WITH ROLLUP
statement
Columns per index
Columns per foreign key
Maximum sizes/numbers
SQL Server 6.5
SQL Server 7.0
65,536* Network
128 KB
Packet Size
255
8000
2 GB-2
2 GB-2
900
8060
900
900
900
900
900
900
1962
8060
Lesser of batch size
65025
or 250 MB
1
1
Limited only by
16
number of bytes
10
10
16
16
16
16
16
250
4096
250
Max. value of
configured
connections
1 TB
32,767
N/A
32
32 GB
32 GB
16
30
Max. locks per
server
16
1024
4096
1024
Max. value of
configured
connections
1,048,516 TB
32,767
256
32,767
32 TB
4 TB
253
128
Max. locks per server
2,147,483,647
16
16
16
249
2,147,483,647 (static)
40% of SQL Server
memory (dynamic)
32
32
32
249
2 billion
2,147,483,647
2 billion
2,147,483,647
255
1024
31
63
Limited by available Limited by available
storage
storage
128 KB
128* TDS packet size
Limited by number
2 billion
of objects in a
database
16
256
Limited by number
Triggers per table
3
of objects in a
database
UNIQUE indexes or constraints per
249 nonclustered and
249
table
1 clustered
* Database objects include all tables, views, stored procedures, extended stored
procedures, triggers, rules, defaults, and constraints. The sum of the number of
all these objects in a database cannot exceed 2,147,483,647.
Full text search
Replication
SQL Server 2000 OLAP Services
English Query
SQL
Local or Remote Installation
Typical
Minimum
SQL Server
:
Custom
)Multilingual (850
Unicode
Microsoft SQL Server 2000
Service Pack 2
Help -> About
Service Pack
Microsoft SQL Server 2000 Enterprise Manager
SQL Server 2000
Start -> Programs -> Microsoft SQL server 2000 -> Enterprise
Manager
SQL Server 2000
Transaction Server
SQL Server
SQL Server 2000
SQL Server
Action
Tools
Microsoft SQL Servers
Databases
|_ master
|_ model
|_ tempdb
|_
Data Transformation Services
|_ Local Packages
|_ Repository Packages
|_ Metadata
Management
|_ SQL Server Agent
|_ Backup
|_ Current Activity
|_ Database Maintenance Planes
|_ SQL Server Logs
|_ Web Publishing
Security
|_ Logins
|_ Server Roles
|_ Linked Servers
|_ Remote Servers
Support Services
|_ Distributed Transaction Coordinator
|_ SQL Mail
Databases :
Databases
|_ master
Databases
|_ model
Databases
|_ tempdb
SQL Server
:
Data Transformation Services
|_ Local Packages
|_ Repository Packages
|_ Metadata
:
Management
Management
|_ SQL Server Agent
Management
|_ Backup
Management
|_ Current Activity
Management
|_ Database Maintenance Planes
Management
|_ SQL Server Logs
SQL Server
Management
|_ Web Publishing
:
Security
Security
|_ Logins
Security
|_ Server Roles
Security
|_ Linked Servers
SQL Server
Security
|_ Remote Servers
:
Support Services
Support Services
|_ Distributed Transaction Coordinator
Support Services
|_ SQL Mail
SQL Server
SQL
SQL
DROP
PK ,FK
key1
dd
ALTER
Ppr Price
Add st_age in student table
) st_age
( null
ST_age
CROSS
Cross tabulation
TRANSFORM Sum(Qty) AS Total
pivot
p.city
SELECT S.SNo
select s.sno
transform sum(qty)
as total
GROUP BY S.SNo
group by p.city
pivot p.city
PIVOT P.City ;
INSERT
Sp
S2shipments
:
. )
(
:
ali
to_date :
to_date :
CREATE
PK unique
FK
index_name
column1
PK
column2
FK
ssnoindex
Sno S
( temp1 , temp2 )
( st_no , st_name )
temp1 = st_no :
temp2 = st_name
S
:
Sno , Sname ,Status , City
: NULL
: NOT NULL
table name : student
st_birth_day date
);
field : st_no , st_name ,
st_birth_day , st_mark
Key1
Emp_no
DEFINE
define
Define descount = st_no * 10 ' ;
DELETE
DELETE * FROM SP
WHERE
Sp
where
Sp
where
s
DECODE
col | expression
search1
result1
search1 = col | expression result2
search2 =
col | expression
default
UPDATE
)
(
( )
ACCEPT
**
accept command
Number or char : type of
varibles
Prompt text :
Nopromp
Hide
)
(
Acc = accept
SELESCT 1
select
UNION
3^2 = 3 * 3 = 9
S
Ppr P
AVG
Count
Max
Min
Sum
Stddev
Group by
group by Having
select AVG(st_age) , COUNT(distict
all st_name) , MAX(st_age) ,
MIN(st_age) ,SUM(st_age) ,
STDDEV(st_age) group by avg
having count(*) >2
All
Column
Distinct
from student ;
( 2.99 )
( 3 )
S N
WHERE
S N
SP Sno
: Intersect
select
(100.77 )
( 100 )
: Subqueries
-
( : )
-
( : )
Select jop_name , emp_sal from
emp_inf where emp_sal in (select
min(emp_sal)from emp_inf group by
jop_name) ;
Select last-day (sysdate) from student ;
select length ('wellcome') , length
(st_name) from student ;
select lower(st_name),lower('SMALL
LETTER') from student ;
st_name wellcome
-
$
n=50
st_no number(6) or
st_name char(40)
Qty
SP
WHERE
SELECT 2
SELECT
P,Sp,S
Pname ,
city , Sno , QTY
SP1
RIGHT
JOIN
Pno
SP Qty
WHERE
, HAVING
WHERE
HAVING
Sum ()
- $
n=50
st_no number(6) or
)st_name char(40
SELECT S.SNo , SName , Sum(Qty * Price) AS
Payment
SELECT
Ppr , SP , S
HAVING
:
; Select sign ( st_digit ) , sign (-1) from student
-
SELECT SName
FROM S
Tree SELECT
FROM SP
FROM P
Sname
S
FROM S
WHERE EXISTS (SELECT *
FROM SP
Sname
S
FROM S
WHERE NOT EXISTS (SELECT *
FROM SP
Sname
S
FROM S
WHERE NOT EXISTS ( SELECT * FROM P
WHERE NOT EXISTS (SELECT * FROM SP
WHERE SNo = S.SNo And PNo = P.PNo ) ) ;
SELECT SName
FROM S
WHERE (SELECT Count(* )
FROM SP
Sname
S
Sname
S
WHERE
INNER JOIN
ON
WHERE
LEFT JOIN
ON
SELECT SNo
TOW SELECT
FROM S
WHERE Status > (SELECT Avg(Status) FROM
S);
SELECT SNo FROM SP ;
S SNo
Sno
SP
S SNo
<==
NULL
NVL : 0
a =
student;
select st_name , ltrim (st_name ,'a') from student
;
n = 2 pos = 1
ba ab
SELECT 3
ab ba
ali = ale = ALI
= NULL
>< NULL
exp =st_no * 10
& ) (
exp =st_no * 10
&& &
exp
exp = st_no * 10
& exp
&& ) : ) (
(
.
.
SS
SS
.
where
St_name = upper (&
st_name ) ;
Select st_name from student
where st_name = ' & st_enter
';
Select st_name from student
where st_no= & 1 ;
Save ss ;
Start ss 12 ;
select
st_name,instr(st_name,'a')
from student;
select st_no , decode(st_no ,
'11' , 1 , '33' , 1, 0) from
student;
Select st_no , st_name , st_no
* 3 from student ;
select st_no , st_name , st_no
- st_no from student ;
select st_no , st_name , st_no
*3 m from student ;
Select st_no , st_name from
student ;
Select st_no , st_name from
student order by st_no
,st_name ;
Select st_no , st_name from
student order by st_no ;
Select st_no , st_name from
student order by st_no DESC
;
Select st_no , st_name from
student where st_name not
:
waleed
& st_enter '
.
SS
st_no = SS
12
a
( - + / * )
( A)
like A% ;
Select st_no , st_name from
student where st_name like
%A% ;
Select st_no , st_name from
student where st_name like
%A ;
Select st_no , st_name from
student where st_name like
A% ;
Select st_no , st_name from
student where st_name (ali ,
waleed ) ;
Select st_no , st_name from
student where st_no in (4 , 6
, 11 ) ;
Select st_no , st_name from
student where st_no =12 or (
st_name = 'ali' and
st_average =80) ;
sea , lamp
( A)
ali , amer , hassan , ikea
( A)
ikea
( A)
ali , amer
ali or hassan =
=
select ( or , and )
SELECT 4
( waleed )
pos
N
date + number
date number
date date
sysdate =
dual
to_char (sysdate , 'HH:MI:SS') from
dual ;
select to_char (sysdate , 'SCC' ) from
dual ;
select to_char (sysdate,'ww') from dual
;
sysdate
select to_date ('june 4 ,1984' ,
= ""
S AS X
X S
S AS Y
Y S
where
DESGRIBE
student
Describe student
TRANSLATE
a wa
select
)
(
SQLSERVER
.
*
1
DATA
ADO
Data
Environment 4
Designee
Add-ins >> visual data manager...
File>>new>>microsoft access>>version 7.0 mdb..
properties
New Table
name
text
number
long
integer
Long
data
:
data
data
data
datasource
data1
datafield
F5
File>>Opendatabase>>microsoft access
Record source
available fields
column to sort
by Next
Next Finish
Project>>project1proprtis..
form11 Startup Object
.....
Add-Ins
:
-
-
-
load
.
.
.
.
.
:
SQL
db1 tb1
:
Access
name
num
price
DAO
DAO
:
Project > Refrence Microsoft DAO 3.51
Object Library
Project Add Module
:
Public d As Database
Public t As Recordset
Public d t
db1
d
)(Private Sub main
)"Set d = DBEngine.Workspaces(0).OpenDatabase(App.Path & "\db1.mdb
Form1.Show
End Sub
main
Set
d
DBEngine
Access
)Workspaces(0
Opendatabase
App.path
Project > Project1.proprties.. sub main
startup object F5
-
-
-
-
t tb1
load
)(Private Sub Form_Load
)Set t = d.OpenRecordset("tb1", dbOpenTable
End Sub
Set
t
d
Openrecordset
dbopentable
:
)(Private Sub showdata
' If t.RecordCount < 1 Then Exit Sub
t ' Text1.Text = t!Name
' Text2.Text = t!num
' Text3.Text = t!price
End Sub
:
...1.....2..........3...................
:
:
:
cmd6
)(Private Sub cmd6_Click
t.MoveNext
Call showdata
End Sub
t
showdata
:
)
( cmd7
)(Private Sub cmd7_Click
t.MovePrevious
Call showdata
End Sub
:
cmd8 :
)(Private Sub cmd8_Click
t.MoveFirst
Call showdata
End Sub
:
cmd5 :
)(Private Sub cmd5_Click
t.MoveLast
Call showdata
End Sub
Movefirst movelast
:
: EOF BOF
If t.BOF Then t.MoveFirst
:
)(Private Sub cmd6_Click
t.MoveNext
If t.EOF Then t.MoveLast
Call showdata
End Sub
:
)(Private Sub cmd7_Click
t.MovePrevious
If t.BOF Then t.MoveFirst
Call showdata
End Sub
:
:
)(Private Sub cmd1_Click
' t.AddNew
'
"" = Text1.Text
"" = Text2.Text
"" = Text3.Text
End Sub
:
Val
:
:
)(Private Sub cmd3_Click
' t.Edit
End Sub
:
:
sql
(1) SQL
:
SQL
.
Tb name number
:
number
444
534
444
name
name Tb
number SQL
:
" SQL = "select * from Tb
:
" SQL = "select name,number from Tb
:
" SQL = "select name from Tb where number = 444
(2) SQL
:
listbox
combo box
SQL
:
tb
name
num
ahmad
1442
saleh
5425
sami
1442
:
" SQL = "select name from Tb where num = 1442
) (
T
D
:
)Set T=D.openrecordset(SQL,dbopendynaset
) (
SQL
List COMBO
Text Box :
List Box :
ListBox :
:
For i = 1 To n
List1.AddItem TB!name
TB.MoveNext
Next i
List1
: ComboBox
:
Text Box
:
name
num
:
" SQL = "select num from tb where name = text1.text
name
:
' " & ' " & text1.text
&
:
" '" & SQL = "select num from tb where name = '" & text1.text
:
" " & SQL = "select name from tb where num = " & text1.text
" & " & text1.text
'" & '" & text1.text
() SQL
:
:
tb1
tb2
deptn deptname
1
job deptno
sal
6000
12000
5500
8500
5000
name
" tb1
"
" :
tb1 ) tb2
( "
SQL = "select name from Tb1 where deptname = (select deptname form tb2
" )where deptno = 1
'
() SQL
:
:
"SQL = "select left$(name,3) as k from tb1
left
name k
tb1
:
"'*" & SQL = "select name from Tb1 where name like '*" & text1.text
Like
Order By
:
SQL = "select name from Tb1 where name like '*" & text1.text & "*' order By
"name Asc
Order by
name
Asc Asc
Desc Asc
Grid Flex
:
FlexGrid
db
tb namd job age
project >> combonent
ctrl+T
Microsoft FlexGrid Control 6.0
Ok
FliexGrid
Properties
General Rows
Cols
Fixed Cols Fixed Rows
FlexGrid
Load
:
MSFlexGrid1.Colwidth(0) = 2000
MSFlexGrid1.Colwidth(3) = 1000
MSFlexGrid1
" " " "
MSFlexGrid1.Row = 0
MSFlexGrid1.Col = 0
" " = MSFlexGrid1.Text
MSFlexGrid1.Col = 1
"" = MSFlexGrid1.Text
Text
Text
:
RAM
Load
Count
TB Name Job FlexGrid
flx1
' If tb.RecordCount < 1 Then Exit Sub
' tb.MoveLast
' tb.MoveFirst
n ' n = tb.RecordCount
For i = 1 To n
' flx1.Row = i
' flx1.Col = 0
' flx1.Text = tb!Name
flx1.Col = 1
flx1.Text = tb!job
' tb1.MoveNext
Next i
End Sub
:
If tb.RecordCount < 1 Then Exit Sub
tb.MoveLast
tb.MoveFirst
n = tb.RecordCount
flx1.Rows = n + 1
For i = 1 To n
flx1.Row = i
flx1.Col = 0
flx1.Text = tb!Name
flx1.Col = 1
flx1.Text = tb!job
tb.MoveNext
Next i
End Sub
db1 tb1
:
name
mathmark
sincemark
string
integer
integer
Project >> refrences Microsoft DAO 3.51 Object library
:
Public d As Database
Public tb As Recordset
)Set db = DBEngine.Workspaces(0).OpenDatabase(App.Path & "\db1.mdb", True
)Set tb = db.OpenRecordset("tb1", dbOpenTable
Project Components Microsoft
)Chart Control 6.0 (OLEDB
AutoIncrement
True
True
ColumnCount
RowCount
:
MSChart1
FlexGrid
mathmark
Data
sincemark
Row RowLabel Name
:
End Sub
:
)(Private Sub Command2_Click
tb.MovePrevious
If tb.BOF Then tb.MoveFirst
MSChart1.Column = 1
MSChart1.Data = tb!mathmark
MSChart1.Column = 2
MSChart1.Data = tb!sincemark
MSChart1.RowLabel = tb!Name
End Sub
MovePrevious
Properties
SQL SERVER
:
. XP
. XP
.MCSE
).MCDBA (SQL SERVER
.
GOLD_NOIL@YAHOO.COM
15/7/2000
GOLD NOIL