Replication System Stored Procedures Parameter Defaults ?
Oct 27, 2005Hi there
View 5 RepliesHi there
View 5 Replieshow to implement the replication with the System Stored Procedures or the Transact-SQL ?
i want to encapsula my replication and make it be reusable and ease to use.So i want to do the replication in a script file.how can i do this?
Thanks.
Using SQL 2005, SP2. All of a sudden, whenever I create any stored procedures in the master database, they get created as system stored procedures. Doesn't matter what I name them, and what they do.
For example, even this simple little guy:
CREATE PROCEDURE BOB
AS
PRINT 'BOB'
GO
Gets created as a system stored procedure.
Any ideas what would cause that and/or how to fix it?
Thanks,
Jason
Greetings:
I have MSSQL 2005. On earlier versions of MSSQL saving a stored procedure wasn't a confusing action. However, every time I try to save my completed stored procedure (parsed successfully ) I'm prompted to save it as a query on the hard drive.
How do I cause the 'Save' action to add the new stored procedure to my database's list of stored procedures?
Thanks!
We recently upgraded to SQL Server 2005. We had several stored procedures in the master database and, rather than completely rewriting a lot of code, we just recreated these stored procedures in the new master database.
For some reason, some of these stored procedures are getting stored as "System Stored Procedures" rather than just as "Stored Procedures". Queries to sys.Objects and sys.Procedures shows that these procs are being saved with the is_ms_shipped field set to 1, even though they obviously were not shipped with the product.
I can't update the sys.Objects or sys.Procedures views in 2005.
What effect will this flag (is_ms_shipped = 1) have on my stored procedures?
Can I move these out of "System Stored Procedures" and into "Stored Procedures"?
Thanks!
About a year ago we inherited a SQL server (7.0) from another division of our company. The time has come to migrate the SQL Server functionality onto a new machine. Before I do this though, I need to figure out what the initial installation configuration was so I can set up the new server with the same specs. I am looking for a system stored procedure(s) that can tell me the following:
Case sensitivity, accent sensitivity, SQL build (SP), character set, etc. Basically I need to know what checkboxes were ticked during the initial set up of the server.
Any help would be greatly appreciated. TIA.
So every database i created has no system stored procedures. I didn't know how that could happen as I am not the person who installed sql2000. What should I do to get all the system stored procedures back?
TIA
I am trying to edit a system stored(sp_add_dtspackage) procedure and cannot for the life of me find where to edit. This procedure does a check to keep users from saving changes to a package they do not own. I need users to be able to change the the packages when they are not always the one who created.
View 2 Replies View RelatedI have a SQL Server installation that is missing the stored procedures used for mail (xp_startmail, xp_stopmail, etc.). Is there a way that I can put these on the server without having to reinstall SQL? I tried to generate them from other servers but SQL won't allow you to do this with these particular stored procedures.
View 1 Replies View RelatedWhen I create a new database, the system stored procedures are missing;
dt_addtosourcecontrol_u
dt_checkinobject_u
etc.
I'm logged in as sa.
I need to create a stored procedure in the master database (yes, I know it's not that good of an idea). I'm working with SQL 2K5, SP2 Whenever I create it, it is marked as a system stored procedure no matter what I name it, what schema I put it in, or what user I use to create it (sysadmin or minimal permissions).
As soon as I create it, if I do any of the following, I can see it to be a system stored procedure and not a regular user sp.
1) SELECT * FROM sys.objects where is_ms_shipped = 1
2) SELECT * FROM sys.procedures where is_ms_shipped = 1
3) Looking in SSMS... There is a special folder for system stored procedures in SSMS, and mine is in there.
At least in my case, the only thing it hurts is that you have to be a sysadmin to execute that stored procedure (and I need to have a non sysadmin be able to execute it). Other than that, it executes normally when run by a sysadmin.
Any suggestions on why this is happening? It's only happening on 1 out of about 80 SQL servers we have.
I tried this morning to check some of the system stored procedures and ran into trouble. Only four of them executed: sp_alterdiagram, sp_creatediagram, sp_dropdiagram and sp_helpdiagramdefinition. I could not check all the rest, I did it selectively. The typical error message was: Invalid object on RETURN statement. Some had syntactical errors.
sp_ActiveDirectory_Obj
Invalid object name 'sys.sp_ActiveDirectory_SCP' Line 171
sp_ActiveDirectory_SCP
Invalid object name 'sys.sp_ActiveDirectory_SCP' Line 171
sp_ActiveDirectory_Start
Invalid object name 'sys.sp_ActiveDirectory_Start' Line 19
Invalid object name 'sys.sp_add_agent_parameter' Line 60
Invalid object name 'sys.sp_add_agent_profile' Line 123
Invalid object name 'sys.sp_add_data_file_recover_suspect_db' Line 17
sp_addalias
Msg 102, Level 15, State 1, Procedure sp_addalias, Line 44
Incorrect syntax near '%'.
Msg 195, Level 15, State 10, Procedure sp_addalias, Line 64
'get_sid' is not a recognized built-in function name.
Msg 102, Level 15, State 1, Procedure sp_addalias, Line 78
Incorrect syntax near '%'.
Msg 102, Level 15, State 1, Procedure sp_addalias, Line 119
Incorrect syntax near '%'.
sp_bindefault
Msg 102, Level 15, State 1, Procedure sp_bindefault, Line 95
Incorrect syntax near '%'.
Msg 102, Level 15, State 1, Procedure sp_bindefault, Line 134
Incorrect syntax near '%'.
Msg 102, Level 15, State 1, Procedure sp_bindefault, Line 182
Incorrect syntax near '%'.
Msg 102, Level 15, State 1, Procedure sp_bindefault, Line 208
Incorrect syntax near '%'.
Msg 102, Level 15, State 1, Procedure sp_bindefault, Line 228
Incorrect syntax near '%'.
Msg 102, Level 15, State 1, Procedure sp_bindefault, Line 264
Incorrect syntax near '%'.
Msg 102, Level 15, State 1, Procedure sp_bindefault, Line 273
Incorrect syntax near '%'.
sp_databases
Invalid object name 'sys.sp_databases'. Line 6
sp_tables
Invalid object name 'sys.sp_tables'
Is there a chance that these errors are due to the fact that I executed them without parameters?
Thanks
I know there are a lot of undocumented system stored procedures such as xp_ntsec_enumdomains, xp_instance_regread etc, that exist on SQL Server.
Does anyone know of any good websites that contain descriptions of what these stored procedures do? In particular I know that a default installation of SQL Server 2000 leaves permission to execute many of these granted to public and I am interested in finding out what the implications of each one of these are? I have tried Googling this topic but there doesn't seem to me much or there (or what is there is in Chinese and I don't really want to click on to!)
Once again thanks for the help.
i found that some stored procedure get created automatically in sqlserver 2000 (system stored procedures) ,while doing my work i accidentally deleted those stored procedures can any body answer following questions1: why these stored procedures are there and automatically created2: what happen en if i deleted those stored procedures3: how to recreate those stored procedures with limited user permission thanks in advance
View 2 Replies View RelatedI recall that stored procedures created in the master database and having a name beginning with sp_ are available from all databases. However, I've found varying results when invoking such a procedure from a different database. For example:
DECLARE tables CURSOR FOR
select name from sysobjects
where type='U'
order by name
for read only
populates a cursor with the list of tables in the database from which you are running the procedure. However this query in the same stored procedure:
SELECT count(*)
FROM sysExcludeMaint
WHERE @tablename like tablename
fails with "Invalid object name 'sysExcludeMaint'." if the table sysExcludeMaint
doesn't exist in the master database (it does exist in the database from which I've invoked the proc). I'm not clear on why the different results. Anyone know?
A system stored procedure got accidentally deleted, and all backups aresince the stored procedure was deleted (wonderful!)Can the SQL for the stored procedure be extracted from another serverand loaded as opposed to removing everything and then rebuilding theserver?Thanks in advance!
View 1 Replies View RelatedHello, I want to export/import a non system stored procedures from one DB to another. How Should I proceed ?
Thanks in advance.
What system stored procedures have changed between SQL 2000 and SQL 2005?
View 4 Replies View RelatedHello,
We are trying to be proactive and stop a potential performance issue by reducing the number of recompiles in our SQL 2000 database application. This database is replicated. After viewing output from Profiler and PerfMon it seems that over 90% of the recompiles are due to system stored procedures generated by replication merge agents. Can anything be done about this?
Thanks
I want to set defaults for my multi-valued report parameter MONTH so that when the report starts, it automatically selects all the months prior to the current month (effectively creates a YTD report). However, using RS2005, I can't seem to figure out how to do this. I can create an IIF expression in 12 different value entries in the report parameters that returns the month based on the system date, but the first time I pass blanks, null or anything except a valid parameter, it clears the entire parameter list when the report displays.
Does anyone have any suggestions for auto-populating multiple values in a parameter at runtime where one or more of the parameter values may be empty? Checking "Allow Null" or "Allow Blank" doesn't fix this problem.
I tried to pass all the values in a single value entry on the report parameters page, but can't find the syntax that will allow this. I'm not sure if it will let you do that anyway...
Trent
Hi,
Ever since working with RS I had noticed that deploying reports felt inconsistent and didn't always seem to work, requiring sometimes for me to delete and re-deploy the reports before seeing changes applied. This has the knock on effect of generating new report ID's (GUID's) for the reports and any data in the ExecutionLog table for your reports becomes useless inhibiting effective usage reporting.
I never quite put my finger on exactly what the issue was until recently discovered that "by design" report paramerter defaults are not updated when deploying reports from BIDS. This is because MS envisaged that DBA's or Report Adminstrators would be responsible for changing parameter defaults and prompts once the reports are deployed.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=100960&SiteID=1
I disagree and having discussed this with the product team here http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2181673&SiteID=1 it seems a sensible option would be to add a deployment option to the reporting services project definition similar to the OverwriteDataSources option.
I have posted a product feedback report on the Connect site https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=299372
Please vote for this to be added to Katmai (RS 2008).
disable the following system stored procedure (xp_grantlogin and xp_revokelogin)?
View 5 Replies View RelatedHi all,
I would like to enable users that do not belong to groups (server roles) such as sysadmin, serveradmin and don't have db permissions such as ddl_admin or db_owner to run some of the system stored procedures (such as sp_addumpdevice sp_configure sp_serveroption ...) and DBCC commands (such as DBCC CHECKFILEGROUP - requires ob_owner or sysadmin permission).
Is it possible to change permissions of SQL Server system stored procedures?
Is it possible to change permissions of SQL Server DBCC commands?
Thanks,
Assaf
Hi Everyone,
Can anyone help me with this little problem that im stuck with.
As part of the initial snapshot using merge replication, i am creating the initial schema on the subscriber database however it seems as though it does not like UDDTs or defaults and hence does not create them on the subscribers.
Its looking likely that I may have to create a script which executes on the subscriber which creates the initial schema then use merge replication to transfer data.
Does Merge Replication support UDTs/Defaults? If so how does it work?
Ive search many places though have come up with nothing.
Please help. = (
Hello,
I would like to pass into a stored procedure the name of a table. Following code does not work.
USE pubs
GO
CREATE PROC test1
@tableName varchar(40)
AS
SELECT * FROM @tableName
EXEC test1 @tableName='authors'
I would appreciate it very much if someone could help me with this.
Thanks
I'm new to Replication and trying to understand some basic concepts. What I really want to do is replicate a View such that it shows as a table in the subscriber database, but it appears as though I cannot do that. First, is that correct? Second, since it appears as though Stored Procedures can be replicated, I was wondering if I could accomplish the same thing via that route. However, I am unclear: does the SP itself replicate? Does replication execute the SP? If the SP simply does a query, are the query results replicated?
I know that I can replicate subsets of tables; limiting rows and columns. This is part of what I wanted the view to do, however I also wanted to be able to include joins.
Thanks for any help anyone can provide this newbie!
.Net Stored Procedures & Replication
Can you do it? I have some transformation and business logic I need to place in the transactional replication process.
Just curious if its possible.
BTW, I know I should not be doing transformation during transactional replication. At the moment the client wants realtime updates to a central repository thought transactional replication.
Thanks in advance!
Bryan
I have upsized a complex Access 97 application to SQL Server 7, and want to substantially preserve the user interface design by using an Access 2000 project (*.adp) as the front end.
Most of the original Access queries accepted their parameters from screen form objects, and this works well using SQL 7 stored procedures as form recordsources.
However, Access 2000 does not seem to provide a way to tell a listbox or combo box how to pass a parameter value from a screen form object to its SQL 7 stored procedure rowsource.
These parametized listboxes are critical to the interface design.
Please help!!!
Sorry if I haven't choose appropriate forum for this question.
I have MSSQL05 beta. I know how to list all stored procedures in selected database (everything is in localhost). I need to list parameter names and types for selected stored procedure(s).
How can I do that or anything that can return parameter names and types?
It's windows application.
Has anyone used custom stored procedures with multiple tables? or can you only use them with one.
View 1 Replies View RelatedHello all. I have a question, but first the setting.
I have one Publisher pushing out to 4 subscriptions, all are SQL 2000 Servers. The tables all replicate like they are supposed to. My issue is that if I make changes to a stored procedure, I have to physically go to each subscription and make the same changes. I included the stored procedures when I set up the publication.
Now the question, is there an easier way? I want to be able to make the changes on the publisher and the changes to replicate to the other servers.
Thanks!!!!!
Kameron
I have a system with three replications:
merge replication between SERVER and CLIENT
transactional replication from SERVER to CLIENT
transactional replication from CLIENT to SERVER
SERVER is always distributor.
Everything has been running fine for over a week now, but today something went wrong with the second transactional replication (from CLIENT to SERVER). SERVER is distributor and CLIENT is publisher. The subscription is push.
When I view the synchronization status, the following error message appears:
"Could not find stored procedure 'sp_MSins_dbosessions'."
Indeed, when I look at the stored procedure, it has been renamed to
'sp_MSins_dbosessions_msrepl_ccs'.
I don't know why, when or how this renaming happened, but it happened for every stored procedure that is used for this transactional replication (the other replications are still working fine)
Any help or remarks are highly appreciated.
Roel
Hi,
I created a .sdf file thru merge replication.
On the step of publication, in the articles object there is an option to select from 1) Tables,views 2) and stored procedures from the databse.
How these two are diferent from each other?
My aim is to use Stored procedures extensively so that I can avoid SQL code in device.
When we use this .sdf file in active sync,we only getting the tables, and no sp's and views.
Is it possible to accept sp's and view from sdf in pocketPC?
I am using SQL server2005 on server , Windows SQL Mobile 2005 in pocket pc 2003 using Compact Framework 2.0
Please advice..
aneesh