|
Could you please give me some website that can help me while migrating SQL to Oracle?
|
|
|
|
|
Oracle has a tool to migrate from SQL Server, I read about it in otn.oracle.com[^], but can't find the link.
Do some search in there.
Free your mind...
|
|
|
|
|
|
Do in-memory database systems such as Prevayler or commercial products have a user-specifiable number N, such that if the system uses more than N bytes of RAM, the system will use virtual memory? That way the database system would use the operating system's virtual memory smarts for managing what goes on disk and what goes in memory, while providing the ability to have a larger database than just what will fit in available RAM.
|
|
|
|
|
I'd expect that such products (at least Bamboo Prevalence) will use virtual memory when necessary, as Windows may allocate more memory than the RAM available when an application asks for it.
As for setting the limit for when virtual memory will be used, Bamboo Prevalence does not expose such a setting. Maybe the OS will let you set such limits...!?!?
Have a look at my latest article about Object Prevalence with Bamboo Prevalence.
|
|
|
|
|
I'm wondering if it's possible to stop a SQL database from running, from within a DTS package? It's essential that the SQL Agent keeps running on the machine however.
Thanks for any info
Look at the world about you and trust to your own convictions. - Ansel Adams
Meg's World - Blog
Photography - The product of my passion
|
|
|
|
|
Hmm. I've never even tried running the SQL Agent without the server itself, but it will probably work.
If all you need is to make the database unavailable, you can do it in a few ways without actually shutting down the server. You could call sp_detach_db. Even better, you could deny access to everyone but sysadmin; this would leave existing permissions untouched for when you need to reverse the change.
Regards,
Jeff Varszegi
|
|
|
|
|
Hi Jeff,
Thanks for the reply. I'm trying to automate this[^] using DTS packages. As you will see, after running the first sp it is necessary to stop the database, and then start it again. I believe that if I stop the database without stopping the SQL agent DTS will still be running so that it can call the next package to start the database again. This is what I've been told, but as I'm pretty new to DTS I could be totally wrong .
Thanks again.
Look at the world about you and trust to your own convictions. - Ansel Adams
Meg's World - Blog
Photography - The product of my passion
|
|
|
|
|
So you're not trying to stop SQL Server, just the database, right? Is that the same thing as bringing it offline? I found this in Books Online:
ALTER DATABASE database
{ ADD FILE < filespec > [ ,...n ] [ TO FILEGROUP filegroup_name ]
| ADD LOG FILE < filespec > [ ,...n ]
| REMOVE FILE logical_file_name
| ADD FILEGROUP filegroup_name
| REMOVE FILEGROUP filegroup_name
| MODIFY FILE < filespec >
| MODIFY NAME = new_dbname
| MODIFY FILEGROUP filegroup_name {filegroup_property | NAME = new_filegroup_name }
| SET < optionspec > [ ,...n ] [ WITH < termination > ]
| COLLATE < collation_name >
}
<nobr>< filespec > ::= ( NAME = logical_file_name
[ , NEWNAME = new_logical_name ]
[ , FILENAME = 'os_file_name' ]
[ , SIZE = size ]
[ , MAXSIZE = { max_size | UNLIMITED } ]
[ , FILEGROWTH = growth_increment ] )
<nobr>< optionspec > ::= < state_option >
| < cursor_option >
| < auto_option >
| < sql_option >
| < recovery_option >
< state_option > ::=
{ SINGLE_USER | RESTRICTED_USER | MULTI_USER }
| { OFFLINE | ONLINE }
| { READ_ONLY | READ_WRITE }
< termination > ::=
ROLLBACK AFTER integer [ SECONDS ]
| ROLLBACK IMMEDIATE
| NO_WAIT
< cursor_option > ::=
CURSOR_CLOSE_ON_COMMIT { ON | OFF }
| CURSOR_DEFAULT { LOCAL | GLOBAL }
< auto_option > ::=
AUTO_CLOSE { ON | OFF }
| AUTO_CREATE_STATISTICS { ON | OFF }
| AUTO_SHRINK { ON | OFF }
| AUTO_UPDATE_STATISTICS { ON | OFF }
< sql_option > ::=
ANSI_NULL_DEFAULT { ON | OFF }
| ANSI_NULLS { ON | OFF }
| ANSI_PADDING { ON | OFF }
| ANSI_WARNINGS { ON | OFF }
| ARITHABORT { ON | OFF }
| CONCAT_NULL_YIELDS_NULL { ON | OFF }
| NUMERIC_ROUNDABORT { ON | OFF }
| QUOTED_IDENTIFIER { ON | OFF }
| RECURSIVE_TRIGGERS { ON | OFF }
< recovery_option > ::=
RECOVERY { FULL | BULK_LOGGED | SIMPLE }
| TORN_PAGE_DETECTION { ON | OFF }
HTH!
Jeff Varszegi
|
|
|
|
|
Have you tried the 'Execute Process Task' in DTS ? You might be able to use it to execute net stop MSSQLSERVER and later net start MSSQLSERVER to start it up again.
Searching the web without Google is like straining sewage with your teeth. Userfriendly, 2003/06/07
|
|
|
|
|
I am having one column whose datatype is datetime .
so how to set null values in that column ?
when I am passing null values its throwing some error as it is getting initialised to'01/01001'
can anyone help me out?
thanks
|
|
|
|
|
You don't say what your data access library is.
If you're using classic ADO editing a Recordset, just set the value to Null. This also applies to calling a stored procedure or substituting parameters in command text: set the appropriate Parameter to Null. From C++, you would use a variant with the vt member set to VT_NULL .
If you're editing a DataTable with ADO.NET, you can use the DataRow object's SetNull method, or you can assign the appropriate column DBNull.Value .
|
|
|
|
|
hi ,
thanks for a prompt reply.
I am editing a DataTable ,In that datatable I am having one datacolumn of datatype Datetime .so when I am setting the value DBNull.Value it's throwing null exception.
I have tried with setnull method of datarow also but that method is not accessible.
can you please help me out ?
|
|
|
|
|
I am trying to connect my vb.net program to MS Access but nothing seems to be going ok.
Whenever I declare my connection object, I get this kind of an error
An unhandled exception of type 'System.Security.SecurityException' occurred in system.windows.forms.dll
here is the code :
This is at the very top
-------------------------
Imports System
Imports System.Data
Imports System.Data.OleDb
--------------------------
Dim cnn As OleDbConnection = New OleDbConnection()
Dim strConnectionString As String
Dim strApp_Path As String
strApp_Path = System.IO.Directory.GetCurrentDirectory()
strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strApp_Path & "\PIB Hiring System.mdb"
cnn.ConnectionString = strConnectionString
cnn.Open()
my database is currently lying in the bin folder.
The problem is it does not seem to like it when I declare my connection. Do I have to add anything to my project.
Someone please help me!!!
|
|
|
|
|
Edza,
not sure, as I'd do it differently in C# ( using:
OleDbConnection = new OleDBConnection(StrConnectionString)
isntead, but have you tried leaving out the "..\", so you get:
strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='..\PIB Hiring System.mdb'"
Alternatively, drop the "\", and put the MDB in the RELEASE or DEBUG folder (depending obviously on which you are using).
strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='PIB Hiring System.mdb'"
regards,
Pauwl
Pauwl
|
|
|
|
|
I don't think it is related to the database. You're getting a SecurityException .
You're probably trying to run this code from the network. Currently, the database access code requires Full Trust before it will run, which will only occur if running from the local machine.
Copy your project to a local hard disk and try again.
|
|
|
|
|
What you are saying is 100 percent correct, because whenever I open my VB.NET framewok it gives me this kind of an error:
"The project location is not fully trusted by the VB.NET runtime. This is either it is a network share or mapped to a network share not on the local machine. If the output path is under the project location your code will not execute as fully trusted and you may receive unexpected security exceptions. Click Ok to ignore and continue. Click cancel to choose a different project location."
It runs like a dream from my local disk, just as you said.
Thank you Mike, I never thought this error was the cause of all my nightmares. Thank you again mike, you saved 90% of my time.
|
|
|
|
|
Hi all,
I know most people want it the other way around.
The application I am developing uses the data that is on an SQL server. However, most of my clients are mobile and do not always have access to that server from outside for security reasons. Basically, what I want to do is have them go to my ASP.NET page and have the option to have the database exported as an access database so that they can use it when they are mobile. Most of them do not have an SQL server installation on their laptops and will never have it. The company provides them with the laptops and they do not have the rights to install anything. I would go for MSDE, but there is no way they will agree to this. It is all too damn beaureucratic! So MS Access is the only option.
So, my question is that is it possible to convert a SQL server database to Access (only the tables and constraints..no views or stored procedure). Is it possible to do it through some custom stored procedure. Any help would be greatly appreciated.
Sincerely,
pankaj
Without struggle, there is no progress
|
|
|
|
|
I'm trying to do the following:
SELECT COUNT(*) FROM table WHERE xyz="a"
and am using ExecuteScalar to do it. This works like a dream for all results >0.
When the resulting set has ZERO entries, an exception is thrown. I would have expected the result from ExecuteScalar to just=0. Instead, the Exception is thrown.
I have 2 problems with this:
1) I don't understand why an exception is being thrown.
2) I can't catch the exact exception (as listed in the documentation), so am just catching them all, but doing nothing smart with it. If anything else goes wrong- I'll never know..
Any ideas what I'm doing wrong?
Pauwl
|
|
|
|
|
Can you post some code? I tried to recreate this and had no problem w/ ExecuteScalar returning 0.
|
|
|
|
|
jeff_martin wrote:
Can you post some code?
Jeff, here it is.
I'm connecting to an MDB. Other connections (SELECT and UPDATE) all work fine.
The funny thing is, when I run it in MS-Access, it comes up with no COUNT row.
If I run it for some other SITENAME, it works fine...
If I do it without the TRY/CATCH, it will bomb out when there should be ZERO as a result.
NOTE: There are NO records in the table that match SITENAME='OFFICE'
================code start====================
Int32 founditems=0;
OleDbConnection conn = new OleDbConnection(s_db_connectionstring);
string counter = "SELECT Count(*) FROM Servers WHERE ((Sitename)='OFFICE')) GROUP BY Servername,SiteName ORDER BY Servername,Sitename;";
OleDbCommand cmd = new OleDbCommand(counter,conn);
try
{
founditems = (Int32) cmd.ExecuteScalar();
}
catch(System.Exception e1)
{
founditems=0;
}
================code end====================
Pauwl
|
|
|
|
|
The code looks fine, what is the error message when it bombs out? Perhaps this is a problem with Access? I tested on SQL Server and had no problem. Can you tell us the error message? Maybe that will help.
|
|
|
|
|
jeff_martin wrote:
The code looks fine, what is the error message when it bombs out? Perhaps this is a problem with Access? I tested on SQL Server and had no problem. Can you tell us the error message? Maybe that will help.
Here it is:
++++++++++
An unhandled exception of type 'System.NullReferenceException' occurred in Application.exe
Additional information: Object reference not set to an instance of an object.
++++++++++
Any ideas? The only way left as far as I can see is to catch this error, and set the variable to zero.
Pauwl
|
|
|
|
|
I really don't understand why you are getting that, unless it is some sort of Access problem that doesn't return 0 on counts. If you are worried about other exceptions getting through, you can have multiple catch blocks
Int32 founditems=0;
OleDbConnection conn = new OleDbConnection(s_db_connectionstring);
string counter = "SELECT Count(*) FROM Servers WHERE ((Sitename)='OFFICE')) GROUP BY Servername,SiteName ORDER BY Servername,Sitename;";
OleDbCommand cmd = new OleDbCommand(counter,conn);
try
{
founditems = (Int32) cmd.ExecuteScalar();
}
catch(System.NullReferenceException e1)
{
founditems=0;
}
catch (System.Exception e1)
{
//report other exceptions
}
|
|
|
|
|
Jeff,
thanks. I'll go for that. Didn't really want to though, as I don't like using exceptions for known states, but as that seems to be the only solution...
I don't think I'll spend more time on it know, but if I do find a solution, I'll post it.
thanks again.
Pauwl
|
|
|
|