CS404L Lab 2 Assignment

Embed Size (px)

Citation preview

  • 7/25/2019 CS404L Lab 2 Assignment

    1/3

    Assignment Lab 2

    Roll No : 2012064

    1) LIST OF 20 SYSTEM PROCEDURES:

    1. sp_addlogin: Creates a new Microsoft SQL Serer login t!at allows a

    "ser to connect to an instance of SQL serer "sing SQL serera"t!entication.

    2. sp_grantlogin: #llows a "ser or gro"p acco"nt to connect to

    Microsoft SQL Serer "sing $indows a"t!entication.%. sp_reo&elogin: Re'oes t!e login entries fro' Microsoft SQL Serer

    for a "ser or gro"p created wit! sp_grantlogin or sp_den(login.

    4. sp_password: #dds or c!anges a password for a Microsoft SQLSerer login.

    ). sp_defa"ltd*: C!anges t!e defa"lt data*ase for a login.6. sp_den(login: +reents a "ser or gro"p fro' connecting to Microsoft

    SQL Serer.,. sp_dropserer: Re'oes a serer fro' t!e list of &nown re'ote and

    lin&ed serers on t!e local Microsoft SQL Serer.-. sp_droplogin: Re'oes a Microsoft SQL Serer login preenting

    access to SQL Serer "sing t!at login na'e./. sp_data*ases: Lists data*ases t!at reside in an instance of Microsoft

    SQL Serer or are accessi*le t!ro"g! a data*ase gatewa(.10. sp_f&e(s: Ret"rns logical foreign &e( infor'ation for t!e

    c"rrent eniron'ent s!owing foreign &e( relations!ips incl"dingdisa*led foreign &e(s.

    11. sp_p&e(s: Ret"rns pri'ar( &e( infor'ation for a single ta*lein t!e c"rrent eniron'ent.

    12. sp_lin&edserers: Ret"rns t!e list of lin&ed serers dened in

    t!e local serer.1%. sp_pri'ar(&e(s: Ret"rns t!e pri'ar( &e( col"'ns one row

    per &e( col"'n for t!e specied re'ote ta*le.

    14. sp_ta*les_e: Ret"rns ta*le infor'ation a*o"t t!e ta*les fro't!e specied lin&ed serer.1). sp_attac!_d*: #ttac!es a data*ase to a serer.16. sp_!elp: Reports infor'ation a*o"t a data*ase o*ect a "ser3

    dened data t(pe or a data t(pe s"pplied *( Microsoft SQL Serer.1,. sp_w!o: +roides infor'ation a*o"t c"rrent Microsoft SQL

    Serer "sers and processes.1-. sp_stored_proced"res: Ret"rns a list of stored proced"res in

    t!e c"rrent eniron'ent.1/. sp_foreign&e(s: Ret"rns t!e foreign &e(s t!at reference

    pri'ar( &e(s on t!e ta*le in t!e lin&ed serer.

  • 7/25/2019 CS404L Lab 2 Assignment

    2/3

    20. sp_indees: Ret"rns inde infor'ation for t!e speciedre'ote ta*le.

    2) Die!en"es bet#een st$!e% &!$"e%'!e an% a ('n"ti$n:

    Stored +roced"res are pre3co'pile o*ects w!ic! are co'piled for rstti'e and its co'piled for'at is saed w!ic! eec"tes co'piled code5

    w!eneer it is called. "t 7"nction is co'piled and eec"ted eer( ti'ew!en it is called. 7or 'ore a*o"t stored proced"re and f"nction refer t!earticles 8i9erent t(pes of Stored +roced"re and 8i9erent t(pes of7"nction.

    asic 8i9erence

    1. 7"nction '"st ret"rn a al"e *"t in Stored +roced"re it is optional

    +roced"re can ret"rn ero or n al"es5.2. 7"nctions can !ae onl( inp"t para'eters for it w!ereas +roced"res

    can !ae inp"t;o"tp"t para'eters.%. 7"nctions can *e called fro' +roced"re w!ereas +roced"res cannot

    *e called fro' 7"nction.

    #dance 8i9erence

    1. +roced"re allows S

  • 7/25/2019 CS404L Lab 2 Assignment

    3/3

    -. $e can go for =ransaction Manage'ent in +roced"re w!ereas wecanEt go in 7"nction.