Search Results

Search found 32223 results on 1289 pages for 'sql 2012'.

Page 257/1289 | < Previous Page | 253 254 255 256 257 258 259 260 261 262 263 264  | Next Page >

  • Developing Schema Compare for Oracle (Part 1)

    - by Simon Cooper
    SQL Compare is one of Red Gate's most successful SQL Server tools; it allows developers and DBAs to compare and synchronize the contents of their databases. Although similar tools exist for Oracle, they are quite noticeably lacking in the usability and stability that SQL Compare is known for in the SQL Server world. We could see a real need for a usable schema comparison tools for Oracle, and so the Schema Compare for Oracle project was born. Over the next few weeks, as we come up to release of v1, I'll be doing a series of posts on the development of Schema Compare for Oracle. For the first post, I thought I would start with the main pitfalls that we stumbled across when developing the product, especially from a SQL Server background. 1. Schemas and Databases The most obvious difference is that the concept of a 'database' is quite different between Oracle and SQL Server. On SQL Server, one server instance has multiple databases, each with separate schemas. There is typically little communication between separate databases, and most databases are no more than about 1000-2000 objects. This means SQL Compare can register an entire database in a reasonable amount of time, and cross-database dependencies probably won't be an issue. It is a quite different scene under Oracle, however. The terms 'database' and 'instance' are used interchangeably, (although technically 'database' refers to the datafiles on disk, and 'instance' the running Oracle process that reads & writes to the database), and a database is a single conceptual entity. This immediately presents problems, as it is infeasible to register an entire database as we do in SQL Compare; in my Oracle install, using the standard recommended options, there are 63975 system objects. If we tried to register all those, not only would it take hours, but the client would probably run out of memory before we finished. As a result, we had to allow people to specify what schemas they wanted to register. This decision had quite a few knock-on effects for the design, which I will cover in a future post. 2. Connecting to Oracle The next obvious difference is in actually connecting to Oracle – in SQL Server, you can specify a server and database, and off you go. On Oracle things are slightly more complicated. SIDs, Service Names, and TNS A database (the files on disk) must have a unique identifier for the databases on the system, called the SID. It also has a global database name, which consists of a name (which doesn't have to match the SID) and a domain. Alternatively, you can identify a database using a service name, which normally has a 1-to-1 relationship with instances, but may not if, for example, using RAC (Real Application Clusters) for redundancy and failover. You specify the computer and instance you want to connect to using TNS (Transparent Network Substrate). The user-visible parts are a config file (tnsnames.ora) on the client machine that specifies how to connect to an instance. For example, the entry for one of my test instances is: SC_11GDB1 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = simonctest)(PORT = 1521)) ) (CONNECT_DATA = (SID = 11gR1db1) ) ) This gives the hostname, port, and SID of the instance I want to connect to, and associates it with a name (SC_11GDB1). The tnsnames syntax also allows you to specify failover, multiple descriptions and address lists, and client load balancing. You can then specify this TNS identifier as the data source in a connection string. Although using ODP.NET (the .NET dlls provided by Oracle) was fine for internal prototype builds, once we released the EAP we discovered that this simply wasn't an acceptable solution for installs on other people's machines. Due to .NET assembly strong naming, users had to have installed on their machines the exact same version of the ODP.NET dlls as we had on our build server. We couldn't ship the ODP.NET dlls with our installer as the Oracle license agreement prohibited this, and we didn't want to force users to install another Oracle client just so they can run our program. To be able to list the TNS entries in the connection dialog, we also had to locate and parse the tnsnames.ora file, which was complicated by users with several Oracle client installs and intricate TNS entries. After much swearing at our computers, we eventually decided to use a third party Oracle connection library from Devart that we could ship with our program; this could use whatever client version was installed, parse the TNS entries for us, and also had the nice feature of being able to connect to an Oracle server without having any client installed at all. Unfortunately, their current license agreement prevents us from shipping an Oracle SDK, but that's a bridge we'll cross when we get to it. 3. Running synchronization scripts The most important difference is that in Oracle, DDL is non-transactional; you cannot rollback DDL statements like you can on SQL Server. Although we considered various solutions to this, including using the flashback archive or recycle bin, or generating an undo script, no reliable method of completely undoing a half-executed sync script has yet been found; so in this case we simply have to trust that the DBA or developer will check and verify the script before running it. However, before we got to that stage, we had to get the scripts to run in the first place... To run a synchronization script from SQL Compare we essentially pass the script over to the SqlCommand.ExecuteNonQuery method. However, when we tried to do the same for an OracleConnection we got a very strange error – 'ORA-00911: invalid character', even when running the most basic CREATE TABLE command. After much hair-pulling and Googling, we discovered that Oracle has got some very strange behaviour with semicolons at the end of statements. To understand what's going on, we need to take a quick foray into SQL and PL/SQL. PL/SQL is not T-SQL In SQL Server, T-SQL is the language used to interface with the database. It has DDL, DML, control flow, and many other nice features (like Turing-completeness) that you can mix and match in the same script. In Oracle, DDL SQL and PL/SQL are two completely separate languages, with different syntax, different datatypes and different execution engines within the instance. Oracle SQL is much more like 'pure' ANSI SQL, with no state, no control flow, and only the basic DML commands. PL/SQL is the Turing-complete language, but can only do DML and DCL (i.e. BEGIN TRANSATION commands). Any DDL or SQL commands that aren't recognised by the PL/SQL engine have to be passed back to the SQL engine via an EXECUTE IMMEDIATE command. In PL/SQL, a semicolons is a valid token used to delimit the end of a statement. In SQL, a semicolon is not a valid token (even though the Oracle documentation gives them at the end of the syntax diagrams) . When you execute the command CREATE TABLE table1 (COL1 NUMBER); in SQL*Plus the semicolon on the end is a command to SQL*Plus to execute the preceding statement on the server; it strips off the semicolon before passing it on. SQL Developer does a similar thing. When executing a PL/SQL block, however, the syntax is like so: BEGIN INSERT INTO table1 VALUES (1); INSERT INTO table1 VALUES (2); END; / In this case, the semicolon is accepted by the PL/SQL engine as a statement delimiter, and instead the / is the command to SQL*Plus to execute the current block. This explains the ORA-00911 error we got when trying to run the CREATE TABLE command – the server is complaining about the semicolon on the end. This also means that there is no SQL syntax to execute more than one DDL command in the same OracleCommand. Therefore, we would have to do a round-trip to the server for every command we want to execute. Obviously, this would cause lots of network traffic and be very slow on slow or congested networks. Our first attempt at a solution was to wrap every SQL statement (without semicolon) inside an EXECUTE IMMEDIATE command in a PL/SQL block and pass that to the server to execute. One downside of this solution is that we get no feedback as to how the script execution is going; we're currently evaluating better solutions to this thorny issue. Next up: Dependencies; how we solved the problem of being unable to register the entire database, and the knock-on effects to the whole product.

    Read the article

  • Buying Microsoft SQL Server 2008 Web Edition

    - by Marco
    I want to buy Microsoft SQL Server 2008 Web Edition in order to remotely install it on the server. The question is: Can I buy a licence in USA and pay in US dollars? OR do I have to buy it in my country (Portugal)? Since the servers are in Germany, should I buy the licence in Germany? (And if anyone know a good reseller I would apreciate)

    Read the article

  • Recommended Server RAM for SQL Full Text Search (FTS)

    - by David
    I gather SQL Server 2008 Express requires a minimum of 512MB RAM to be installed to run on Windows Server 2003, however will this be sufficient to also run Full Text Search on about 50,000 records? I don't want to pay too much and I have seen a 512MB RAM VPS option that interests me. Thanks

    Read the article

  • SQL Server 2008 intellisense not working

    - by Ardman
    Am not sure which site this is supposed to be posted on, but after installing SSMS Tools, my intellisense is no longer working. Please see this question: http://stackoverflow.com/questions/2816861/sql-server-2008-intellisense-no-longer-working

    Read the article

  • How to automatically start the perfmon on SQL Server cluster active node

    - by Jlamber
    How can we start running perfmon automatically on active SQL Server active node? Typically when we failover to the inactive node and we forgot to run the perfmon. We want to start running the perfmom automatically if possible. If not how can we tell if perfmon is not running so we can send out alert to start the perfmom? We can watch the log file output but we want to know if there is more elegance solution. Thank you.

    Read the article

  • SQL 2008 Report Manager not working

    - by Fatherjack
    I have a SQL 2008 developer edition with SSRS and the report manager is only available from the local machine. If I try to access it from any other machine I get challenged for my domain u/name and pwd 3 times and then the screen stays blank. I have made changes to some config files (originals copied out) in order to get a 3rd party application to run but that is now uninstalled and the config files are all back to vanilla (originals copied back in) I feel its something to do with authentication but am stuck ... any suggestions welcomed Jonathan

    Read the article

  • Convert IP Address format from ForeFront Firewall logs with SQL

    - by TrevJen
    I am trying to query IP addresses from Forefront Firewall logs, and I am a little stuck on the IP formatting C0A8E008-FFFF-0000-0000-000000000000 Can anyone give me the MSSQL command to turn this into standard human redable? UPDATE, I now see that I kust need to convert the first 8 charecters from hex to decimal....which I can then convert to IP. the trick is to parse those first charecters from the field with SQL

    Read the article

  • Trouble logging into SQL Server

    - by Timmy
    Getting error: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Restarted the service, server, and all the computers in between. I suspect it's not connecting to the domain server - any way to check about this?

    Read the article

  • What ports does Management Studio use to connect to SQL Server (2005)

    - by Martin
    I have SQL Server 2005 operating on a remotely hosted server and wish to access it from my own machine using management studio The firewall on the remote server is allready setup to allow all traffic from my external IP - and that works great. However I have a load balancing router that has a second line attached to it - unfortunatly the second line has a dynamic external IP. I need to therefore set up a rule in the router to always send data from Management studio on the first line - but I need to know the port numbers. Can you advise?

    Read the article

  • Configure SQL server reportign service to send email

    - by Edoode
    Hi I'm configuring SQL server 2005 reporting server to send emails outside the domain. I have followed the steps outlined at MS but have a question: How can I supply a domain user to connect to the Exchange server in the same domain? I've tried <SMTPAccountName>DOMAIN\User</SMTPAccountName> in the rsreportserver.config.

    Read the article

  • SQL Server 2000 -- Log Shipping reliability?

    - by Chris J
    I've been asked to look into log shipping for SQL Server 2000 (yes, 2000): something in my memory tells me that I looked at this years ago and there were question marks over it's reliability. I'm trying to google stuff, but given the age of 2000 now I've put pulled up anything to confirm this -- most seem to say they're using it without problem, so just want confirm whether I'm just being delusional, or whether there were problems, but with a fully patched SP4 box these don't exist any more. Cheers!

    Read the article

  • SQL Server database on an external hard disk drive

    - by Achilles
    Due to some security problems, My boss has asked me to store all sensitive data in external/removable storages like USB stick or external HDD and this specially includes the MDF/NDF/LDF files of SQL Server 2008 we're running. I've been reading for these last three days with no luck to find a solution. Is there any solution at all? Has ever anybody done such thing?

    Read the article

  • Optimize SAP SQL Server database using DTA

    - by Danilo Brambilla
    Is it safe to optimize a SQL Server 2005 SAP R/3 database using Database Tuning Advisor raccomandatations? We are experiencing very low performance on a dedicated SAP database because of intense read operations ad the db and DTA suggest to create about 25 indexes and 100 stats. I am not an expert of SAP and I am quite surprised to see that this database has about 56.000 tables and 6500 views (120 GB of data). Thank you all for help

    Read the article

< Previous Page | 253 254 255 256 257 258 259 260 261 262 263 264  | Next Page >