Showing posts with label regular. Show all posts
Showing posts with label regular. Show all posts

Sunday, March 25, 2012

create systemtables?

Is there any way to create a systemtable?
I need to hide a table of my own from regular users. This table is not
temporary.
Kind regards,
Costi StanFor SQL Server 2000, It won't necessarily keep users from
being able to find out the table exists. You could use an
undocumented, unsupported method using the system stored
procedure sp_MS_marksystemobject. Not sure why you would as
you could also just create a table with a name that has no
meaning to the users and prevent access using built in
security methods. But something like:
CREATE TABLE UserSystem
(SomeID int primary key not null,
SomeCol varchar(25))
GO
EXEC sp_MS_marksystemobject 'UserSystem'
GO
-Sue
On Tue, 29 Aug 2006 17:24:28 +0300, "Costi Stan"
<stancosti@.yahoo.com> wrote:
>Is there any way to create a systemtable?
>I need to hide a table of my own from regular users. This table is not
>temporary.
>Kind regards,
>Costi Stan
>

create systemtables?

Is there any way to create a systemtable?
I need to hide a table of my own from regular users. This table is not
temporary.
Kind regards,
Costi StanFor SQL Server 2000, It won't necessarily keep users from
being able to find out the table exists. You could use an
undocumented, unsupported method using the system stored
procedure sp_MS_marksystemobject. Not sure why you would as
you could also just create a table with a name that has no
meaning to the users and prevent access using built in
security methods. But something like:
CREATE TABLE UserSystem
(SomeID int primary key not null,
SomeCol varchar(25))
GO
EXEC sp_MS_marksystemobject 'UserSystem'
GO
-Sue
On Tue, 29 Aug 2006 17:24:28 +0300, "Costi Stan"
<stancosti@.yahoo.com> wrote:

>Is there any way to create a systemtable?
>I need to hide a table of my own from regular users. This table is not
>temporary.
>Kind regards,
>Costi Stan
>

Friday, February 24, 2012

CREATE FILE access denied

I get this error message when trying to create a database. This happens from
the Management Studio, from regular queries, etc. No other posts seem to
resolve this problem exactly that I can find. Thanks for any insight into
this problem...
USE MASTER
CREATE DATABASE XYZ
ON (Name = XYZ_data, FILENAME='C:\\XYZ_data.mdf')
LOG ON (Name = XYZ_log, FILENAME='C:\\XYZ_log.ldf')
Error message:
Msg 1802, Level 16, State 4, Line 2
CREATE DATABASE failed. Some file names listed could not be created. Check
related errors.
Msg 5123, Level 16, State 1, Line 2
CREATE FILE encountered operating system error 5(Access is denied.) while
attempting to open or create the physical file 'c:\XYZ_data.mdf'.
Hi
Check that the account that SQL Server runs under has file system
permissions on c:\
OS Error 5 = access denied.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"XCode247" <XCode247@.discussions.microsoft.com> wrote in message
news:7DE6CBB0-087A-4CD2-9B45-AEAE45532C06@.microsoft.com...
>I get this error message when trying to create a database. This happens
>from
> the Management Studio, from regular queries, etc. No other posts seem to
> resolve this problem exactly that I can find. Thanks for any insight into
> this problem...
> USE MASTER
> CREATE DATABASE XYZ
> ON (Name = XYZ_data, FILENAME='C:\\XYZ_data.mdf')
> LOG ON (Name = XYZ_log, FILENAME='C:\\XYZ_log.ldf')
> Error message:
> Msg 1802, Level 16, State 4, Line 2
> CREATE DATABASE failed. Some file names listed could not be created. Check
> related errors.
> Msg 5123, Level 16, State 1, Line 2
> CREATE FILE encountered operating system error 5(Access is denied.) while
> attempting to open or create the physical file 'c:\XYZ_data.mdf'.
>
|||Yes, sure enough...
In Configuration Manager, Service properties. The 'Log on as' account was
'Network Service'. The help button from that page says a 'domain user account
with minimal rights' is recommended. Changing the account causes it to work.

CREATE FILE access denied

