SQL 2000 public role

Hi~ When we create a new login on SQL 2000 server. It will DEFAULT group into 'public' role on Database master, msdb,.......
is it possible to take out the new login from the role 'public' of msdb ??

Thats a default role, you can revoke access it.
Also, if you want to check assigned permissions to public role than use below query:
SELECT o.name AS
[Object], p.permission_name
AS [Type]
FROM sys.all_objects o
INNER JOIN sys.database_permissions p
ON o.object_id = p.major_id
INNER JOIN sys.database_principals u
ON u.principal_ID = p.grantee_principal_id
WHERE u.name =
'public'
Refer below article:
http://www.sqlservercentral.com/blogs/basits-sql-server-tips/2013/04/04/the-public-role-do-not-use-it-for-database-access/

Similar Messages

  • Sql 2000 database role

    Hi ,
    I want to grant execute permission to all SP's in SQL 2000  database, when I tried to create a db_execprocs role it is throwing an error near ROLE, and when I googled  I have found a script as 
    CREATE PROCEDURE dbo.spGrantExectoAllStoredProcs @user ABC\venkat
    AS
    -- Object Name: spGrantExectoAllStoredProcs
    -- Author: Edgewood Solutions
    -- Development Date: 03.19.2007
    -- Called By: TBD
    -- Description: Issue GRANT EXEC statement for all stored procedures 
    -- based on the user name that is passed in to this stored procedure
    -- Project: SQL Server Security
    -- Database: User defined databases 
    -- Business Process: SQL Server Security
    -- Num | CRF ID | Date Modified | Developer | Description
    -- 001  | N\A     | 03.15.2007    | Edgewood | Original code for the GRANT 
    -- EXEC process
    SET NOCOUNT ON
    -- 1 - Variable declarations
    DECLARE @CMD1 varchar(8000)
    DECLARE @MAXOID int
    DECLARE @OwnerName varchar(128)
    DECLARE @ObjectName varchar(128)
    -- 2 - Create temporary table
    CREATE TABLE #StoredProcedures
    (OID int IDENTITY (1,1),
    StoredProcOwner varchar(128) NOT NULL,
    StoredProcName varchar(128) NOT NULL)
    -- 3 - Populate temporary table
    INSERT INTO #StoredProcedures (StoredProcOwner, StoredProcName)
    SELECT u.[Name], o.[Name]
    FROM dbo.sysobjects o
    INNER JOIN dbo.sysusers u
    ON o.uid = u.uid
    WHERE o.Type = 'P'
    AND o.[Name] NOT LIKE 'dt_%'
    -- 4 - Capture the @MAXOID value
    SELECT @MAXOID = MAX(OID) FROM #StoredProcedures
    -- 5 - WHILE loop
    WHILE @MAXOID > 0
    BEGIN 
     -- 6 - Initialize the variables
     SELECT @OwnerName = StoredProcOwner,
     @ObjectName = StoredProcName
     FROM #StoredProcedures
     WHERE OID = @MAXOID
     -- 7 - Build the string
     SELECT @CMD1 = 'GRANT EXEC ON ' + '[' + @OwnerName + ']' + '.' 
     + '[' + @ObjectName + ']' + ' TO ' + '[' + ABC\venkat + ']'
     -- 8 - Execute the string
     -- SELECT @CMD1
     EXEC(@CMD1)
    -- 9 - Decrement @MAXOID
    SET @MAXOID = @MAXOID - 1
    END
    -- 10 - Drop the temporary table
    DROP TABLE #StoredProcedures
    SET NOCOUNT OFF
    GO
    this too is throwin an error as:
    Msg 170, Level 15, State 1, Procedure spGrantExectoAllStoredProcs, Line 1
    Line 1: Incorrect syntax near '\'.
    Msg 170, Level 15, State 1, Procedure spGrantExectoAllStoredProcs, Line 52
    Line 52: Incorrect syntax near '\'.
    Can someone help me with this.
    I just need to grant execute permission on all SP's  to 1 database only.
    Thanks.

    First create the procedure and then call the procedure with parameter.
    Try this 
    CREATE PROCEDURE dbo.spGrantExectoAllStoredProcs @user varchar(20)
    AS
    -- Object Name: spGrantExectoAllStoredProcs
    -- Author: Edgewood Solutions
    -- Development Date: 03.19.2007
    -- Called By: TBD
    -- Description: Issue GRANT EXEC statement for all stored procedures
    -- based on the user name that is passed in to this stored procedure
    -- Project: SQL Server Security
    -- Database: User defined databases
    -- Business Process: SQL Server Security
    -- Num | CRF ID | Date Modified | Developer | Description
    -- 001 | N\A | 03.15.2007 | Edgewood | Original code for the GRANT
    -- EXEC process
    SET NOCOUNT ON
    -- 1 - Variable declarations
    DECLARE @CMD1 varchar(8000)
    DECLARE @MAXOID int
    DECLARE @OwnerName varchar(128)
    DECLARE @ObjectName varchar(128)
    -- 2 - Create temporary table
    CREATE TABLE #StoredProcedures
    (OID int IDENTITY (1,1),
    StoredProcOwner varchar(128) NOT NULL,
    StoredProcName varchar(128) NOT NULL)
    -- 3 - Populate temporary table
    INSERT INTO #StoredProcedures (StoredProcOwner, StoredProcName)
    SELECT u.[Name], o.[Name]
    FROM dbo.sysobjects o
    INNER JOIN dbo.sysusers u
    ON o.uid = u.uid
    WHERE o.Type = 'P'
    AND o.[Name] NOT LIKE 'dt_%'
    -- 4 - Capture the @MAXOID value
    SELECT @MAXOID = MAX(OID) FROM #StoredProcedures
    -- 5 - WHILE loop
    WHILE @MAXOID > 0
    BEGIN
    -- 6 - Initialize the variables
    SELECT @OwnerName = StoredProcOwner,
    @ObjectName = StoredProcName
    FROM #StoredProcedures
    WHERE OID = @MAXOID
    -- 7 - Build the string
    SELECT @CMD1 = 'GRANT EXEC ON ' + '[' + @OwnerName + ']' + '.'
    + '[' + @ObjectName + ']' + ' TO ' + '[' + @user + ']'
    -- 8 - Execute the string
    -- SELECT @CMD1
    EXEC(@CMD1)
    -- 9 - Decrement @MAXOID
    SET @MAXOID = @MAXOID - 1
    END
    -- 10 - Drop the temporary table
    DROP TABLE #StoredProcedures
    SET NOCOUNT OFF
    GO
    dbo.spGrantExectoAllStoredProcs 'abc\venkat'
    OR
    directly execute the below script
    Change the @user parameter with valid account
    DECLARE @User Varchar(20)
    DECLARE @CMD1 varchar(8000)
    DECLARE @MAXOID int
    DECLARE @OwnerName varchar(128)
    DECLARE @ObjectName varchar(128)
    SET @user='abc\venkat'
    -- 2 - Create temporary table
    CREATE TABLE #StoredProcedures
    (OID int IDENTITY (1,1),
    StoredProcOwner varchar(128) NOT NULL,
    StoredProcName varchar(128) NOT NULL)
    -- 3 - Populate temporary table
    INSERT INTO #StoredProcedures (StoredProcOwner, StoredProcName)
    SELECT u.[Name], o.[Name]
    FROM dbo.sysobjects o
    INNER JOIN dbo.sysusers u
    ON o.uid = u.uid
    WHERE o.Type = 'P'
    AND o.[Name] NOT LIKE 'dt_%'
    -- 4 - Capture the @MAXOID value
    SELECT @MAXOID = MAX(OID) FROM #StoredProcedures
    -- 5 - WHILE loop
    WHILE @MAXOID > 0
    BEGIN
    -- 6 - Initialize the variables
    SELECT @OwnerName = StoredProcOwner,
    @ObjectName = StoredProcName
    FROM #StoredProcedures
    WHERE OID = @MAXOID
    -- 7 - Build the string
    SELECT @CMD1 = 'GRANT EXEC ON ' + '[' + @OwnerName + ']' + '.'
    + '[' + @ObjectName + ']' + ' TO ' + '[' + @user + ']'
    -- 8 - Execute the string
    -- SELECT @CMD1
    EXEC(@CMD1)
    -- 9 - Decrement @MAXOID
    SET @MAXOID = @MAXOID - 1
    END
    -- 10 - Drop the temporary table
    DROP TABLE #StoredProcedures
    --Prashanth

  • User is not getting access after providing him db_owner also in SQL 2000 SP4

    Team,
    I have one instance of SQL 2000 SP4.
    On this, one user wants access to update / drop user defined table.
    I have given him db_datawriter & db_ddladmin role but he is still not able to perform his operation ( update or drop)
    Server: Msg 229, Level 14, State 5, Line 1
    DELETE permission denied on object '<Table>', database '<DB>', owner 'dbo'.<Server_Name>
    Also given individual update/drop on some tables, but still error.
    Finally, given him db_owner also but no success.
    Anybody .. what could be issue ??
    Chetan

    Can you check if there is any DENY for that user?
    If there is DENY then it will outwiegh.
    Can you run
    sp_helprotect
    and check if the permission is properly given and if there is any DENY?
    http://technet.microsoft.com/en-us/library/aa933420(v=sql.80).aspx
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Connection using sql 2000

    i try to connect t o database using sql 2000
    this my code and the execptions
    can anyone help me to tell me what is the right code to connect to database
    package javaapplication37;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import java.sql.*;
    * @author ed
    public class Main {
    /** Creates a new instance of Main */
    public Main() {
    * @param args the command line arguments
    public static void main(String[] args) throws SQLException {
    // try {
    // TODO code application logic here
    //String url = "jdbc:ODBC:Northwind";
    //try {
    // Connection con=DriverManager.getConnection(url,"sa","remo");
    // } catch (SQLException ex) {
    // ex.printStackTrace();
    // System.out.println("remo hi");
    Connection con;
    try {  
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    // Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    con=DriverManager.getConnection("odbc:microsoft:sqlserver://localhost:1433;databaseName=Northwind;selectMethod=cursor");
    // System.out.println("elk");
    } catch (ClassNotFoundException ex) {
    ex.printStackTrace();
    // } catch (ClassNotFoundException ex) {
    // ex.printStackTrace();
    the exception is
    init:
    deps-jar:
    compile:
    Exception in thread "main" java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:545)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at javaapplication37.Main.main(Main.java:47)
    Java Result: 1
    debug:
    BUILD SUCCESSFUL (total time: 1 second)
    Message was edited by:
    romee

    W3hy did you give up with the type 4 driver? Why did you not use Google? Your basic question has been asked and answered repeatedly.
    I will say this a JDBC-ODBC URL begins with jdbc:odbc and not just odbc though I have some doubts about the rest of the stuff you'e crammed in there.

  • Wanted to connect Voyager (BO XI R3 ) and sql 2000 (MSAS).

    We have never used Voyager before, wanted to connect Voyager (BO XI R3 ) and sql 2000 (MSAS).
    Details of my Voyager connection below:
    Name: test
    Provider: Microsoft OLE DB Provider for OLAP Services 8.0
    Server Information:
    Server Type: Server
    Server: <server ip address>
    Data Source:
    User: <domain>\<NT account>
    Password: <NT password>
    Error: "No cubes were found. Please check that you have permission to view cubes on the database server."
    I tried accessing the cubes using the same data connection via excel pivottable and was able to access the cubes successfully.
    Badly need help!

    Hi Everyone,
    As I have been working with MSAS 2000 and I reconmmend to install SP4 on the MSAS 2000 since BO XI R3 according to Support plataform it says that it is supported from SP4.
    As well verified that you have access using the security role using your Windows AD authentication since Microsoft Service Analysis does not have its own authentication mode to connect basicatly rely on Windows AD.
    If you want more information check this link.
    http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/anservog.mspx#EXFAE
    Also check the service account on the same link above.
    Receive Client Security Credentials Via Middle-Tier Application
    The MSSQLServerOLAPService service account is irrelevant in the typical client-server environment. In this environment, the user application connects directly to the Analysis Services computer to execute a query or create an object, and passes the user's credentials directly to Analysis Services for evaluation. Access is granted or denied by Analysis Services based on cell-level and dimension-level security.
    However, if the client application attempts to connect to Analysis Services through a middle-tier server, the authentication process is not quite so simple. Normally, security credentials cannot be passed over multiple computers. However, if the middle-tier application server and the Analysis Services computer support Kerberos authentication and delegation, the client's security credentials can be passed by the middle-tier application to Analysis Services.
    For Kerberos authentication, delegation, impersonation, and mutual authentication to work, the MSSQLServerOLAPService service must run under one of the following types of accounts:
    u2022 Local system account (which has no network access rights).
    u2022 Domain administrator account.
    u2022 Domain user without administrative privileges in the Microsoft Active Directory domain, provided that a domain administrator registers the Service Principal Name (SPN) for the account separately using the setspn utility in the Windows 2000 Resource Kit.
    Note   There are a number of steps you must follow to permit Kerberos authentication, delegation, impersonation, and mutual authentication to work. For information about these steps, see "Security Account Delegation" in SQL Server Books Online. Also go to Knowledge Base (support.microsoft.com) and see the article "Use Kerberos Authentication for Microsoft SQL Server 2000 Analysis Services."
    Miguel Jimenez

  • How to connect to MS SQL 2000

    Hi,
    We have a MS sql server 2000 machine.
    I need to execute a select query on one particular db table of that server and retrieve data.
    I need to do this operation from xp mahine and both machines are in same domain.
    I am given access to that particular db of that server for my ID.
    Can I access that ms sql database by writing ordinary jsp program by giving servername and username?
    Or do I need to install some client tool to execute the query.
    Please give me suggestion how to do that?
    Thanks in Advance.

    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class TestClass {
      public static void main(String args[]) {
        //variables
        String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
        String url = "jdbc:microsoft:sqlserver://localhost:1433", "userName", "password"";//give ur machine ip address
        String username = "userName";//here u can provide your  database username
        String password = "pass";//here u can provide your  database password
        try {
        Class.forName(driver);
        Connection  conn = DriverManager.getConnection(url, username, password);
      System.out.println("Connection successful!");
        } catch (SQLException e) {
         e.printStackTrace();
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Data extraction from SAP r/3 to sql 2000, bpc server

    Hi All,
    I have posted a similar thread previously,sap r/3 to sql 2000/2005, and understood how to transfer data from SAP R/3 to SQL 2005, but I need to transfer data from SAP R/3 to SQL 2000 server, not SQL 2005 server.
    Any help will be greatly appreciated.
    Regards,
    Kranthi.

    If you want to extract SAP R/3 data to SQL 2000, here are some alternatives:
    1. It becomes very easy if by any chance, you are using SAP BW with SAP R/3. You can extract the data into BW using standard or custom extractors and then send it out with open hub. SQL2000 can pick the flat files from a specified location at regular intervals.
    2. You can use Business Object extractors. You can get more info at:
    http://www.france.businessobjects.com/pdf/products/dataintegration/rapid_marts_sap_infosheet.pdf
    3. If that is not an option, then you need to have a tool that allows being called via RFC. This agent will then execute the required command on behalf of your application and return the result. I do not know if there is a ready-to-use RFC-compliant agent for SQL Server. If you have a tool that does it for you, you might have to check your network connections (ping), permissions etc. and see if you can execute an rSQL from the remote machine on the SQL server.
    There is a general solution to connect to nearly any kind of modern server application from a remote site by using simple HTTP requests. Suitable HTTP server for most needs would be:
    1. Microsoft IIS
    2. Java Tomcat or IBM WebSphere
    3. SAP WebAS
    In most cases, the IIS would probably be the one as it is installed on the Windows 2000 server anyway.
    Define an Active Server Page (ASP.NET) and insert the necessary code in your favorite language to extract the data from the SQL server.
    Your ASP.NET page would pack the result in the HTTP response object to be returned. In order to call the page from SAP you call the function modules HTTP_POST (using a HTTP POST request) or HTTP_GET (for HTTP GET request) on the standard RFC destination SAPHTTPA. (Pointing to a SAP utility program saphttp that resides in the SAP binary directory of your SAP database server and can be called from the command line in order to test its functionality without RFC).
    Regards
    Pravin

  • SQL 2000 - Blocking Happening again and again

    Hi  guys..
    on sql 2000 ..from today morning blocking keep happening again and again even though killed SPID .. Reastarted SQL and app server. any one has idea what will be good action item?
    also like to know scripts for sql 2000 gives detailed information about which query is blocking .
    In sp_who2 shows IIS program name as blocking 
    thanks
    Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach A.Shah

    Hello,
    Refer to below link
    http://support.microsoft.com/kb/224453/en-gb
    If you have Database with high concurency some blocking is inevitable ,moreover if blocking is there for few seconds its not an issue a long block is a issue though.Below query will give blocking information
    select * from sys.sysprocesses where blocked <> 0
    To check lead blocker
    IF EXISTS ( SELECT 1 FROM master.dbo.sysprocesses WHERE blocked <> 0 )
    SELECT spid,
    status,
    loginame = SUBSTRING(loginame, 1, 30),
    hostname = SUBSTRING(hostname, 1, 12),
    blk = CONVERT(char(4), blocked),
    open_tran,
    dbname = SUBSTRING(DB_NAME(dbid),1,10),
    cmd,
    waittype,
    waittime,
    last_batch
    FROM master.dbo.sysprocesses NOLOCK
    WHERE spid IN (SELECT blocked FROM master.dbo.sysprocesses)
    AND blocked = 0
    ELSE
    SELECT 'No blocking found!'
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • SQL 2000 LINKED SERVER ERROR 7303 WITH SQL 2012 ON WINDOWS SERVER 2012 R2

    Hi all,
    I have a problem with SQL Server 2012 and a linked server for SQL 2000 database.
    System specification:
    Windows server 2012 64 bit
    SQL SERVER 2012 64 bit
    REMOTE SERVER SQL 2000 32 bit
    I've installed sql native client 32bit,create a SYSTEM DSN odbc connection with "SQL Server" driver named "MYSERVER".
    Create a linked server with the query below in SQL 2012:
    EXEC master.dbo.sp_addlinkedserver @server =N'MYSERVER', @srvproduct=N'MYSERVER', @provider=N'MSDASQL', @datasrc =N'MYSERVER', @location=N'System';
    EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'MySERVER',@useself=N'True',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL
    GO
    but when i browse the linked server i receved error 7303.

    You need 64-bit MSDASQL. It is the bitness of the server you are connecting from that matters. 64-bit executables cannot hook into 32-bit DLL.
    However, I suspect that you will not get things to work anyway. At least I have not seen anyone this far who has been able to set up a linked server from SQL 2012 to SQL 2000. I know that when I tried this, the following providers had this result:
    SQLNCLI11 - does not support connections to SQL 2000.
    SQLNCLI10 - failed with some obscure message that I don't recall.
    SQLNCLI - Don't recall that the problem was here.
    SQLOLEDB - SQLOLEDB is always replaced with the most recent version of SQLNCLI, so this fails because of lack of support.
    I don't think I got through all version of the ODBC drivers, though.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Upgrade R/3 4.7 110 from SQL 2000 to ECC 6.0 /SQL 2005

    Dear Experts,
    We are currently running R/3 4.7 110 with kernel 640 32 Bit Non Unicode on Windows Server 2000/ MS SQL 2000 Platform. We are planning to Upgrade the same to ECC 6.0 on Windows 2003/ SQL 2005 on New x64 Bit Hardware.
    I was earlier planning to Upgrade the OS/DB in first Phase moving the same R/3 4.7 on Windows 2003 Server /MS SQL 2005 and then Upgrade it to ECC 6.0 in second phase. But to my surprise when I checked PAM, I found that R/3 4.7 110 is not at all supported on SQL 2005 ( though R/3 4.6 C is)
    Now shall I upgrade it to ECC6.0 First with Windows 2003/SQL 2000 ( Because ECC6.0 is supported with MS SQL 2000)and then move to MS SQL 2005 ?
    Thanks
    Jitendra Tayal

    We had the same issue.
    So I checked with SAP.
    This was their reply.
    'SAP R/3 4.7 Ext 110 is supported on SQL 2005. Please refer to the following notes for further information:'
    Note 905634 - Release planning for Microsoft SQL Server 2005
    Note 799058 - Setting Up Microsoft SQL Server 2005
    Note 899111 - Installing R3 4.7SR1 (47X110) on x64 Windows Platform
    Note 151603 - Copying an SQL Server database
    So feel free to go ahead.
    Thanks.
    Carl.

  • How to upload sap r/3 table data to ms-sql 2000?

    Dear Friends
    any one can help me out step by step to upload sap r/3 table data to ms-sql 2000.
    Thanks in advance

    hi
    good
    go through this link
    http://www.itcserver.com/blog/2006/06/29/data-transfer-methods/
    thanks
    mrutyun^

  • Sap r/3 to sql 2000/2005

    Hi All,
    We are trying to pull transation data from SAP R/3 to sql 2000 server. Should I build DTS by connecting to backend of sap R3 or do I have any way I can load data directly from SAP R3 independent of data base connected to R3.
    Regards,
    Kranthi

    Hi Kranthi,
    If you are trying to get the SAP R/3 master and transactional data into SQL server then you have many alternatives:
    1. There is Visual Studio that you can use to get the SAP data in. Just follow the steps given at http://msdn2.microsoft.com/en-us/library/cc185254.aspx
    2. You can use Xtract IS tools. They allow you to get data from any SAP table, infocube, SAP query, BAPI, hierarchy or a report. You can get more information at http://www.theobald-software.com/cms/en/xtract-is/xtract-is-bw-cube.html
    4. Some BI connectors will be delivered in the SQL feature pack if you want to go that route. For more information, go to http://s3.amazonaws.com/jef.mindtouch.com/1007230/32/0?AWSAccessKeyId=1TDEJCXAPFCDHW56MSG2&Signature=r/U/Af2NFhN89GInha2%2bR2Tiuo4%3d&Expires=1209070349
    Regards
    Pravin

  • How to spool the result of an query into a file in sql 2000

    Hi All,
    I have an SQL query which iterates through number of times for checking on some conditions and will return results each time. I wants to save the results into an different xml file each time. I tried using below query:
    exec xp_cmdshell 'bcp "use Mimsadaptorlogs; select top 10 * from log order by logdate" queryout "D:\cdr_cg.xml" -T -c -t,'  ---> Its not working as expected.
    I got the Below output:
    NULL
    Starting copy...
    SQLState = 01000, NativeError = 5701
    Warning = [Microsoft][ODBC SQL Server Driver][SQL Server]Changed database context to 'MIMSAdaptorlogs'.
    NULL
    10 rows copied.
    Network packet size (bytes): 4096
    Clock Time (ms.): total       62
    NULL
    Could you anuone please suggest me on this.......
    Thanks and Regards, Bala

    You will need to write a client program to do this. SQL Server is not intended for writing files. People still do it by calling BCP through xp_cmdshell, but this is a dubious practice. Better is to write a CLR stored procedure for the task. However, you
    are on SQL 2000, and the CLR support was added in SQL 2005. Furthermore, there is no XML type in SQL 2000, and the only way to generate XML is with the FOR XML clause. But this output is not well understood by BCP. Then I try: [code} bcp "SELECT * FROM Northwind..Customers
    FOR XML RAW" queryout slask.bcp -c -T [/code] on SQL 2000, I get [code] 11 rows copied. [/code] which is complete hogwash, because there are 91 rows in that table, and the output should be a single XML document, and the output looks like this: [code] <row
    CustomerID="ALFKI"... Bouchers" City="Marseil... tomerID="DUMON" Company... 0.32.21.21" Fax="40.32.... los Hern ndez" ContactT... n Steel" ContactTitle="... e" ContactTitle="Market... ="Salzburg" PostalCode=... " Phone="(21) 555-3412"... ty="Charleroi" PostalCo...
    <row CustomerID="WARTH"... [/code] I have truncated the output on the right side, but the left side is authentic. It really is that bad.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Hi Pls help me, How to work with SQL 2000 Database

    I have database using SQL 2000, How to connect and work with SQL 2000 Database. thanks

    Log on to www.SQLite.org that may help you.
    Using the Sqlite3.dll and after customizing your code with SQLite3.h you can read and write on to that DB.

  • Please Help!!!!! Problem Migrating from sql 2000 stored procedure to PL/SQL

    I have used a tool to convert my sql 2000 stored procedure to Oracle 10g PL/SQL, here is an example
    SQL 2000 Stored Procedure
    CREATE PROCEDURE [GetEmployees]
    AS
    Select * from EMPMST ORDER BY emp_name
    GO
    After Transformation i got 2 files, one was a procedure and other a package
    CREATE OR REPLACE PACKAGE GLOBALPKG
    AS
         TYPE RCT1 IS REF CURSOR;
         TRANCOUNT INTEGER := 0;
         IDENTITY INTEGER;
    END;
    CREATE OR REPLACE PROCEDURE GetEmployees
         RCT1 IN OUT      GLOBALPKG.RCT1
    AS
    BEGIN
         OPEN RCT1 FOR
         SELECT *
         FROM EMPMST
         ORDER BY emp_name;
    END;
    When i execute the procedure GetEmployees i got this error :
    SQL> execute GetEmployees;
    BEGIN GetEmployees; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'GETEMPLOYEES'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Please Help me in debugging this error. Thanks in advance.

    As the poster above mentioned you cannot call "GetEmployees" without a parameter.
    Note that the procedure declaration has the following line
    RCT1 IN OUT GLOBALPKG.RCT1
    This means that whenever you want to call the procedure you must pass it a variable of type GLOBALPKG.RCT1
    However unless this is merely a homework or learning exercise (i.e. you are not porting the code of a production application) i would strongly recommend that you do not attempt to simply convert the code to PL/SQL.
    The reasoning behind this is that Oracle's architecture will be completely different to the source of the original code and if you attempt to simply port the code (especially using an automatic tool) you will almost certainly hit problems.
    For example the SQL Server's 2000 code may (should be) be written based on SQL Server's locking strategy. Oracle's locking strategy is completly different if you try to use the same techniques as you do in SQL Server the performance will suffer.
    Porting a code or a database schema from one platform to another involves a lot of analysis in order to take advantage of the features of the destination platform.
    As I said this may not be important to you depending on why you are attempting a port.
    Good Luck.

Maybe you are looking for