<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.dotnetzone.gr:443/cs/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>SQL Server (και άλλες databases)</title><link>https://www.dotnetzone.gr:443/cs/forums/28/ShowForum.aspx</link><description>Θέματα που αφορούν τον SQL Server (7.0, 2000, 2005) αλλά και Oracle, Access, DB2, MySQL, κλπ.</description><dc:language>el</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Απ: PL/SQL Control structures</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/19996.aspx</link><pubDate>Wed, 08 Nov 2006 20:53:56 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:19996</guid><dc:creator>axaros</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/19996.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=28&amp;PostID=19996</wfw:commentRss><description>Είσαι άψογος !!!&lt;BR&gt;Ευχαριστώ θερμά ...</description></item><item><title>Απ: PL/SQL Control structures</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/19983.aspx</link><pubDate>Wed, 08 Nov 2006 18:05:10 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:19983</guid><dc:creator>nsouflis</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/19983.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=28&amp;PostID=19983</wfw:commentRss><description>&lt;font color="#ff0000"&gt;create user myuser&lt;br&gt;&amp;nbsp; identified by&amp;nbsp; mypass&lt;br&gt;&amp;nbsp; default tablespace USERS&lt;br&gt;&amp;nbsp; temporary tablespace TEMP&lt;br&gt;&amp;nbsp; profile DEFAULT&lt;br&gt;&amp;nbsp; quota unlimited on users;&lt;br&gt;-- Grant/Revoke role privileges &lt;br&gt;grant connect to MYUSER;&lt;br&gt;grant dba to MYUSER;&amp;nbsp;&amp;nbsp; -- αν θέλεις να είναι admin ο χρήστης σου &lt;br&gt;grant resource to MYUSER;&amp;nbsp; &lt;br&gt;-- Grant/Revoke system privileges &lt;br&gt;grant unlimited tablespace to MYUSER ;&amp;nbsp; --- αν θέλεις &lt;/font&gt;&lt;br&gt;&lt;br&gt;Κάνε logon με τον χρήστη που έφτιαξες , και ότι Object δημιουργήσεις θα μπεί στο schema του .&lt;br&gt;&amp;nbsp;Αν όμως θέλεις να είναι προσβάσιμα τα object και από άλλον χρήστη πρέπει να&amp;nbsp; φτιάξεις public synonym &lt;br&gt;&lt;br&gt;create public synonym MYOBJECT&lt;br&gt;
              for MYUSER.MYOBJECT ;&lt;br&gt;&lt;br&gt;Στο http://www.allroundautomations.com/plsqldev.html θα βρείς το plsqldeveloper , ένα εργαλείο που θα σου λύσει τα χέρια &lt;br&gt;για οτιοδήποτε θέλεις να κάνεις πάνω στην Oracle .&amp;nbsp; ( 30 day trial αν θυμάμαι καλά ) &lt;img src="/cs/emoticons/emotion-1.gif" alt="Smile" /&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</description></item><item><title>Απ: PL/SQL Control structures</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/19974.aspx</link><pubDate>Wed, 08 Nov 2006 17:38:35 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:19974</guid><dc:creator>axaros</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/19974.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=28&amp;PostID=19974</wfw:commentRss><description>&lt;P&gt;Φίλε nsouflis,&lt;BR&gt;αν έχεις χρόνο και δεν σε έπρηξα :&lt;BR&gt;&lt;BR&gt;Πως αντίστοιχα θα κάνω create τον Oracle User που χρειάζομαι, θα του κάνω &lt;BR&gt;grant rights (αλήθεια ποιά χρειάζομαι) και τέλος το schema για να ρίξω μέσα&lt;BR&gt;τα υπόλοιπα objects μου;&lt;BR&gt;&lt;/P&gt;</description></item><item><title>Απ: PL/SQL Control structures</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/19913.aspx</link><pubDate>Tue, 07 Nov 2006 00:58:22 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:19913</guid><dc:creator>nsouflis</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/19913.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=28&amp;PostID=19913</wfw:commentRss><description>Πάνο ο community server mas χάλασε το if then statement &lt;br&gt;
&lt;br&gt;
( μόνο στην διόρθωση το βλέπω ολόκληρο ) &lt;br&gt;
&lt;br&gt;
το σωστό &lt;br&gt;
&lt;br&gt;
"&lt;font color="#ff0000"&gt;if i &amp;lt; 1 then&lt;br&gt;&lt;br&gt;
execute immediate 'create table TABLEAGENTS(id number(37) not null,name varchar2(250) not null)';&lt;br&gt;&lt;br&gt;
execute immediate 'alter table TBLAGENTS add constraint PK_tblAgents_1 primary key (ID)' ;&lt;br&gt;&lt;br&gt;
end if;"&lt;/font&gt;</description></item><item><title>Απ: PL/SQL Control structures</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/19910.aspx</link><pubDate>Tue, 07 Nov 2006 00:40:09 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:19910</guid><dc:creator>axaros</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/19910.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=28&amp;PostID=19910</wfw:commentRss><description>Φίλε nsouflis,&lt;BR&gt;είμαι πραγματικά ευγνώμων ...</description></item><item><title>Απ: PL/SQL Control structures</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/19893.aspx</link><pubDate>Mon, 06 Nov 2006 21:41:59 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:19893</guid><dc:creator>nsouflis</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/19893.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=28&amp;PostID=19893</wfw:commentRss><description>Για να τρέξεις DDL statements από plsql block πρέπει να χρησιμοποιήσεις το &lt;br /&gt;
&lt;br /&gt;
πακέτο &lt;br /&gt;
&lt;br /&gt;
dbms_sql.parse &lt;br /&gt;
&lt;br /&gt;
ή να καλέσεις την &lt;br /&gt;
&lt;br /&gt;
 execute immediate&lt;br /&gt;