I get this error message when trying to create a database. This happens from
the Management Studio, from regular queries, etc. No other posts seem to
resolve this problem exactly that I can find. Thanks for any insight into
this problem...
USE MASTER
CREATE DATABASE XYZ
ON (Name = XYZ_data, FILENAME='C:\\XYZ_data.mdf')
LOG ON (Name = XYZ_log, FILENAME='C:\\XYZ_log.ldf')
Error message:
Msg 1802, Level 16, State 4, Line 2
CREATE DATABASE failed. Some file names listed could not be created. Check
related errors.
Msg 5123, Level 16, State 1, Line 2
CREATE FILE encountered operating system error 5(Access is denied.) while
attempting to open or create the physical file 'c:\XYZ_data.mdf'.Hi
Check that the account that SQL Server runs under has file system
permissions on c:\
OS Error 5 = access denied.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"XCode247" <XCode247@.discussions.microsoft.com> wrote in message
news:7DE6CBB0-087A-4CD2-9B45-AEAE45532C06@.microsoft.com...
>I get this error message when trying to create a database. This happens
>from
> the Management Studio, from regular queries, etc. No other posts seem to
> resolve this problem exactly that I can find. Thanks for any insight into
> this problem...
> USE MASTER
> CREATE DATABASE XYZ
> ON (Name = XYZ_data, FILENAME='C:\\XYZ_data.mdf')
> LOG ON (Name = XYZ_log, FILENAME='C:\\XYZ_log.ldf')
> Error message:
> Msg 1802, Level 16, State 4, Line 2
> CREATE DATABASE failed. Some file names listed could not be created. Check
> related errors.
> Msg 5123, Level 16, State 1, Line 2
> CREATE FILE encountered operating system error 5(Access is denied.) while
> attempting to open or create the physical file 'c:\XYZ_data.mdf'.
>|||Yes, sure enough...
In Configuration Manager, Service properties. The 'Log on as' account was
'Network Service'. The help button from that page says a 'domain user account
with minimal rights' is recommended. Changing the account causes it to work.

CREATE FILE access denied

I get this error message when trying to create a database. This happens from
the Management Studio, from regular queries, etc. No other posts seem to
resolve this problem exactly that I can find. Thanks for any insight into
this problem...
USE MASTER
CREATE DATABASE XYZ
ON (Name = XYZ_data, FILENAME='C:\\XYZ_data.mdf')
LOG ON (Name = XYZ_log, FILENAME='C:\\XYZ_log.ldf')
Error message:
Msg 1802, Level 16, State 4, Line 2
CREATE DATABASE failed. Some file names listed could not be created. Check
related errors.
Msg 5123, Level 16, State 1, Line 2
CREATE FILE encountered operating system error 5(Access is denied.) while
attempting to open or create the physical file 'c:\XYZ_data.mdf'.Hi
Check that the account that SQL Server runs under has file system
permissions on c:\
OS Error 5 = access denied.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"XCode247" <XCode247@.discussions.microsoft.com> wrote in message
news:7DE6CBB0-087A-4CD2-9B45-AEAE45532C06@.microsoft.com...
>I get this error message when trying to create a database. This happens
>from
> the Management Studio, from regular queries, etc. No other posts seem to
> resolve this problem exactly that I can find. Thanks for any insight into
> this problem...
> USE MASTER
> CREATE DATABASE XYZ
> ON (Name = XYZ_data, FILENAME='C:\\XYZ_data.mdf')
> LOG ON (Name = XYZ_log, FILENAME='C:\\XYZ_log.ldf')
> Error message:
> Msg 1802, Level 16, State 4, Line 2
> CREATE DATABASE failed. Some file names listed could not be created. Check
> related errors.
> Msg 5123, Level 16, State 1, Line 2
> CREATE FILE encountered operating system error 5(Access is denied.) while
> attempting to open or create the physical file 'c:\XYZ_data.mdf'.
>|||Yes, sure enough...
In Configuration Manager, Service properties. The 'Log on as' account was
'Network Service'. The help button from that page says a 'domain user accoun
t
with minimal rights' is recommended. Changing the account causes it to work.

Create Extended Procedures in VS 2005

Hi

I am trying to write an extended procedure that accepts a string parameter and returns an integer value. The extended procedure calls a regular stored procedure of a database passing the string parameter as an input. The int value is an OUT parameter to this procedure.

Can I some one suggest where do I get started with respect to this in VS 2005.Why do you want to write an extended stored procedure to call a TSQL SP? This is overkill actually. Extended SPs are meant for computation intensive operations or other logic that cannot be performed efficiently using TSQL. It has it's limitations, performance, reliability and security issues. Or you trying to just learn extended SP programming? If later you can look at the SQL Server samples. You can also look at ODBC/OLEDB samples that will show you how to call SPs.|||The thing is that we need to make DML changes while calling a function. Since normal UDFs dont allow to do it I am trying to call an xp. Since we also need to look at concurrency I am having a stored procedure with transactions taken care. Hence the need of calling T_SQL sp from xp.|||Where do I look for the Extended Stored Procedure DLL Wizard while I open VS 2005 --> Open Project.

I do not see any such wizrd name.

Regards
Imtiaz|||

Use of side-effecting code from UDF is not recommended. It takes lot of work to get it right (dealing with bound connections, concurrency issues, deadlocks, scalability of xps, virtual memory issues depending on how the xp is written etc). Lastly, use of such UDFs in SELECT statement can cause unexpected behavior.