Installation base tempdbsa

1

           Création de la base temporaire :


1> disk init name="fstempdb01",physname="dirname/fstempdb01.dev",size='500M'

2> go

1> create temporary database tempdb_sa on fstempdb01=500

2> go

CREATE DATABASE: allocating 32512 logical pages (500.0 megabytes) on disk 'fstempdb01'.


Vérification de la creation :

1> sp_helpdb

2> go

name db_size owner dbid created status
------------------------ ------------- ------------------------ ------ --------------
------------------------------------------------------------------------------------------------------
tempdb 4108.0 MB sa 2 May 19, 2004
    select into/bulkcopy/pllsort, trunc log on chkpt
tempdb_sa 500.0 MB sa 5 May 21, 2004
    select into/bulkcopy/pllsort, trunc log on chkpt, user created temp db


1> sp_helpdb tempdb_sa

2> go

name db_size owner dbid created status
------------------------ ------------- ------------------------ ------ --------------
------------------------------------------------------------------------------------------------------
tempdb_sa 508.0 MB sa 5 May 21, 2004
    select into/bulkcopy/pllsort, trunc log on chkpt, user created temp db

device_fragments size usage created free kbytes

------------------------------ ------------- -------------------- ------------------- ------------------------------
fstempdb01 500.0 MB data and log May 21 2004 4:12PM 508608



Création du lien user sa -> tempdb_sa :


1> sp_tempdb 'bind','LG','sa','DB','tempdb_sa'
2> go


Vérification du lien :

1> sp_tempdb 'show','all'
2> go

Temporary Database Groups

-------------------------------

default

(1 row affected)

Database GroupName

------------------------------- -------------------------------

tempdb default

(1 row affected)

Login Application Group Database

Hardness

------------------------------- ------------------------------- ------------------------------- -------------------------------

--------

sa NULL NULL tempdb_sa

SOFT