<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlserver.ro/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Intrebari</title><link>http://sqlserver.ro/forums/14/ShowForum.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Re: Adaugare User</title><link>http://sqlserver.ro/forums/thread/1128.aspx</link><pubDate>Wed, 29 Nov 2006 19:33:41 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1128</guid><dc:creator>rremus</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1128.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=1128</wfw:commentRss><description>&lt;p&gt;Double post-ul era al meu, am postat raspunsul de doua ori :)&lt;/p&gt;&lt;p&gt;Daca server-ul tau (IIS sau ASP.Net?) local se conecteaza la SQL folosind&amp;nbsp;contul sub care ruleaza el insusi atunci in principiu toti utilizatorii care se conecteaza la server (HTTP?) vor avea aceleasi drepturi in baza de date din SQL, drepturile &amp;#39;server&amp;#39;-ului. Daca ai nevoie sa diferentiezi utilizatorii in roluri cu drepturi diferite, &amp;#39;server&amp;#39;-ul trebuie sa impersoneze utilizatorii conectati la el innainte de a accesa baza de date. In scenariul tau local (&amp;#39;server&amp;#39; si SQL pe aceasi masina) nu e o problema, daca insa muti SQL-ul pe o alta masina atunci trebuie sa te asiguri ca domeniul in care ruleaza aplicatia poate asigura &amp;#39;delegation&amp;#39;: &lt;a href="http://technet2.microsoft.com/WindowsServer/en/library/dac7ecea-7c82-43c0-847b-3a1a81454cfe1033.mspx?mfr=true"&gt;http://technet2.microsoft.com/WindowsServer/en/library/dac7ecea-7c82-43c0-847b-3a1a81454cfe1033.mspx?mfr=true&lt;/a&gt;&lt;a href="http://www.microsoft.com/technet/prodtechnol/virtualserver/2005/proddocs/vs_deploy_delegation.mspx?mfr=true"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;HTH,&lt;br /&gt;~ Remus&lt;/p&gt;</description></item><item><title>Re: Adaugare User</title><link>http://sqlserver.ro/forums/thread/1122.aspx</link><pubDate>Wed, 29 Nov 2006 18:16:30 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1122</guid><dc:creator>slv</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1122.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=1122</wfw:commentRss><description>Merci de raspuns, dar mi-am dat seama ca nu-mi trebuie un User separat. Voi crea un Server local care se va conecta la SQL Server folosind Windows Authentication. Pot face asta, nu?&lt;br /&gt;&lt;br /&gt;Imi pare rau daca e un double post, dar am dat search (nu eram membru inca) si nu am gasit.&lt;br /&gt;</description></item><item><title>Re: Adaugare User</title><link>http://sqlserver.ro/forums/thread/1118.aspx</link><pubDate>Wed, 29 Nov 2006 17:57:11 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1118</guid><dc:creator>rremus</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1118.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=1118</wfw:commentRss><description>&lt;p&gt;double post&lt;/p&gt;</description></item><item><title>Re: Adaugare User</title><link>http://sqlserver.ro/forums/thread/1117.aspx</link><pubDate>Wed, 29 Nov 2006 17:57:10 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1117</guid><dc:creator>rremus</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1117.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=1117</wfw:commentRss><description>&lt;p&gt;In SQL Server exista doua nivele de autentificate si autorizare: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&amp;#39;server principals&amp;#39;, numitzi si &amp;#39;login&amp;#39;, care sint autentificati de catre instanta de SQL Server. SQL poate autentifica un &amp;#39;login&amp;#39; fie folosind Windows Auth sau un nume/parola. Authorizarile care se pot aplica la login se refera numai la &amp;#39;securables&amp;#39; (obiecte ce pot fi authorizate) la nivelul intregii instante: connectare la instanta, access la view-uri la nivelul instantei, access la baze de date individuale. Tabela de metadata care descrie &amp;#39;server principals&amp;#39; este sys.server_principals (una pentru intreaga instanta)&lt;/li&gt;&lt;li&gt;&amp;#39;database principals&amp;#39;&amp;nbsp;, numitzi si &amp;#39;user&amp;#39;, sint modul concret prin care un &amp;#39;login&amp;#39; accesseaza o baza de date. Autentificarea unui user nu se bazeaza pe nici o schema de autentificare gen windows auth sau nume/parola, ci se bazeaza pe faptul ca instanta SQL Server a autentificat &amp;#39;login&amp;#39;-ul si exista o mapare intre login si user (au acelasi SID). Un user poate fi authorizat pentru &amp;#39;securables&amp;#39; la nivelul unei baze de date: drepturi de creare/accessare tabele, view-uri etc. Tabela de metadada care descrie &amp;#39;database principals&amp;#39; este sys.database_principals&amp;nbsp;(cite una in fiecare baza de date).&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Deci pentru a resolva problema ta va trebui sa creezi atit un &amp;#39;server principal&amp;#39; cit si un &amp;#39;database principal&amp;#39;. De exemplu pentru a crea un login, un user corespunzator intr-o baza de date si al autoriza sa creeze tabele:&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;use&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; [master]&lt;span style="color:gray;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;go&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;create&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;database&lt;/span&gt; [testdb]&lt;span style="color:gray;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;go&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;begin&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;transaction&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;create&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:blue;"&gt;login&lt;/span&gt; [PopescuIon] &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style="color:blue;"&gt;with&lt;/span&gt; password &lt;span style="color:gray;"&gt;=&lt;/span&gt; &lt;span style="color:red;"&gt;&amp;#39;Password#1234&amp;#39;&lt;/span&gt;&lt;span style="color:gray;"&gt;,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;default_database &lt;span style="color:gray;"&gt;=&lt;/span&gt; [testdb]&lt;span style="color:gray;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;use&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; [testdb]&lt;span style="color:gray;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;create&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;span style="color:fuchsia;"&gt;user&lt;/span&gt; [PopescuIon] &lt;span style="color:blue;"&gt;from&lt;/span&gt; &lt;span style="color:blue;"&gt;login&lt;/span&gt; [PopescuIon]&lt;span style="color:gray;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;commit&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;go&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;color:blue;font-family:'Courier New';"&gt;use&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; [testdb]&lt;span style="color:gray;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;grant&lt;span style="font-size:10pt;font-family:'Courier New';"&gt; &lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span style="color:blue;"&gt;create&lt;/span&gt; &lt;span style="color:blue;"&gt;table&lt;/span&gt; &lt;span style="color:blue;"&gt;to&lt;/span&gt; [PopescuIon]&lt;span style="color:gray;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span style="color:blue;"&gt;create&lt;/span&gt; &lt;span style="color:blue;"&gt;table&lt;/span&gt; &lt;span style="color:blue;"&gt;to&lt;/span&gt; [PopescuIon]&lt;span style="color:gray;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;p class="MsoNormal" style="margin:0in 0in 0pt;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span style="color:gray;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;span style="color:gray;"&gt;&lt;span style="font-size:10pt;font-family:'Courier New';"&gt;&lt;font color="#000000"&gt;go&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;In mod normal pentru useri interactivi trebuie specificata clauza MUST_CHANGE la parola (Express insa nu suporta clauza respectiva). Daca nu e vorba de useri interactivi, aproape sigur faptul ca vrei sa folosesti un user si parola este gresit.&lt;/p&gt;&lt;p&gt;Pentru sintaxa CREATE LOGIN sis CREATE USER: &lt;a href="http://msdn2.microsoft.com/en-us/library/ms189751.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms189751.aspx&lt;/a&gt;, &lt;a href="http://msdn2.microsoft.com/en-us/library/ms173463.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms173463.aspx&lt;/a&gt;&lt;/p&gt;&lt;p&gt;HTH,&lt;br /&gt;~ Remus&lt;/p&gt;</description></item><item><title>Adaugare User</title><link>http://sqlserver.ro/forums/thread/1116.aspx</link><pubDate>Wed, 29 Nov 2006 17:13:58 GMT</pubDate><guid isPermaLink="false">963f3a18-65dd-4aad-905c-b785cfe1d7c7:1116</guid><dc:creator>slv</dc:creator><slash:comments>0</slash:comments><comments>http://sqlserver.ro/forums/thread/1116.aspx</comments><wfw:commentRss>http://sqlserver.ro/forums/commentrss.aspx?SectionID=14&amp;PostID=1116</wfw:commentRss><description>Salut,&lt;br /&gt;sunt un incepator int-ale &amp;quot;SQL Server 2005 Express&amp;quot;-ului si am o problema, banala pentru voi, imposibila pentru mine:&lt;br /&gt;Cum adaug un user in SQL Server 2005?&lt;br /&gt;Trebuie sa fac o baza de date cu mai multe tabele (done that) si vreau ca &amp;quot;lumea&amp;quot; sa se conecteze la ea (din C#), folosind o autentificare cu username si parola, nu &amp;quot;Windows Authentication&amp;quot;.&lt;br /&gt;Merci&lt;br /&gt;</description></item></channel></rss>