|
Honestly, something that convoluted, I would just query the table and figure out the sets in my app side code. You're more than likely going to have to loop through the records, and I'd rather do that in code than with SQL Cursors.
|
|
|
|
|
Yeah, that is what I ended up doing. I am not a big fan of SQL
Thanks,
Pankaj
Without struggle, there is no progress
|
|
|
|
|
ListObjectPermissions
what does the above mention statement do??
can i use this to get the access permissions of a user?
ranjani
|
|
|
|
|
ListUserPermissions
what does this method do..
does this tell me the user access perm for a particular database?
ranjani
|
|
|
|
|
Ranjani,
You post messages pretty often. Why don't you sign up as a user? Just wondering.
Basically, the way SQL Server permissions go, you have permissions as the result of being a member of a Windows group or role, right? (When I speak of permissions, I also mean that you can be denied access to something.) Then on top of these group-related permissions, you can be explicitly granted or denied extra permissions. These are usually granted/denied/revoked using the GRANT , REVOKE , and DENY statements in Transact-SQL, since most admin types use Transact-SQL to script this stuff up.
The ListUserPermissions method lists the permissions of the second type: special added-on permissions granted specially for a specific user. It won't include permissions that a user has through inclusion in a role, for instance, so be careful.
Also, you should realize that the Permission object can represent the fact that a user is denied access to something-- check out the Granted property.
Hope this helps.
Regards,
Jeff Varszegi
|
|
|
|
|
HI ,
I have made a procedure for sql server with visual c++ and i have test it on my computer and it is well but when i have move it to the server it could not work and it give me the following error
ODBC: Msg 0, Level 16, State 1
Cannot load the DLL sim.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.).
can any body help me
|
|
|
|
|
You've probably used some run-time library that you have on your computer but isn't on the server.
To check dependencies for a DLL, get hold of Dependency Walker[^].
If you have built a Debug build of your DLL, I recommend building a Release build and testing that on your computer before deploying that to the server.
|
|
|
|
|
I have build the release one and tested it on my local computer and it is working , and for information i did not use any external library just the standered one , and i still have the problem
|
|
|
|
|
If your DLL was built using Visual C++ .NET 2002 or 2003, and you opted to use the multithreaded DLL version of the C runtime library, there's a new version that may not be on the server.
For 2002, you need msvcr70.dll; for 2003 it's msvcr71.dll.
If you've used any C++ standard library features (for example, iostreams) you might also need msvcp7x.dll. If you used 'old' iostreams (declared in <iostream.h> rather than <iostream> ) you'll also need msvci7x.dll.
Even if you only used Visual C++ 6.0 to compile, the server might not have all the required C runtime DLLs, although this is less likely. Windows NT 4.0 did not originally ship with msvcrt.dll version 6.0, but it's included with SQL Server 2000.
I still recommend using Dependency Walker to view the actual DLLs required by your DLL. Using it on the server will show what's missing.
The other possibilities I can think of are that you've specified the wrong DLL name - although I would expect that you'd noticed this - or that the DLL is in the wrong directory. You may be able to specify a full path - I haven't tried this.
|
|
|
|
|
Thaks for your help i have copy the msvcrt71.dll file to the server and it works .
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
Is it possible to script a dts package the way one can script an sp? I was thinking that running the script through query analyser might help me discover exacly where the package is failing in copying the larger of our 3 db's to our disaster recovery server, but I haven't managed to find an option (other than saving as a VB file).
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
|
|
|
|
|
Hi,
I've the following requirements:
1) Allow users to edit columns 2 & 3 of a DataGrid.
2) Prevent users from adding rows.
I can solve (1) by checking the event of moving cells, and then doing the following:
---------------------------------------------------------------
if (this.DataGrid1.CurrentCell.Columnnumber==0)
this.DataGrid1.ReadOnly=true;
else
this.DataGrid1.ReadOnly=false;
---------------------------------------------------------------
This works really neatly. I can't figure out how to solve problem (2) though.
Any ideas?
Pauwl
|
|
|
|
|
IIRC, it's a property on the underlying DataView: AllowNew.
|
|
|
|
|
Mike Dimmick wrote:
IIRC, it's a property on the underlying DataView: AllowNew.
Thanks Mike, this does the trick.
I somehow need to set this each time the control becomes active, but still, it works nicely.
thanks,
Pauwl
Pauwl
|
|
|
|
|
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
|
|
|
|