Sunday, March 25, 2012
create systemtables?
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?
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
>
Wednesday, March 7, 2012
Create My Own Log (for functionality)
How do I generate a myfunctionality.log with these lines?
Thanks,
LiliHi,
The best way to add Own Log functionality , is to create a log table and use insert statement to log message instead of print. The advantage will be that log will be available for future reference whereas filelog will be over written every time you run package.
best of luck
Saturday, February 25, 2012
Create indexes - own File Group
about indexes; an area I neglected.
I see I can specify which filegroup I wish to create an index, which
the default is Primary.
I have more than one drive in my SQL server where I put data and logs
on their own logical raid groups.
My databases are SIMPLE, so they dont use much, if any logs (none as I
understand).
I was thinking of adding an additional file to my database and use it
solely for the indexes.
Any thoughts?
SQL Server 2005 Enterprise x64 SP2
8 disk SAS Raid 1+0 w/ 512mb ram w/ battery backup.
Thanks,
Rob
"rcamarda" <robert.a.camarda@.gmail.comwrote in message
news:1173725223.934126.197140@.30g2000cwc.googlegro ups.com...
Quote:
Originally Posted by
With help of others on this group, I've been learning and researching
about indexes; an area I neglected.
I see I can specify which filegroup I wish to create an index, which
the default is Primary.
I have more than one drive in my SQL server where I put data and logs
on their own logical raid groups.
My databases are SIMPLE, so they dont use much, if any logs (none as I
understand).
I was thinking of adding an additional file to my database and use it
solely for the indexes.
Any thoughts?
>
Yes, I've done this and putting your non-clustered indexes in its own group
can provide an improvement. Especially for rebuilds and the like.
HOWEVER, your database most definitely DOES use the logs. SIMPLE simply
means that as soon as transactions are complete, the log is truncated so it
won't grow. But it is definitely being used.
Keep in mind that w/o logs, you seriously hamper your disaster recovery
options. Since you're running SQL Server Enterprise, that makes me suspect
this is more than just a little test site.
Quote:
Originally Posted by
SQL Server 2005 Enterprise x64 SP2
8 disk SAS Raid 1+0 w/ 512mb ram w/ battery backup.
Thanks,
Rob
>
--
Greg Moore
SQL Server DBA Consulting
Email: sql (at) greenms.com http://www.greenms.com|||Greg,
Its a data warehouse. I have tools that could rebuild an empty
database pretty quickly (few hours) and I have daily backups. Builds
take about 2 hours, then its read only the rest of the day.
I use enterprise because of our licensing.
Thanks for the info!
Quote:
Originally Posted by
>
Yes, I've done this and putting your non-clustered indexes in its own group
can provide an improvement. Especially for rebuilds and the like.
>
HOWEVER, your database most definitely DOES use the logs. SIMPLE simply
means that as soon as transactions are complete, the log is truncated so it
won't grow. But it is definitely being used.
>
Keep in mind that w/o logs, you seriously hamper your disaster recovery
options. Since you're running SQL Server Enterprise, that makes me suspect
this is more than just a little test site.
>
Quote:
Originally Posted by
SQL Server 2005 Enterprise x64 SP2
8 disk SAS Raid 1+0 w/ 512mb ram w/ battery backup.
Thanks,
Rob
>
--
Greg Moore
SQL Server DBA Consulting
Email: sql (at) greenms.com http://www.greenms.com
Friday, February 17, 2012
create database statement
a database WITHOUT entering your own parameter for "file name".
You can do a simple "create database somename" and it will create the
database with the defaulted "file name" to be where SQL Server is installed
(location of the mdf and ldf). Does SQL Server take the default location
from the model or master databases or some file group setting?
Thanks in advance
I believe it defaults to the location of model. You can change this in EM
by right-clicking on your server and changing the defaults in the server
properties dialog, or by modifying the registry directly. The defaults are
stored at HKLM\Software\Microsoft\MSSQLServer\MSSQLServer. Two keys:
DefaultData and DefaultLog, which should both be REG_SZ. Note that if you
haven't previously modified this setting in EM, the keys will not yet exist.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
"Homer" <Homer@.discussions.microsoft.com> wrote in message
news:66B065D1-287D-485E-B3C5-425852D83EFE@.microsoft.com...
> Where does the SQL Server default the "file name" parameter when you
> create
> a database WITHOUT entering your own parameter for "file name".
> You can do a simple "create database somename" and it will create the
> database with the defaulted "file name" to be where SQL Server is
> installed
> (location of the mdf and ldf). Does SQL Server take the default location
> from the model or master databases or some file group setting?
> Thanks in advance
|||The following article should explain the New Database default locations.
Basically though these values are stored in the registry for each SQL server
instance.
http://www.wardyit.com/blog/blog/arc.../11/10/58.aspx
- Peter Ward
WARDY IT Solutions
"Homer" wrote:
> Where does the SQL Server default the "file name" parameter when you create
> a database WITHOUT entering your own parameter for "file name".
> You can do a simple "create database somename" and it will create the
> database with the defaulted "file name" to be where SQL Server is installed
> (location of the mdf and ldf). Does SQL Server take the default location
> from the model or master databases or some file group setting?
> Thanks in advance
create database statement
a database WITHOUT entering your own parameter for "file name".
You can do a simple "create database somename" and it will create the
database with the defaulted "file name" to be where SQL Server is installed
(location of the mdf and ldf). Does SQL Server take the default location
from the model or master databases or some file group setting?
Thanks in advanceI believe it defaults to the location of model. You can change this in EM
by right-clicking on your server and changing the defaults in the server
properties dialog, or by modifying the registry directly. The defaults are
stored at HKLM\Software\Microsoft\MSSQLServer\MSSQ
LServer. Two keys:
DefaultData and DefaultLog, which should both be REG_SZ. Note that if you
haven't previously modified this setting in EM, the keys will not yet exist.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Homer" <Homer@.discussions.microsoft.com> wrote in message
news:66B065D1-287D-485E-B3C5-425852D83EFE@.microsoft.com...
> Where does the SQL Server default the "file name" parameter when you
> create
> a database WITHOUT entering your own parameter for "file name".
> You can do a simple "create database somename" and it will create the
> database with the defaulted "file name" to be where SQL Server is
> installed
> (location of the mdf and ldf). Does SQL Server take the default location
> from the model or master databases or some file group setting?
> Thanks in advance|||The following article should explain the New Database default locations.
Basically though these values are stored in the registry for each SQL server
instance.
http://www.wardyit.com/blog/blog/ar...5/11/10/58.aspx
- Peter Ward
WARDY IT Solutions
"Homer" wrote:
> Where does the SQL Server default the "file name" parameter when you cre
ate
> a database WITHOUT entering your own parameter for "file name".
> You can do a simple "create database somename" and it will create the
> database with the defaulted "file name" to be where SQL Server is installe
d
> (location of the mdf and ldf). Does SQL Server take the default location
> from the model or master databases or some file group setting?
> Thanks in advance
create database statement
a database WITHOUT entering your own parameter for "file name".
You can do a simple "create database somename" and it will create the
database with the defaulted "file name" to be where SQL Server is installed
(location of the mdf and ldf). Does SQL Server take the default location
from the model or master databases or some file group setting?
Thanks in advanceI believe it defaults to the location of model. You can change this in EM
by right-clicking on your server and changing the defaults in the server
properties dialog, or by modifying the registry directly. The defaults are
stored at HKLM\Software\Microsoft\MSSQLServer\MSSQLServer. Two keys:
DefaultData and DefaultLog, which should both be REG_SZ. Note that if you
haven't previously modified this setting in EM, the keys will not yet exist.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Homer" <Homer@.discussions.microsoft.com> wrote in message
news:66B065D1-287D-485E-B3C5-425852D83EFE@.microsoft.com...
> Where does the SQL Server default the "file name" parameter when you
> create
> a database WITHOUT entering your own parameter for "file name".
> You can do a simple "create database somename" and it will create the
> database with the defaulted "file name" to be where SQL Server is
> installed
> (location of the mdf and ldf). Does SQL Server take the default location
> from the model or master databases or some file group setting?
> Thanks in advance|||The following article should explain the New Database default locations.
Basically though these values are stored in the registry for each SQL server
instance.
http://www.wardyit.com/blog/blog/archive/2005/11/10/58.aspx
- Peter Ward
WARDY IT Solutions
"Homer" wrote:
> Where does the SQL Server default the "file name" parameter when you create
> a database WITHOUT entering your own parameter for "file name".
> You can do a simple "create database somename" and it will create the
> database with the defaulted "file name" to be where SQL Server is installed
> (location of the mdf and ldf). Does SQL Server take the default location
> from the model or master databases or some file group setting?
> Thanks in advance