Wednesday, March 28, 2012
Newbie question about importing db into SQL Server
Is there a tool that can migrate this Access db into SQL, or should I just reconstruct it? Been looking around for some tech notes and have been unsuccessful so far. Thanks in advance! -ValerieI'd suggest the Access Upsizing Wizard (http://support.microsoft.com/default.aspx?scid=kb;en-us;330468).
-PatP|||Thanks! ...you'd think that would pop up in Access Help, you know? Harumph. -vsql
Wednesday, March 21, 2012
newbie pl/sql outputs select results
I want to write a PL/SQL search engine that does some complex checking of various tables for a client's website. I could write it all in a PHP $sql = "SELECT ..." but I want to put it the sql into PL/SQL and am having trouble figuring out how PL/SQL outputs results.
Basically, I want to call the procedure with some keywords and have it return the results. Something like this:
create package jonsearch is
procedure getrecords(kw IN varchar, results OUT ?) is
begin
--complex sql goes here
end;
end jonsearch;
jonsearch.getrecords("keywords") would return the results just like select * from table would return results.
My trouble is that every tutorial I have read relies on dbms_output.put_line to output data. I want to output the results as a set, with an output variable, but I can't find a tutorial that shows how to use output variables.
Any help, even pointing me to a tutorial, would be great.
thanks,
JonIt turns out what I was looking for is called a REF CURSOR. I needed to create a package that defines this reference cursor, and then use that as my output variable.
This is described here, if anyone is interested:
http://www.oracle-base.com/Articles/8i/UsingRefCursorsToReturnRecordsets.asp|||Not understanding...
How are you wanting to output the variables? If you want to simply return the values, you will use the DBMS_OUTPUT package. If you are returning to Apache through the modplsql module, you will use the HTP and HTF packages.
As to REF Cursors, here is a Reader's Digest version:
http://www.dbforums.com/t974133.html
JoeB
Friday, March 9, 2012
Newbie Connection problems
I am running a website on one server and need to be able to connect to
SQL 2000 on another server. When I try to connect to the SQL server
in an asp.net application I get the following error:
Login failed for user 'Domain\Server$'
How do I configure SQL to allow the other IIS server to connect.
TIA
Tony
Tony,
please can you post up your connectionstring that the SQLConnection object
is using. Also, do you want to use SQL authentication or Trusted, and what
is your SQL Server configured to allow - Mixed or Windows.
TIA,
Paul Ibison
|||From the error message it appears that the machine account is attempting to
connect to SQL Server, not a user account. You can get the connection to
work by adding a login for the machine account: Domain\server$. This is a
AD accounta nd many application use it to connect to SQL Server. It is
basically the machine system account.
Rand
This posting is provided "as is" with no warranties and confers no rights.
Newbie Connection problems
I am running a website on one server and need to be able to connect to
SQL 2000 on another server. When I try to connect to the SQL server
in an asp.net application I get the following error:
Login failed for user 'Domain\Server$'
How do I configure SQL to allow the other IIS server to connect.
TIA
TonyTony,
please can you post up your connectionstring that the SQLConnection object
is using. Also, do you want to use SQL authentication or Trusted, and what
is your SQL Server configured to allow - Mixed or Windows.
TIA,
Paul Ibison|||From the error message it appears that the machine account is attempting to
connect to SQL Server, not a user account. You can get the connection to
work by adding a login for the machine account: Domain\server$. This is a
AD accounta nd many application use it to connect to SQL Server. It is
basically the machine system account.
Rand
This posting is provided "as is" with no warranties and confers no rights.
newbie confusion: file vs server
caution: this is not doubt a stupid newbie question...
In creating vs.net 2005 website, I can add a sql database to my project and a mdf file is created. I can create data providers against this file, etc, just as though it were a database in a sql server instance. I can deploy this dbf file to my finished web site.
Also, I can attach to a running instance of sql server 2005 express, and do exactly the same thing.
I can also take my mdf file created in step 1 above, and attach it to a running instance of sql server express.
Now, I have delt with access databases, and sql server 2000 databases, so this dual nature of sql server 2005 express confuses me a little.
Why would I ever need to use a server instance of sql server 2005 when I can use a file based data file in my web apps? Is there an advantage to one or the other?
I had a thought that when using the file based method, I was actually still using the server based stuff, which would explain why the sql server express notification bubble pops up when I debug on the dev machine.
In any case could someone explain the difference and should I install sql server 2005 express on my deployment server?
thanks.
Access is a database SQL Server Express is a SQL Server 2005 edition which is RDBMS(relational database management systems) without a SQL Server instance you don't have a database engine to run your MDF(Microsoft data file) it is just one of at least two files you need to run your database. Run a search for file groups in SQL Server BOL(books online). Hope this helps.
http://msdn2.microsoft.com/en-us/library/ms179316.aspx
|||In order to use a *.mdf (SQL Server database file), you must have a SQL Server installed and running.
That could be SQL Server 2005 Express.
|||Thanks for the replies. I have a clearer picture but have some additional questions...
I add a mdf file to my asp.net website. This file requires some version of SQL server, in this case
Express, to provide the RDMS system. Great. So how is it that I can just deploy the app to the web server
and it works without installing SQL server Express on the web server?
Is SQL Server Express built into the ASP.Net 2.0 runtime?
If so, the file must somehow be dynamically attached to this instance of SQL Server Express?
How will this type of deployment be upgraded to a higher version of SQL Server? If I use the "file" based
technique, will my app always use the embeded SQL Server Express and not any fuller version of SQL Server
I may install?
So to migrate to a higher version of SQL Server, will I need to attach the mdf file to SQL Server and change my
connection string to point to the new version of SQL Server?
This is my last little stumbling block to grasping the SQL Server Express concept, thanks for your replies!
|||Perhaps this will clear some things up for you.
http://msdn2.microsoft.com/en-us/library/bb264564.aspx
|||yes, perfect. Thanks.
No doubt I over think these things.
While I appreciate the ease of use, I also like knowing what's going on, so the documentation is there, of course, but in such great volume one questions the point of reading massive amounts of documentation on an easy to use feature. ;-) I digress...thanks again.