&lt;br /&gt;
Παρακάτω είναι ενά sample block με τον δεύτερο τρόπο &lt;br /&gt;
&lt;br /&gt;
declare &lt;br /&gt;
&lt;br /&gt;
  -- Local variables here&lt;br /&gt;
&lt;br /&gt;
  i integer;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
  -- Test statements here&lt;br /&gt;
&lt;br /&gt;
  select count(*) &lt;br /&gt;
&lt;br /&gt;
  into i &lt;br /&gt;
&lt;br /&gt;
  from sys.all_all_tables where owner = 'yourusername'&lt;br /&gt;
&lt;br /&gt;
       and table_name like 'TBLAGENTS'  ;&lt;br /&gt;
&lt;br /&gt;
       if i 
&lt;br /&gt;
   execute immediate  'create table TABLEAGENTS(id number(37) not null,name varchar2(250) not null)';&lt;br /&gt;
&lt;br /&gt;
 execute immediate 'alter table TBLAGENTS  add constraint PK_tblAgents_1 primary key (ID)' ;&lt;br /&gt;
&lt;br /&gt;
     &lt;br /&gt;
&lt;br /&gt;
       end if;&lt;br /&gt;
&lt;br /&gt;
  end;&lt;br /&gt;
&lt;br /&gt;</description></item><item><title>Απ: PL/SQL Control structures</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/19892.aspx</link><pubDate>Mon, 06 Nov 2006 21:10:00 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:19892</guid><dc:creator>axaros</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/19892.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=28&amp;PostID=19892</wfw:commentRss><description>Βοήθησες φίλε nsouflis ... To IF πως το συντάσω συγκεκριμένα ;</description></item><item><title>Απ: PL/SQL Control structures</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/19891.aspx</link><pubDate>Mon, 06 Nov 2006 21:01:36 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:19891</guid><dc:creator>nsouflis</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/19891.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=28&amp;PostID=19891</wfw:commentRss><description>Για τον έλεγχο του άν υπάρχει ο πίνακας θα σου έλεγα &lt;br /&gt;
&lt;br /&gt;
select *   from sys.all_all_tables  where owner = 'yourusernamehere'&lt;br /&gt;
&lt;br /&gt;
and table_name like 'tblAgents' &lt;br /&gt;
&lt;br /&gt;
( ή διαφορετικά count(*) )  και αν δεν σου επιστρέψει τίποτα &lt;br /&gt;
&lt;br /&gt;
create table tblagents&lt;br /&gt;
&lt;br /&gt;
(&lt;br /&gt;
&lt;br /&gt;
  id   number(37) not null,&lt;br /&gt;
&lt;br /&gt;
  name varchar2(250) not null&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
tablespace USERS&lt;br /&gt;
&lt;br /&gt;
storage&lt;br /&gt;
&lt;br /&gt;
  (&lt;br /&gt;
&lt;br /&gt;
    initial 64K&lt;br /&gt;
&lt;br /&gt;
    minextents 1&lt;br /&gt;
&lt;br /&gt;
    maxextents unlimited&lt;br /&gt;
&lt;br /&gt;
  );&lt;br /&gt;
&lt;br /&gt;
alter table tblagents&lt;br /&gt;
&lt;br /&gt;
  add constraint PK_tblAgents_1 primary key (ID);&lt;br /&gt;
&lt;br /&gt;
Ελπίζω να βοήθησα . &lt;br /&gt;
&lt;br /&gt;</description></item><item><title>PL/SQL Control structures</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/19887.aspx</link><pubDate>Mon, 06 Nov 2006 19:52:21 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:19887</guid><dc:creator>axaros</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/19887.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=28&amp;PostID=19887</wfw:commentRss><description>&lt;P&gt;Παιδιά καλημέρα.&lt;BR&gt;Πως θα γράψω το εξής σε PL/SQL :&lt;/P&gt;
&lt;P&gt;SET ANSI_NULLS ON&lt;BR&gt;GO&lt;BR&gt;SET QUOTED_IDENTIFIER ON&lt;BR&gt;GO&lt;BR&gt;IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tblAgents]') AND type in (N'U'))&lt;BR&gt;BEGIN&lt;BR&gt;CREATE TABLE [dbo].[tblAgents](&lt;BR&gt;&amp;nbsp;[Id] [bigint] NOT NULL,&lt;BR&gt;&amp;nbsp;[Name] [nvarchar](250) NOT NULL,&lt;BR&gt;&amp;nbsp;CONSTRAINT [PK_tblAgents_1] PRIMARY KEY CLUSTERED &lt;BR&gt;(&lt;BR&gt;&amp;nbsp;[Id] ASC&lt;BR&gt;)WITH (PAD_INDEX&amp;nbsp; = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]&lt;BR&gt;) ON [PRIMARY]&lt;BR&gt;END&lt;BR&gt;GO&lt;BR&gt;&lt;/P&gt;</description></item></channel></rss>